diff --git a/Inst_eddies/Tests/short_tests.json b/Inst_eddies/Tests/short_tests.json index bdf87038e9ffef413bc112615f340533eca93956..cf3903edbdec25177703568911e1be9110a59843 100644 --- a/Inst_eddies/Tests/short_tests.json +++ b/Inst_eddies/Tests/short_tests.json @@ -194,7 +194,8 @@ "$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc", "$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc", "$tests_old_dir/Get_1_outerm/SHPC", - "$tests_old_dir/Get_1_outerm/cont_list.shp" + "$tests_old_dir/Get_1_outerm/cont_list.shp", + "$tests_old_dir/Get_1_outerm/cont_list_proj.shp" ] ], "input": "t\n", @@ -209,7 +210,8 @@ "$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc", "$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc", "$tests_old_dir/Get_1_outerm_noise_2_8/SHPC", - "$tests_old_dir/Get_1_outerm_noise_2_8/cont_list.shp" + "$tests_old_dir/Get_1_outerm_noise_2_8/cont_list.shp", + "$tests_old_dir/Get_1_outerm_noise_2_8/cont_list_proj.shp" ] ], "input": "t\n", @@ -245,7 +247,8 @@ "$src_dir/Inst_eddies/Tests/Input/degenerated_SSH.nc", "$src_dir/Inst_eddies/Tests/Input/degenerated_SSH.nc", "$tests_old_dir/SHPC_degenerate/SHPC", - "$tests_old_dir/SHPC_degenerate/cont_list.shp" + "$tests_old_dir/SHPC_degenerate/cont_list.shp", + "$tests_old_dir/SHPC_degenerate/cont_list_proj.shp" ] ], "input": "f\n", diff --git a/Inst_eddies/Tests/test_set_max_speed.f90 b/Inst_eddies/Tests/test_set_max_speed.f90 index 8a3ccdc1486eff1216277e9084b276325bacd696..72d53eb753b55af549cb1b9bf2c0a69cbb3fd40c 100644 --- a/Inst_eddies/Tests/test_set_max_speed.f90 +++ b/Inst_eddies/Tests/test_set_max_speed.f90 @@ -22,7 +22,7 @@ program test_set_max_speed logical cyclone logical periodic ! grid is periodic in longitude - integer nlon, nlat, d, eddy_index, n_cont, i, j, ishape + integer nlon, nlat, d, eddy_index, n_cont, i, ishape real, allocatable:: ssh(:, :) ! (nlon, nlat) sea-surface height, in m real, allocatable:: u(:, :), v(:, :) ! (nlon, nlat) wind, in m s-1 type(eddy) e @@ -109,14 +109,25 @@ program test_set_max_speed cont_list(i)%points = cont_list(i)%points * deg_to_rad end if + end do + + call shpclose(hshp) + call get_command_arg_dyn(5, path, & + "Required 5th argument: cont-list-proj-shapefile") + call shp_open_03(hshp, path, "rb") + + do i = 1, n_cont + ishape = i - 1 + call shp_read_pol(p, hshp, ishape) + + if (p%nparts == 0) then + cont_list_proj(i)%polyline = null_polyline() + else + cont_list_proj(i)%polyline = p%part(1) + end if + call dbf_read_attribute_03(cont_list_proj(i)%ssh, hshp, ifield = 0, & ishape = ishape) - cont_list_proj(i)%n_points = cont_list(i)%n_points - cont_list_proj(i)%closed = cont_list(i)%closed - allocate(cont_list_proj(i)%points(2, cont_list_proj(i)%n_points)) - forall (j = 1:cont_list_proj(i)%n_points) & - cont_list_proj(i)%points(:, j) = (cont_list(i)%points(:, j) & - - corner) / step + 1. end do call shpclose(hshp)