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
68b9b6a9
Commit
68b9b6a9
authored
7 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Change test_set_outermost_contour so it does not call local_extrema
but reads extr_map from a file.
parent
c2518f4b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GNUmakefile
+1
-1
1 addition, 1 deletion
GNUmakefile
Sources/Tests/test_set_outermost_contour.f
+27
-21
27 additions, 21 deletions
Sources/Tests/test_set_outermost_contour.f
depend.mk
+1
-1
1 addition, 1 deletion
depend.mk
with
29 additions
and
23 deletions
GNUmakefile
+
1
−
1
View file @
68b9b6a9
...
...
@@ -7,7 +7,7 @@ VPATH = ${makefile_dir}/Sources ${makefile_dir}/Sources/Tests
src_test_local_extrema
=
test_local_extrema.f local_extrema.f
src_test_set_outermost_contour
=
good_contour.f test_set_outermost_contour.f derived_types.f set_outermost_contour.f outermost_possible_level.f spherical_polygon_area.f
local_extrema.f
src_test_set_outermost_contour
=
good_contour.f test_set_outermost_contour.f derived_types.f set_outermost_contour.f outermost_possible_level.f spherical_polygon_area.f
src_test_max_speed_contour_ssh
=
test_max_speed_contour_ssh.f max_speed_contour_ssh.f inside.f
...
...
This diff is collapsed.
Click to expand it.
Sources/Tests/test_set_outermost_contour.f
+
27
−
21
View file @
68b9b6a9
...
...
@@ -3,7 +3,6 @@ program test_set_outermost_contour
use
,
intrinsic
::
ISO_FORTRAN_ENV
use
derived_types
,
only
:
eddy
use
local_extrema_m
,
only
:
local_extrema
,
construct_mask_center
use
netcdf
,
only
:
nf90_nowrite
use
netcdf95
,
only
:
nf95_open
,
nf95_close
,
nf95_inq_varid
,
nf95_get_var
use
nr_util
,
only
:
pi
,
assert
...
...
@@ -26,29 +25,24 @@ program test_set_outermost_contour
real
,
allocatable
::
ssh
(:,
:)
! (n_lon, n_lat) sea-surface height, in m
integer
,
allocatable
::
extr_map
(:,
:)
! (n_lon, n_lat) map of extrema
integer
,
allocatable
::
ind_extr
(:,
:)
! (2, n_extr)
! indices in the two dimensions of extrema
real
,
allocatable
::
innermost_level
(:)
! (n_extr)
! level of innermost contour, for each extremum
logical
,
allocatable
::
cyclone
(:)
! (n_extr)
integer
::
ind_targ_extr
(
2
)
=
[
19
,
11
]
! indices in the two dimensions of target extremum
real
::
innermost_level
=
0.2933
! level of innermost contour, for each extremum
logical
::
cyclone
=
.true.
type
(
eddy
)
e
real
,
parameter
::
step
=
0.25
/
180.
*
pi
! in rad
TYPE
(
shpfileobject
)
shphandle
integer
field_number
,
shape_number
integer
::
i
=
6
! identifying number of the target extremum
logical
::
noise_around
=
.false.
namelist
/
main_nml
/
ilon_llc
,
ilat_llc
,
ilon_urc
,
ilat_urc
,
i
,
noise_around
namelist
/
main_nml
/
ilon_llc
,
ilat_llc
,
ilon_urc
,
ilat_urc
,
ind_targ_extr
,
&
innermost_level
,
cyclone
,
noise_around
!----------------------------------------------------------------
call
get_command_argument
(
number
=
1
,
length
=
length
,
status
=
status
)
call
assert
(
status
==
0
,
"Required argument: ADT file"
)
allocate
(
character
(
len
=
length
)::
filename
)
call
get_command_argument
(
1
,
filename
)
call
assert
(
COMMAND_ARGUMENT_COUNT
()
==
2
,
&
"Required arguments: ADT-file extr_map-file"
)
write
(
unit
=
error_unit
,
nml
=
main_nml
)
write
(
unit
=
error_unit
,
fmt
=
*
)
"Enter namelist main_nml."
...
...
@@ -59,6 +53,10 @@ program test_set_outermost_contour
allocate
(
longitude
(
n_lon
),
latitude
(
n_lat
))
allocate
(
ssh
(
n_lon
,
n_lat
),
extr_map
(
n_lon
,
n_lat
))
call
get_command_argument
(
number
=
1
,
length
=
length
,
status
=
status
)
allocate
(
character
(
len
=
length
)::
filename
)
call
get_command_argument
(
1
,
filename
)
print
*
,
"Reading from "
,
filename
,
"..."
call
nf95_open
(
filename
,
nf90_nowrite
,
ncid
)
...
...
@@ -75,14 +73,22 @@ program test_set_outermost_contour
call
nf95_close
(
ncid
)
call
construct_mask_center
call
local_extrema
(
ssh
,
extr_map
,
ind_extr
,
innermost_level
,
cyclone
)
!!$ extr_map(ind_extr(1, 8), ind_extr(2, 8)) &
!!$ = - extr_map(ind_extr(1, 8), ind_extr(2, 8))
call
get_command_argument
(
number
=
2
,
length
=
length
,
status
=
status
)
deallocate
(
filename
)
allocate
(
character
(
len
=
length
)::
filename
)
call
get_command_argument
(
2
,
filename
)
print
*
,
"Reading from "
,
filename
,
"..."
call
nf95_open
(
filename
,
nf90_nowrite
,
ncid
)
call
nf95_inq_varid
(
ncid
,
"extr_map"
,
varid
)
call
nf95_get_var
(
ncid
,
varid
,
extr_map
)
call
nf95_close
(
ncid
)
e
%
coord_extr
=
[
longitude
(
ind_extr
(
1
,
i
)),
latitude
(
ind_extr
(
2
,
i
))]
e
%
cyclone
=
cyclone
(
i
)
call
set_outermost_contour
(
e
,
ind_
extr
(:,
i
)
,
innermost_level
(
i
)
,
extr_map
,
&
e
%
coord_extr
=
[
longitude
(
ind_
targ_
extr
(
1
)),
latitude
(
ind_
targ_
extr
(
2
))]
e
%
cyclone
=
cyclone
call
set_outermost_contour
(
e
,
ind_
targ_extr
,
innermost_level
,
extr_map
,
&
ssh
,
corner
=
[
longitude
(
1
),
latitude
(
1
)],
step
=
[
step
,
step
],
&
noise_around
=
noise_around
)
...
...
This diff is collapsed.
Click to expand it.
depend.mk
+
1
−
1
View file @
68b9b6a9
...
...
@@ -8,5 +8,5 @@ test_inside.o : inside.o
test_local_extrema.o
:
local_extrema.o
test_max_speed_contour_ssh.o
:
max_speed_contour_ssh.o
test_mean_speed.o
:
mean_speed.o
test_set_outermost_contour.o
:
set_outermost_contour.o
local_extrema.o
derived_types.o
test_set_outermost_contour.o
:
set_outermost_contour.o derived_types.o
write_eddy.o
:
derived_types.o
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