Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Detection eddies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPSL
LMD
DPAO
Detection eddies
Commits
dd6890ec
Commit
dd6890ec
authored
2 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Rename variable `n_shpc` to `n_slices`
parent
9cff0dd4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Overlap/eddy_graph.f90
+12
-12
12 additions, 12 deletions
Overlap/eddy_graph.f90
with
12 additions
and
12 deletions
Overlap/eddy_graph.f90
+
12
−
12
View file @
dd6890ec
...
@@ -50,10 +50,10 @@ program eddy_graph
...
@@ -50,10 +50,10 @@ program eddy_graph
logical
periodic
! grid is periodic in longitude
logical
periodic
! grid is periodic in longitude
integer
unit_isolated
,
unit
integer
unit_isolated
,
unit
integer
n_s
hpc
! number of input SHPC directories
integer
n_s
lices
! number of input SHPC directories
integer
e_overestim
! over-estimation of the number of eddies at each date
integer
e_overestim
! over-estimation of the number of eddies at each date
TYPE
(
shpc_slice_handler
),
allocatable
::
hshpc
(:)
! (n_s
hpc
)
TYPE
(
shpc_slice_handler
),
allocatable
::
hshpc
(:)
! (n_s
lices
)
type
(
shpc_slice_meta
),
allocatable
::
ssm
(:)
! (n_s
hpc
)
type
(
shpc_slice_meta
),
allocatable
::
ssm
(:)
! (n_s
lices
)
type
(
snapshot
),
allocatable
::
flow
(:)
! (max_delta + 1)
type
(
snapshot
),
allocatable
::
flow
(:)
! (max_delta + 1)
character
(
len
=
30
)
file
character
(
len
=
30
)
file
...
@@ -69,15 +69,15 @@ program eddy_graph
...
@@ -69,15 +69,15 @@ program eddy_graph
call
MPI_Comm_size
(
MPI_Comm_world
,
n_proc
)
call
MPI_Comm_size
(
MPI_Comm_world
,
n_proc
)
if
(
rank
==
0
)
then
if
(
rank
==
0
)
then
n_s
hpc
=
COMMAND_ARGUMENT_COUNT
()
n_s
lices
=
COMMAND_ARGUMENT_COUNT
()
call
assert
(
n_s
hpc
/
=
0
,
&
call
assert
(
n_s
lices
/
=
0
,
&
"Required arguments: SHPC-directory [SHPC-directory] ..."
)
"Required arguments: SHPC-directory [SHPC-directory] ..."
)
end
if
end
if
call
ezmpi_bcast
(
n_s
hpc
,
root
=
0
)
call
ezmpi_bcast
(
n_s
lices
,
root
=
0
)
allocate
(
hshpc
(
n_s
hpc
),
ssm
(
n_s
hpc
))
allocate
(
hshpc
(
n_s
lices
),
ssm
(
n_s
lices
))
do
i
=
1
,
n_s
hpc
do
i
=
1
,
n_s
lices
call
get_command_arg_dyn
(
i
,
shpc_dir
)
call
get_command_arg_dyn
(
i
,
shpc_dir
)
call
shpc_open
(
hshpc
(
i
),
trim
(
shpc_dir
),
pszaccess
=
"rb"
)
call
shpc_open
(
hshpc
(
i
),
trim
(
shpc_dir
),
pszaccess
=
"rb"
)
call
dbf_read_attribute_03
(
ssm
(
i
)
%
d0
,
hshpc
(
i
)
%
extremum
,
&
call
dbf_read_attribute_03
(
ssm
(
i
)
%
d0
,
hshpc
(
i
)
%
extremum
,
&
...
@@ -99,7 +99,7 @@ program eddy_graph
...
@@ -99,7 +99,7 @@ program eddy_graph
read
(
unit
=
*
,
nml
=
main_nml
)
read
(
unit
=
*
,
nml
=
main_nml
)
write
(
unit
=
*
,
nml
=
main_nml
)
write
(
unit
=
*
,
nml
=
main_nml
)
call
assert
(
max_delta
>=
1
,
"eddy_graph max_delta"
)
call
assert
(
max_delta
>=
1
,
"eddy_graph max_delta"
)
call
assert
(
n_dates
==
huge
(
0
)
.or.
n_s
hpc
==
1
,
"If we have several "
&
call
assert
(
n_dates
==
huge
(
0
)
.or.
n_s
lices
==
1
,
"If we have several "
&
//
"SHPC directories, then we read all the dates from them"
)
//
"SHPC directories, then we read all the dates from them"
)
! As we are requiring the grid spacing to be uniform, the value of
! As we are requiring the grid spacing to be uniform, the value of
...
@@ -111,14 +111,14 @@ program eddy_graph
...
@@ -111,14 +111,14 @@ program eddy_graph
copy
=
merge
(
dist_lim
,
0
,
periodic
)
copy
=
merge
(
dist_lim
,
0
,
periodic
)
if
(
n_dates
==
huge
(
0
))
&
if
(
n_dates
==
huge
(
0
))
&
n_dates
=
sum
([(
size
(
ssm
(
i
)
%
ishape_last
),
i
=
1
,
n_s
hpc
)])
n_dates
=
sum
([(
size
(
ssm
(
i
)
%
ishape_last
),
i
=
1
,
n_s
lices
)])
print
*
,
"n_dates = "
,
n_dates
print
*
,
"n_dates = "
,
n_dates
call
assert
(
n_dates
>=
max_delta
+
1
,
&
call
assert
(
n_dates
>=
max_delta
+
1
,
&
"eddy_graph: n_dates should be >= max_delta + 1"
)
"eddy_graph: n_dates should be >= max_delta + 1"
)
call
assert
(
n_proc
<=
n_dates
/
(
max_delta
+
1
),
&
call
assert
(
n_proc
<=
n_dates
/
(
max_delta
+
1
),
&
"eddy_graph: n_proc should be <= n_dates / (max_delta + 1)"
)
"eddy_graph: n_proc should be <= n_dates / (max_delta + 1)"
)
e_overestim
=
maxval
([(
ssm
(
i
)
%
ishape_last
(
ssm
(
i
)
%
d0
)
+
1
,
&
e_overestim
=
maxval
([(
ssm
(
i
)
%
ishape_last
(
ssm
(
i
)
%
d0
)
+
1
,
&
ediff1d
(
ssm
(
i
)
%
ishape_last
),
i
=
1
,
n_s
hpc
)])
ediff1d
(
ssm
(
i
)
%
ishape_last
),
i
=
1
,
n_s
lices
)])
open
(
unit
,
file
=
"e_overestim.txt"
,
status
=
"replace"
,
action
=
"write"
)
open
(
unit
,
file
=
"e_overestim.txt"
,
status
=
"replace"
,
action
=
"write"
)
write
(
unit
,
fmt
=
*
)
e_overestim
write
(
unit
,
fmt
=
*
)
e_overestim
close
(
unit
)
close
(
unit
)
...
@@ -213,7 +213,7 @@ program eddy_graph
...
@@ -213,7 +213,7 @@ program eddy_graph
! 5. Back matter
! 5. Back matter
do
i
=
1
,
n_s
hpc
do
i
=
1
,
n_s
lices
CALL
shpc_close
(
hshpc
(
i
))
CALL
shpc_close
(
hshpc
(
i
))
end
do
end
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment