diff --git a/Inst_eddies/Tests/test_set_max_speed.f90 b/Inst_eddies/Tests/test_set_max_speed.f90 index 134a3908375ad7419eb9dea16d1130d3940fd760..52912cc8b3056e952526d59ef9fe1cccdccd8a1e 100644 --- a/Inst_eddies/Tests/test_set_max_speed.f90 +++ b/Inst_eddies/Tests/test_set_max_speed.f90 @@ -138,7 +138,8 @@ program test_set_max_speed call set_max_speed(e%speed_cont, e%max_speed, cont_list, cont_list_proj, & n_cont, e%extr%coord, real(e%extr%coord_proj), & ssh(llc(1):urc(1), llc(2):urc(2)), u(llc(1):urc(1), llc(2):urc(2)), & - v(llc(1):urc(1), llc(2):urc(2)), corner_window, step) + v(llc(1):urc(1), llc(2):urc(2)), & + (corner_window - corner) / step + 1., step) call close_cont_list call shpc_create(hshpc, shpc_dir = "SHPC", cyclone = cyclone, slice = 0, & grid_lon_lat = .true.) diff --git a/Inst_eddies/set_contours.f90 b/Inst_eddies/set_contours.f90 index d1515dc2e5653157e21fcd0dd5b83c18b7d56757..edd2303835ad7a32be4702c2a26a0a3d7a631a98 100644 --- a/Inst_eddies/set_contours.f90 +++ b/Inst_eddies/set_contours.f90 @@ -120,7 +120,8 @@ contains n_cont, extr%coord, real(extr%coord_proj), & ssh(llc(1):urc(1), llc(2):urc(2)), & u(llc(1):urc(1), llc(2):urc(2)), & - v(llc(1):urc(1), llc(2):urc(2)), corner_window, step) + v(llc(1):urc(1), llc(2):urc(2)), & + (corner_window - corner_whole) / step + 1., step) end if end subroutine set_contours diff --git a/Inst_eddies/set_max_speed.f90 b/Inst_eddies/set_max_speed.f90 index fa78615ca8353bfde7cf2a5bde2f353aabee4949..1c20bf56e9896e6f0139382de9a844959e79d42e 100644 --- a/Inst_eddies/set_max_speed.f90 +++ b/Inst_eddies/set_max_speed.f90 @@ -5,7 +5,7 @@ module set_max_speed_m contains subroutine set_max_speed(speed_cont, max_speed, cont_list, cont_list_proj, & - n_cont, extr_coord, extr_coord_proj, ssh, u, v, corner, step) + n_cont, extr_coord, extr_coord_proj, ssh, u, v, corner_proj, step) ! This procedure defines speed_cont and max_speed. On return, ! speed_cont may be a null ssh contour and max_speed may be set to @@ -79,9 +79,9 @@ contains ! The domain should be the bounding box of out_cont, because we do ! not exclude other extrema. - real, intent(in):: corner(:) ! (2) - ! Longitude and latitude of the lower left corner of the grid, - ! corresponding to ssh(1, 1), in rad. A priori, this is not the + real, intent(in):: corner_proj(:) ! (2) + ! Coordinates in projection plane of the lower left corner of the + ! grid, corresponding to ssh(1, 1). A priori, this is not the ! corner of the grid of the NetCDF file. real, intent(in):: step(:) ! (2) longitude and latitude steps, in rad @@ -89,11 +89,9 @@ contains ! Local: real, allocatable:: speed(:) ! (n_cont) speed on the contour integer i, i_outer, ishape - real corner_proj(2) !--------------------------------------------------------------- - corner_proj = (corner - corner_whole) / step + 1. i_outer = n_cont if (n_cont >= 2) call complete_ssh(cont_list_proj%ssh, n_cont)