Skip to content
Snippets Groups Projects
Commit 509660fb authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Rename Tests/test_get_snapshot.f to extraction_eddies.f (it is no

longer a test program).
parent d52a7640
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ src_test_get_1_outerm = good_contour.f test_get_1_outerm.f derived_types.f get_1 ...@@ -13,7 +13,7 @@ src_test_get_1_outerm = good_contour.f test_get_1_outerm.f derived_types.f get_1
src_test_set_max_speed = test_set_max_speed.f derived_types.f set_max_speed.f good_contour.f max_speed_contour_ssh.f mean_speed.f spher_polyline_area.f inside_4.f src_test_set_max_speed = test_set_max_speed.f derived_types.f set_max_speed.f good_contour.f max_speed_contour_ssh.f mean_speed.f spher_polyline_area.f inside_4.f
src_test_get_snapshot = test_get_snapshot.f write_eddy.f local_extrema.f set_max_speed.f outermost_possible_level.f get_1_outerm.f max_speed_contour_ssh.f good_contour.f spher_polyline_area.f mean_speed.f inside_4.f set_all_outerm.f derived_types.f init_shapefiles.f nearby_extr.f get_var.f src_extraction_eddies = extraction_eddies.f write_eddy.f local_extrema.f set_max_speed.f outermost_possible_level.f get_1_outerm.f max_speed_contour_ssh.f good_contour.f spher_polyline_area.f mean_speed.f inside_4.f set_all_outerm.f derived_types.f init_shapefiles.f nearby_extr.f get_var.f
src_test_set_all_outerm = test_set_all_outerm.f derived_types.f set_all_outerm.f local_extrema.f get_1_outerm.f good_contour.f spher_polyline_area.f nearby_extr.f get_var.f src_test_set_all_outerm = test_set_all_outerm.f derived_types.f set_all_outerm.f local_extrema.f get_1_outerm.f good_contour.f spher_polyline_area.f nearby_extr.f get_var.f
...@@ -31,7 +31,7 @@ src_test_nearby_extr = test_nearby_extr.f nearby_extr.f derived_types.f ...@@ -31,7 +31,7 @@ src_test_nearby_extr = test_nearby_extr.f nearby_extr.f derived_types.f
src_test_max_speed_contour_ssh = test_max_speed_contour_ssh.f max_speed_contour_ssh.f get_var.f src_test_max_speed_contour_ssh = test_max_speed_contour_ssh.f max_speed_contour_ssh.f get_var.f
sources := $(sort ${src_test_local_extrema} ${src_test_get_1_outerm} ${src_test_set_max_speed} ${src_test_get_snapshot} ${src_test_set_all_outerm} ${src_test_weight} ${src_test_spher_polygon_area} ${src_test_read_eddy} ${src_test_read_snapshot} ${src_test_successive_overlap} ${src_test_nearby_extr} ${src_test_max_speed_contour_ssh}) test_good_contour.f test_inside_4.f test_mean_speed.f test_spher_polyline_area.f sources := $(sort ${src_test_local_extrema} ${src_test_get_1_outerm} ${src_test_set_max_speed} ${src_extraction_eddies} ${src_test_set_all_outerm} ${src_test_weight} ${src_test_spher_polygon_area} ${src_test_read_eddy} ${src_test_read_snapshot} ${src_test_successive_overlap} ${src_test_nearby_extr} ${src_test_max_speed_contour_ssh}) test_good_contour.f test_inside_4.f test_mean_speed.f test_spher_polyline_area.f
lib_list = GPC_F contour_531 numer_rec_95 GPC shapelib_03 netcdf95 geometry jumble netcdff fortrangis shp fortranc nr_util lib_list = GPC_F contour_531 numer_rec_95 GPC shapelib_03 netcdf95 geometry jumble netcdff fortrangis shp fortranc nr_util
...@@ -40,7 +40,7 @@ lib_list = GPC_F contour_531 numer_rec_95 GPC shapelib_03 netcdf95 geometry jumb ...@@ -40,7 +40,7 @@ lib_list = GPC_F contour_531 numer_rec_95 GPC shapelib_03 netcdf95 geometry jumb
obj_test_local_extrema := $(src_test_local_extrema:.f=.o) obj_test_local_extrema := $(src_test_local_extrema:.f=.o)
obj_test_get_1_outerm := $(src_test_get_1_outerm:.f=.o) obj_test_get_1_outerm := $(src_test_get_1_outerm:.f=.o)
obj_test_set_max_speed := $(src_test_set_max_speed:.f=.o) obj_test_set_max_speed := $(src_test_set_max_speed:.f=.o)
obj_test_get_snapshot := $(src_test_get_snapshot:.f=.o) obj_extraction_eddies := $(src_extraction_eddies:.f=.o)
obj_test_set_all_outerm := $(src_test_set_all_outerm:.f=.o) obj_test_set_all_outerm := $(src_test_set_all_outerm:.f=.o)
obj_test_weight := $(src_test_weight:.f=.o) obj_test_weight := $(src_test_weight:.f=.o)
obj_test_spher_polygon_area := $(src_test_spher_polygon_area:.f=.o) obj_test_spher_polygon_area := $(src_test_spher_polygon_area:.f=.o)
...@@ -52,7 +52,7 @@ obj_test_max_speed_contour_ssh := $(src_test_max_speed_contour_ssh:.f=.o) ...@@ -52,7 +52,7 @@ obj_test_max_speed_contour_ssh := $(src_test_max_speed_contour_ssh:.f=.o)
objects := $(sources:.f=.o) objects := $(sources:.f=.o)
execut = test_good_contour test_inside_4 test_get_1_outerm test_local_extrema test_max_speed_contour_ssh test_mean_speed test_set_max_speed test_get_snapshot test_set_all_outerm test_weight test_spher_polyline_area test_spher_polygon_area test_read_eddy test_read_snapshot test_successive_overlap test_nearby_extr execut = test_good_contour test_inside_4 test_get_1_outerm test_local_extrema test_max_speed_contour_ssh test_mean_speed test_set_max_speed extraction_eddies test_set_all_outerm test_weight test_spher_polyline_area test_spher_polygon_area test_read_eddy test_read_snapshot test_successive_overlap test_nearby_extr
# 3. Compiler-dependent part # 3. Compiler-dependent part
...@@ -71,7 +71,7 @@ test_good_contour: good_contour.o ...@@ -71,7 +71,7 @@ test_good_contour: good_contour.o
test_inside_4: inside_4.o test_inside_4: inside_4.o
test_local_extrema: ${obj_test_local_extrema} test_local_extrema: ${obj_test_local_extrema}
test_mean_speed: mean_speed.o test_mean_speed: mean_speed.o
test_get_snapshot: ${obj_test_get_snapshot} extraction_eddies: ${obj_extraction_eddies}
test_set_all_outerm: ${obj_test_set_all_outerm} test_set_all_outerm: ${obj_test_set_all_outerm}
test_weight: ${obj_test_weight} test_weight: ${obj_test_weight}
test_spher_polyline_area: spher_polyline_area.o test_spher_polyline_area: spher_polyline_area.o
......
...@@ -6,27 +6,27 @@ ...@@ -6,27 +6,27 @@
"input": "&main_nml min_amp = 0.001/\n" "input": "&main_nml min_amp = 0.001/\n"
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_3", "title": "Extraction_eddies_region_3",
"required": [["$input_dir/h_region_3.nc", "h.nc"], "required": [["$input_dir/h_region_3.nc", "h.nc"],
["$input_dir/uv_region_3.nc", "uv.nc"]], ["$input_dir/uv_region_3.nc", "uv.nc"]],
"input": "&main_nml /\n", "input": "&main_nml /\n",
"description": "Larger region, 120 x 120. Includes degenerate extrema." "description": "Larger region, 120 x 120. Includes degenerate extrema."
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_3_min", "title": "Extraction_eddies_region_3_min",
"required": [["$input_dir/h_region_3.nc", "h.nc"], "required": [["$input_dir/h_region_3.nc", "h.nc"],
["$input_dir/uv_region_3.nc", "uv.nc"]], ["$input_dir/uv_region_3.nc", "uv.nc"]],
"input": "&main_nml min_amp = 1e-3/\n", "input": "&main_nml min_amp = 1e-3/\n",
"description": "Same as Get_snapshot_region_3 except with 1 mm minimum amplitude." "description": "Same as Extraction_eddies_region_3 except with 1 mm minimum amplitude."
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_5", "title": "Extraction_eddies_region_5",
"required": [["$input_dir/h_region_5.nc", "h.nc"], "required": [["$input_dir/h_region_5.nc", "h.nc"],
["$input_dir/uv_region_5.nc", "uv.nc"]], ["$input_dir/uv_region_5.nc", "uv.nc"]],
"input": "&main_nml min_amp = 1e-3/\n", "input": "&main_nml min_amp = 1e-3/\n",
"description": "Same as Get_snapshot_region_4 with larger domain." "description": "Same as Extraction_eddies_region_4 with larger domain."
} }
] ]
...@@ -137,30 +137,30 @@ ...@@ -137,30 +137,30 @@
"input": "&MAIN_NML IND_TARG_EXTR=19,11 /\n" "input": "&MAIN_NML IND_TARG_EXTR=19,11 /\n"
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_1", "title": "Extraction_eddies_region_1",
"required": [["$input_dir/h_region_1.nc", "h.nc"], "required": [["$input_dir/h_region_1.nc", "h.nc"],
["$input_dir/uv_region_1.nc", "uv.nc"]], ["$input_dir/uv_region_1.nc", "uv.nc"]],
"input": "&main_nml /\n" "input": "&main_nml /\n"
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_1_noise", "title": "Extraction_eddies_region_1_noise",
"required": [["$input_dir/h_region_1.nc", "h.nc"], "required": [["$input_dir/h_region_1.nc", "h.nc"],
["$input_dir/uv_region_1.nc", "uv.nc"]], ["$input_dir/uv_region_1.nc", "uv.nc"]],
"input": "&main_nml min_amp = 1e-3/\n", "input": "&main_nml min_amp = 1e-3/\n",
"description" : "Same as Get_snapshot_region_1 but with non-zero minimal amplitude." "description" : "Same as Extraction_eddies_region_1 but with non-zero minimal amplitude."
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_2", "title": "Extraction_eddies_region_2",
"required": [["$input_dir/h_region_2.nc", "h.nc"], "required": [["$input_dir/h_region_2.nc", "h.nc"],
["$input_dir/uv_region_2.nc", "uv.nc"]], ["$input_dir/uv_region_2.nc", "uv.nc"]],
"input": "&main_nml /\n" "input": "&main_nml /\n"
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_2_noise", "title": "Extraction_eddies_region_2_noise",
"required": [["$input_dir/h_region_2.nc", "h.nc"], "required": [["$input_dir/h_region_2.nc", "h.nc"],
["$input_dir/uv_region_2.nc", "uv.nc"]], ["$input_dir/uv_region_2.nc", "uv.nc"]],
"input": "&main_nml min_amp = 1e-3/\n" "input": "&main_nml min_amp = 1e-3/\n"
...@@ -178,8 +178,8 @@ ...@@ -178,8 +178,8 @@
"stdin_filename": "$input_dir/inside_4_false_nml.txt" "stdin_filename": "$input_dir/inside_4_false_nml.txt"
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_region_4", "title": "Extraction_eddies_region_4",
"required": ["$input_dir/Region_4/h.nc", "$input_dir/Region_4/uv.nc"], "required": ["$input_dir/Region_4/h.nc", "$input_dir/Region_4/uv.nc"],
"input": "&main_nml min_amp = 1e-3/\n", "input": "&main_nml min_amp = 1e-3/\n",
"description": "Part of the domain has missing values." "description": "Part of the domain has missing values."
...@@ -294,15 +294,15 @@ ...@@ -294,15 +294,15 @@
"required": "required":
[ [
[ [
"$tests_old_dir/Get_snapshot_region_1_noise/extremum_1.shp", "$tests_old_dir/Extraction_eddies_region_1_noise/extremum_1.shp",
"extremum.shp" "extremum.shp"
], ],
[ [
"$tests_old_dir/Get_snapshot_region_1_noise/extremum_1.shx", "$tests_old_dir/Extraction_eddies_region_1_noise/extremum_1.shx",
"extremum.shx" "extremum.shx"
], ],
[ [
"$tests_old_dir/Get_snapshot_region_1_noise/extremum_1.dbf", "$tests_old_dir/Extraction_eddies_region_1_noise/extremum_1.dbf",
"extremum.dbf" "extremum.dbf"
], ],
[ [
...@@ -317,9 +317,9 @@ ...@@ -317,9 +317,9 @@
"description": "Same as Successive_overlap, but with larger domain: region 5 instead of region 4.", "description": "Same as Successive_overlap, but with larger domain: region 5 instead of region 4.",
"required": "required":
[ [
"$tests_old_dir/Get_snapshot_region_5/extremum_1.*", "$tests_old_dir/Extraction_eddies_region_5/extremum_1.*",
"$tests_old_dir/Get_snapshot_region_5/max_speed_contour_1.*", "$tests_old_dir/Extraction_eddies_region_5/max_speed_contour_1.*",
"$tests_old_dir/Get_snapshot_region_5/outermost_contour_1.*" "$tests_old_dir/Extraction_eddies_region_5/outermost_contour_1.*"
], ],
"stdin_filename": "$input_dir/successive_overlap_region_5_nml.txt" "stdin_filename": "$input_dir/successive_overlap_region_5_nml.txt"
}, },
...@@ -345,8 +345,8 @@ ...@@ -345,8 +345,8 @@
"description": "test_set_all_outerm with periodicity." "description": "test_set_all_outerm with periodicity."
}, },
{ {
"args": "$compil_prod_dir/test_get_snapshot", "args": "$compil_prod_dir/extraction_eddies",
"title": "Get_snapshot_periodic", "title": "Extraction_eddies_periodic",
"required": [["$input_dir/h_2006_01_01_coarse.nc", "h.nc"], "required": [["$input_dir/h_2006_01_01_coarse.nc", "h.nc"],
["$input_dir/uv_2006_01_01_coarse.nc", "uv.nc"]], ["$input_dir/uv_2006_01_01_coarse.nc", "uv.nc"]],
"input": "&main_nml MAX_RADIUS = 4, 4/\n", "input": "&main_nml MAX_RADIUS = 4, 4/\n",
......
extraction_eddies.o : write_eddy.o set_max_speed.o set_all_outerm.o nearby_extr.o init_shapefiles.o get_var.o derived_types.o
get_1_outerm.o : spher_polyline_area.o good_contour.o derived_types.o get_1_outerm.o : spher_polyline_area.o good_contour.o derived_types.o
max_speed_contour_ssh.o : derived_types.o max_speed_contour_ssh.o : derived_types.o
nearby_extr.o : derived_types.o nearby_extr.o : derived_types.o
...@@ -8,7 +9,6 @@ set_max_speed.o : spher_polyline_area.o mean_speed.o max_speed_contour_ssh.o ins ...@@ -8,7 +9,6 @@ set_max_speed.o : spher_polyline_area.o mean_speed.o max_speed_contour_ssh.o ins
spher_polygon_area.o : spher_polyline_area.o spher_polygon_area.o : spher_polyline_area.o
successive_overlap.o : weight.o spher_polyline_area.o spher_polygon_area.o derived_types.o successive_overlap.o : weight.o spher_polyline_area.o spher_polygon_area.o derived_types.o
test_get_1_outerm.o : get_1_outerm.o derived_types.o test_get_1_outerm.o : get_1_outerm.o derived_types.o
test_get_snapshot.o : write_eddy.o set_max_speed.o set_all_outerm.o nearby_extr.o init_shapefiles.o get_var.o derived_types.o
test_local_extrema.o : local_extrema.o test_local_extrema.o : local_extrema.o
test_max_speed_contour_ssh.o : max_speed_contour_ssh.o get_var.o test_max_speed_contour_ssh.o : max_speed_contour_ssh.o get_var.o
test_nearby_extr.o : nearby_extr.o derived_types.o test_nearby_extr.o : nearby_extr.o derived_types.o
......
program test_get_snapshot program extraction_eddies
use, intrinsic:: ieee_arithmetic, only: IEEE_SUPPORT_DATATYPE, & use, intrinsic:: ieee_arithmetic, only: IEEE_SUPPORT_DATATYPE, &
ieee_support_nan, ieee_value, IEEE_QUIET_NAN ieee_support_nan, ieee_value, IEEE_QUIET_NAN
...@@ -72,7 +72,7 @@ program test_get_snapshot ...@@ -72,7 +72,7 @@ program test_get_snapshot
!-------------------------------------------------------------- !--------------------------------------------------------------
call assert(IEEE_SUPPORT_DATATYPE(0.), ieee_support_nan(0.), & call assert(IEEE_SUPPORT_DATATYPE(0.), ieee_support_nan(0.), &
"test_get_snapshot: not enough IEEE support") "extraction_eddies: not enough IEEE support")
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."
...@@ -94,7 +94,7 @@ program test_get_snapshot ...@@ -94,7 +94,7 @@ program test_get_snapshot
call nf95_close(ncid) call nf95_close(ncid)
call assert(lon_max > lon_min .and. lat_max > lat_min, & call assert(lon_max > lon_min .and. lat_max > lat_min, &
"test_get_snapshot coordinate order") "extraction_eddies coordinate order")
step = [(lon_max - lon_min) / (nlon - 1), (lat_max - lat_min) / (nlat - 1)] & step = [(lon_max - lon_min) / (nlon - 1), (lat_max - lat_min) / (nlat - 1)] &
* deg_to_rad * deg_to_rad
...@@ -102,7 +102,7 @@ program test_get_snapshot ...@@ -102,7 +102,7 @@ program test_get_snapshot
! "periodic" must be consistent with the values of step(1) and nlon: ! "periodic" must be consistent with the values of step(1) and nlon:
periodic = nint(twopi / step(1)) == nlon periodic = nint(twopi / step(1)) == nlon
print *, "periodic = ", periodic print *, "periodic = ", periodic
call assert(2 * max_radius(1) * step(1) < pi, "test_get_snapshot max_radius") call assert(2 * max_radius(1) * step(1) < pi, "extraction_eddies max_radius")
copy = merge(max_radius(1), 0, periodic) copy = merge(max_radius(1), 0, periodic)
allocate(ssh(1 - copy:nlon + copy, nlat), u(1 - copy:nlon + copy, nlat), & allocate(ssh(1 - copy:nlon + copy, nlat), u(1 - copy:nlon + copy, nlat), &
...@@ -187,4 +187,4 @@ program test_get_snapshot ...@@ -187,4 +187,4 @@ program test_get_snapshot
CALL shpclose(hshp_max_speed) CALL shpclose(hshp_max_speed)
print *, 'Created shapefile "max_speed_contour_1".' print *, 'Created shapefile "max_speed_contour_1".'
end program test_get_snapshot end program extraction_eddies
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment