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
5b2851a5
Commit
5b2851a5
authored
3 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Read the shapefile name from the command line
parent
fabf5a23
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
Inst_eddies/Tests/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Inst_eddies/Tests/CMakeLists.txt
Inst_eddies/Tests/short_tests.json
+12
-19
12 additions, 19 deletions
Inst_eddies/Tests/short_tests.json
Inst_eddies/Tests/test_mean_speed.f90
+4
-1
4 additions, 1 deletion
Inst_eddies/Tests/test_mean_speed.f90
with
17 additions
and
21 deletions
Inst_eddies/Tests/CMakeLists.txt
+
1
−
1
View file @
5b2851a5
...
@@ -57,7 +57,7 @@ add_executable(test_mean_speed mean_speed.f90
...
@@ -57,7 +57,7 @@ add_executable(test_mean_speed mean_speed.f90
${
CMAKE_CURRENT_LIST_DIR
}
/test_mean_speed.f90
)
${
CMAKE_CURRENT_LIST_DIR
}
/test_mean_speed.f90
)
target_link_libraries
(
test_mean_speed numer_rec_95 NetCDF95::netcdf95
target_link_libraries
(
test_mean_speed numer_rec_95 NetCDF95::netcdf95
shapelib_03 contour_531 nr_util NetCDF_Fortran::NetCDF_Fortran gpc_f
)
shapelib_03 contour_531 nr_util NetCDF_Fortran::NetCDF_Fortran gpc_f
jumble
)
target_include_directories
(
test_mean_speed PRIVATE
target_include_directories
(
test_mean_speed PRIVATE
${
fortrangis_INCLUDE_DIR
}
)
${
fortrangis_INCLUDE_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
Inst_eddies/Tests/short_tests.json
+
12
−
19
View file @
5b2851a5
...
@@ -177,32 +177,25 @@
...
@@ -177,32 +177,25 @@
"input"
:
"&main_nml /
\n
"
,
"input"
:
"&main_nml /
\n
"
,
"title"
:
"Mean_speed"
,
"title"
:
"Mean_speed"
,
"required"
:
[
"required"
:
[
[
"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
,
"uv.nc"
],
[
"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
,
"uv.nc"
]
[
"$PWD/Get_1_outerm/SHPC/outermost_contour.shp"
,
"contour.shp"
],
[
"$PWD/Get_1_outerm/SHPC/outermost_contour.dbf"
,
"contour.dbf"
],
[
"$PWD/Get_1_outerm/SHPC/outermost_contour.shx"
,
"contour.shx"
]
],
],
"command"
:
"$build_dir/Inst_eddies/test_mean_speed"
"command"
:
[
"$build_dir/Inst_eddies/test_mean_speed"
,
"$PWD/Get_1_outerm/SHPC/outermost_contour"
]
},
},
{
{
"input"
:
"&main_nml /
\n
"
,
"input"
:
"&main_nml /
\n
"
,
"title"
:
"Mean_speed_alt"
,
"title"
:
"Mean_speed_alt"
,
"required"
:
[
"required"
:
[
[
"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
,
"uv.nc"
],
[
"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc"
,
"uv.nc"
]
[
"$src_dir/Inst_eddies/Tests/Input/outermost_contour_alt.shp"
,
"contour.shp"
],
[
"$src_dir/Inst_eddies/Tests/Input/outermost_contour_alt.dbf"
,
"contour.dbf"
],
[
"$src_dir/Inst_eddies/Tests/Input/outermost_contour_alt.shx"
,
"contour.shx"
]
],
],
"command"
:
"$build_dir/Inst_eddies/test_mean_speed"
"command"
:
[
"$build_dir/Inst_eddies/test_mean_speed"
,
"$src_dir/Inst_eddies/Tests/Input/outermost_contour_alt"
]
},
},
{
{
"required"
:
"required"
:
...
...
This diff is collapsed.
Click to expand it.
Inst_eddies/Tests/test_mean_speed.f90
+
4
−
1
View file @
5b2851a5
...
@@ -4,6 +4,7 @@ program test_mean_speed
...
@@ -4,6 +4,7 @@ program test_mean_speed
! Libraries:
! Libraries:
use
gpc_f
,
only
:
shpobj2pol
,
polygon
use
gpc_f
,
only
:
shpobj2pol
,
polygon
use
jumble
,
only
:
get_command_arg_dyn
use
netcdf
,
only
:
nf90_nowrite
use
netcdf
,
only
:
nf90_nowrite
use
netcdf95
,
only
:
nf95_open
,
nf95_close
,
nf95_inq_varid
,
nf95_get_var
,
&
use
netcdf95
,
only
:
nf95_open
,
nf95_close
,
nf95_inq_varid
,
nf95_get_var
,
&
find_coord
,
nf95_inquire_dimension
find_coord
,
nf95_inquire_dimension
...
@@ -23,11 +24,13 @@ program test_mean_speed
...
@@ -23,11 +24,13 @@ program test_mean_speed
TYPE
(
shpfileobject
)
hshp
TYPE
(
shpfileobject
)
hshp
TYPE
(
shpobject
)
psobject
TYPE
(
shpobject
)
psobject
type
(
polygon
)
p
type
(
polygon
)
p
character
(
len
=
:),
allocatable
::
contour_filename
namelist
/
main_nml
/
center
namelist
/
main_nml
/
center
!---------------------------------------------------------------------
!---------------------------------------------------------------------
call
get_command_arg_dyn
(
1
,
contour_filename
,
"Required argument: shapefile"
)
write
(
unit
=
error_unit
,
nml
=
main_nml
)
write
(
unit
=
error_unit
,
nml
=
main_nml
)
write
(
unit
=
error_unit
,
fmt
=
*
)
"Enter namelist main_nml."
write
(
unit
=
error_unit
,
fmt
=
*
)
"Enter namelist main_nml."
read
(
unit
=
*
,
nml
=
main_nml
)
read
(
unit
=
*
,
nml
=
main_nml
)
...
@@ -53,7 +56,7 @@ program test_mean_speed
...
@@ -53,7 +56,7 @@ program test_mean_speed
call
nf95_close
(
ncid
)
call
nf95_close
(
ncid
)
call
shp_open_03
(
hshp
,
"
contour
"
,
"rb"
)
call
shp_open_03
(
hshp
,
contour
_filename
,
"rb"
)
call
shp_read_object_03
(
hshp
,
0
,
psobject
)
call
shp_read_object_03
(
hshp
,
0
,
psobject
)
CALL
shpclose
(
hshp
)
CALL
shpclose
(
hshp
)
p
=
shpobj2pol
(
psobject
)
p
=
shpobj2pol
(
psobject
)
...
...
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