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
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
IPSL
LMD
DPAO
Detection eddies
Commits
a97465ef
Commit
a97465ef
authored
2 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Add program `test_write_eddy`
parent
2f08338b
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
Common/CMakeLists.txt
+2
-0
2 additions, 0 deletions
Common/CMakeLists.txt
Inst_eddies/Tests/CMakeLists.txt
+6
-1
6 additions, 1 deletion
Inst_eddies/Tests/CMakeLists.txt
Inst_eddies/Tests/test_write_eddy.f90
+108
-0
108 additions, 0 deletions
Inst_eddies/Tests/test_write_eddy.f90
with
116 additions
and
1 deletion
Common/CMakeLists.txt
+
2
−
0
View file @
a97465ef
...
@@ -12,6 +12,8 @@ target_sources(test_spher_polyline_area PRIVATE spher_polyline_area.f90)
...
@@ -12,6 +12,8 @@ target_sources(test_spher_polyline_area PRIVATE spher_polyline_area.f90)
target_sources
(
inst_eddies PRIVATE write_eddy.f90 spher_polyline_area.f90
target_sources
(
inst_eddies PRIVATE write_eddy.f90 spher_polyline_area.f90
derived_types.f90 shpc_create.f90 shpc_close.f90 shpc_open.f90
derived_types.f90 shpc_create.f90 shpc_close.f90 shpc_open.f90
read_field_indices.f90
)
read_field_indices.f90
)
target_sources
(
test_write_eddy PRIVATE derived_types.f90 shpc_open.f90
shpc_close.f90 read_field_indices.f90 shpc_create.f90
)
if
(
MPI_Fortran_HAVE_F08_MODULE
)
if
(
MPI_Fortran_HAVE_F08_MODULE
)
target_sources
(
test_overlap PRIVATE derived_types.f90 read_snapshot.f90
target_sources
(
test_overlap PRIVATE derived_types.f90 read_snapshot.f90
...
...
This diff is collapsed.
Click to expand it.
Inst_eddies/Tests/CMakeLists.txt
+
6
−
1
View file @
a97465ef
...
@@ -52,10 +52,15 @@ target_link_libraries(test_set_max_speed PRIVATE Geometry::geometry
...
@@ -52,10 +52,15 @@ target_link_libraries(test_set_max_speed PRIVATE Geometry::geometry
Shapelib_03::shapelib_03 Contour_531::contour_531 Jumble::jumble
Shapelib_03::shapelib_03 Contour_531::contour_531 Jumble::jumble
NetCDF_Fortran::netcdff gpc_f
)
NetCDF_Fortran::netcdff gpc_f
)
# test_write_eddy
add_executable
(
test_write_eddy test_write_eddy.f90
)
target_link_libraries
(
test_write_eddy PRIVATE Shapelib_03::shapelib_03
Contour_531::contour_531 Jumble::jumble
)
foreach
(
my_target IN ITEMS test_get_1_outerm test_set_all_outerm
foreach
(
my_target IN ITEMS test_get_1_outerm test_set_all_outerm
test_good_contour test_inside_4 test_mean_speed
test_good_contour test_inside_4 test_mean_speed
test_max_speed_contour_ssh test_nearby_extr test_local_extrema
test_max_speed_contour_ssh test_nearby_extr test_local_extrema
test_set_max_speed
)
test_set_max_speed
test_write_eddy
)
set_target_properties
(
${
my_target
}
PROPERTIES Fortran_MODULE_DIRECTORY
set_target_properties
(
${
my_target
}
PROPERTIES Fortran_MODULE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
my_target
}
_modules
)
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
my_target
}
_modules
)
target_include_directories
(
${
my_target
}
PRIVATE
target_include_directories
(
${
my_target
}
PRIVATE
...
...
This diff is collapsed.
Click to expand it.
Inst_eddies/Tests/test_write_eddy.f90
0 → 100644
+
108
−
0
View file @
a97465ef
program
test_write_eddy
! This program is a performance test for output of a shapefile
! collection. It writes null shapes.
! Libraries:
use
shapelib_03
,
only
:
shp_append_point_03
,
dbf_write_attribute_03
,
&
shp_append_null_03
use
derived_types
,
only
:
shpc
use
shpc_close_m
,
only
:
shpc_close
use
shpc_create_m
,
only
:
shpc_create
use
shpc_open_m
,
only
:
shpc_open
implicit
none
TYPE
(
shpc
)
hshpc
integer
i
,
ishape
integer
::
n_eddies
=
50000
logical
exist
logical
::
mixed
=
.true.
namelist
/
main_nml
/
n_eddies
,
mixed
!--------------------------------------------------------------
inquire
(
file
=
"SHPC_cyclo/extremum.shp"
,
exist
=
exist
)
if
(
exist
)
then
call
shpc_open
(
hshpc
,
shpc_dir
=
"SHPC_cyclo"
,
pszaccess
=
"rb+"
)
else
call
shpc_create
(
hshpc
,
shpc_dir
=
"SHPC_cyclo"
,
cyclone
=
.true.
)
end
if
print
*
,
"Enter namelist main_nml."
read
(
unit
=
*
,
nml
=
main_nml
)
if
(
mixed
)
then
! Alternate between shapefiles inside the loop on eddies:
do
i
=
1
,
n_eddies
call
shp_append_point_03
(
ishape
,
hshpc
%
extremum
,
[
0.
,
0.
])
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_ssh
,
0.
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_date
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
&
hshpc
%
extr_eddy_index
,
i
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_valid
,
1
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_speed
,
&
0.
)
call
shp_append_null_03
(
ishape
,
hshpc
%
outermost
)
call
shp_append_null_03
(
ishape
,
hshpc
%
max_speed
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
&
hshpc
%
out_r_eq_area
,
-
100.
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
hshpc
%
out_ssh
,
0.
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
hshpc
%
out_date
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
&
hshpc
%
out_eddy_index
,
i
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
&
hshpc
%
out_radius4
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_r_eq_area
,
-
100.
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_ssh
,
0.
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_date
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_eddy_index
,
i
)
end
do
else
! Loop on eddies for each shapefile:
do
i
=
1
,
n_eddies
call
shp_append_point_03
(
ishape
,
hshpc
%
extremum
,
[
0.
,
0.
])
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_ssh
,
0.
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_date
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
&
hshpc
%
extr_eddy_index
,
i
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_valid
,
1
)
call
dbf_write_attribute_03
(
hshpc
%
extremum
,
ishape
,
hshpc
%
extr_speed
,
&
0.
)
end
do
do
i
=
1
,
n_eddies
call
shp_append_null_03
(
ishape
,
hshpc
%
outermost
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
&
hshpc
%
out_r_eq_area
,
-
100.
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
hshpc
%
out_ssh
,
0.
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
hshpc
%
out_date
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
&
hshpc
%
out_eddy_index
,
i
)
call
dbf_write_attribute_03
(
hshpc
%
outermost
,
ishape
,
&
hshpc
%
out_radius4
,
0
)
end
do
do
i
=
1
,
n_eddies
call
shp_append_null_03
(
ishape
,
hshpc
%
max_speed
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_r_eq_area
,
-
100.
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_ssh
,
0.
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_date
,
0
)
call
dbf_write_attribute_03
(
hshpc
%
max_speed
,
ishape
,
&
hshpc
%
max_speed_eddy_index
,
i
)
end
do
end
if
CALL
shpc_close
(
hshpc
)
end
program
test_write_eddy
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