diff --git a/Inst_eddies/Tests/test_get_1_outerm.f90 b/Inst_eddies/Tests/test_get_1_outerm.f90 index 049d3a381f84a632f27603db1bf083384d3c7597..9057bc3704bf9d64a01715dbe102f164f96f0d2f 100644 --- a/Inst_eddies/Tests/test_get_1_outerm.f90 +++ b/Inst_eddies/Tests/test_get_1_outerm.f90 @@ -94,7 +94,8 @@ program test_get_1_outerm e%extr%coord_proj = ind_targ_extr e%extr%coord = corner + (ind_targ_extr - 1) * step call get_1_outerm(e%out_cont, cont_list, cont_list_proj, n_cont, cyclone, & - real(ind_targ_extr), innermost_level, outside_points, ssh, corner, step) + real(ind_targ_extr), innermost_level, outside_points, ssh, & + corner_proj = [1., 1.], step = step) if (e%out_cont%closed) then e%extr%ssh = ssh(ind_targ_extr(1), ind_targ_extr(2)) diff --git a/Inst_eddies/get_1_outerm.f90 b/Inst_eddies/get_1_outerm.f90 index ce73601d0d1d0475be60f18dc284bbc7a682a59c..f3a7439938a32d96d546e2892890fd6d05be67b5 100644 --- a/Inst_eddies/get_1_outerm.f90 +++ b/Inst_eddies/get_1_outerm.f90 @@ -6,7 +6,7 @@ contains subroutine get_1_outerm(out_cont, cont_list, cont_list_proj, n_cont, & cyclone, extr_coord_proj, innermost_level_2, outside_points, ssh, & - corner, step) + corner_proj, step) ! This procedure gets one outermost good contour with sufficient ! area, if it can find one. If the procedure cannot find an @@ -96,8 +96,8 @@ contains real, intent(in):: ssh(:, :) ! in m - real, intent(in):: corner(:) ! (2) - ! Longitude and latitude corresponding to ssh(1,1), in rad. A + real, intent(in):: corner_proj(:) ! (2) + ! Coordinates in projection space corresponding to ssh(1,1). A ! priori, this is not the corner of the grid of the NetCDF file. real, intent(in):: step(:) ! (2) @@ -109,12 +109,10 @@ contains logical mask(size(ssh, 1), size(ssh, 2)) integer n_max_cont ! >= 3 integer i - real corner_proj(2) real outside_points_proj(2, size(outside_points, 2)) !----------------------------------------------------------------- - corner_proj = (corner - corner_whole) / step + 1. outside_points_proj = convert_to_ind(outside_points, corner_whole, step) n_max_cont = size(cont_list_proj) n_cont = 0 diff --git a/Inst_eddies/set_contours.f90 b/Inst_eddies/set_contours.f90 index ec392569443198d460732a32166ad8fb28b40ac4..bab8c70407e91ce60da5e87b0eac0840b60b938f 100644 --- a/Inst_eddies/set_contours.f90 +++ b/Inst_eddies/set_contours.f90 @@ -96,7 +96,7 @@ contains call get_1_outerm(out_cont, cont_list, cont_list_proj, n_cont, cyclone, & real(extr%coord_proj), innermost_level_2, outside_points, ssh, & - corner, step) + (corner - corner_whole) / step + 1., step) ! Done with outermost contour, now let us take care of the ! max-speed contour.