diff --git a/Inst_eddies/Tests/test_get_1_outerm.f90 b/Inst_eddies/Tests/test_get_1_outerm.f90 index 434f7aa24ac75e0367a08f456d136c35b149f26a..be24d88fe44f7dac2da860dcb3276e482fabe5cd 100644 --- a/Inst_eddies/Tests/test_get_1_outerm.f90 +++ b/Inst_eddies/Tests/test_get_1_outerm.f90 @@ -1,7 +1,7 @@ program test_get_1_outerm ! Libraries: - use contour_531, only: polyline + use contour_531, only: polyline, convert_to_ind use jumble, only: csvread, deg_to_rad, rad_to_deg use shapelib, only: shpfileobject, ftdouble, shpt_polygon, shpclose use shapelib_03, only: shp_create_03, dbf_add_field_03, & @@ -94,8 +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 = [1., 1.], step = step) + real(ind_targ_extr), innermost_level, convert_to_ind(outside_points, & + corner, step), ssh, corner = [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 06e5f555b02669fb37467cac5c6e2bebb9cefd85..8adb48cccba5ffdde9c386cf6335eef5095b3dea 100644 --- a/Inst_eddies/get_1_outerm.f90 +++ b/Inst_eddies/get_1_outerm.f90 @@ -5,7 +5,7 @@ module get_1_outerm_m contains subroutine get_1_outerm(out_cont, cont_list, cont_list_proj, n_cont, & - cyclone, extr_coord_proj, innermost_level_2, outside_points, ssh, & + cyclone, extr_coord_proj, innermost_level_2, outside_points_proj, ssh, & corner, step) ! This procedure gets one outermost good contour with sufficient @@ -43,7 +43,7 @@ contains ! 360 degrees. ! Libraries: - use contour_531, only: polyline, convert_to_reg_coord, convert_to_ind + use contour_531, only: polyline, convert_to_reg_coord use jumble, only: assert use ccw_orient_m, only: ccw_orient @@ -90,9 +90,9 @@ contains ! extremum, in m. Assume: innermost_level_2 < extremum for a ! maximum, > extremum for a minimum. - real, intent(in):: outside_points(:, :) ! (2, :) longitude and - ! latitude, in rad, of all the significant extrema, except the - ! target extremum + real, intent(in):: outside_points_proj(:, :) ! (2, :) + ! coordinates in projection space of all the significant extrema, + ! except the target extremum real, intent(in):: ssh(:, :) ! in m @@ -109,11 +109,9 @@ contains logical mask(size(ssh, 1), size(ssh, 2)) integer n_max_cont ! >= 3 integer i - real outside_points_proj(2, size(outside_points, 2)) !----------------------------------------------------------------- - outside_points_proj = convert_to_ind(outside_points, corner_whole, step) n_max_cont = size(cont_list_proj) n_cont = 0 cont_list_proj(1)%polyline = good_contour(corner, ssh, innermost_level_2, & diff --git a/Inst_eddies/set_contours.f90 b/Inst_eddies/set_contours.f90 index 1a7ae512539f54cff63522df783b5f722491212e..696bf84d216f4668a6992b5ac3ff2293c6d4763b 100644 --- a/Inst_eddies/set_contours.f90 +++ b/Inst_eddies/set_contours.f90 @@ -10,11 +10,12 @@ contains ! This procedure sets contours in an eddy. ! Libraries: - use contour_531, only: polyline + use contour_531, only: polyline, convert_to_ind use config_m, only: min_amp use derived_types, only: extremum, ssh_contour use get_1_outerm_m, only: get_1_outerm + use input_ssh_m, only: corner_whole => corner use set_max_speed_m, only: set_max_speed type(ssh_contour), intent(out):: out_cont ! outermost contour @@ -94,7 +95,8 @@ contains innermost_level, abs(extr%ssh - innermost_level) < min_amp) call get_1_outerm(out_cont, cont_list, cont_list_proj, n_cont, cyclone, & - real(extr%coord_proj), innermost_level_2, outside_points, ssh, & + real(extr%coord_proj), innermost_level_2, & + convert_to_ind(outside_points, corner_whole, step), ssh, & real(corner), step) ! Done with outermost contour, now let us take care of the