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

Pass `extr%coord_proj` to `get_1_outerm`

Pass `extr%coord_proj` instead of `extr%coord` to `get_1_outerm`,
avoiding a repeated computation of `extr%coord_proj`.
parent eaf09df5
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ 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, &
e%extr%coord, innermost_level, outside_points, ssh, corner, step)
real(ind_targ_extr), innermost_level, outside_points, ssh, corner, step)
if (e%out_cont%closed) then
e%extr%ssh = ssh(ind_targ_extr(1), ind_targ_extr(2))
......
......@@ -5,8 +5,8 @@ module get_1_outerm_m
contains
subroutine get_1_outerm(out_cont, cont_list, cont_list_proj, n_cont, &
cyclone, extr_coord, innermost_level_2, outside_points, ssh, corner, &
step)
cyclone, extr_coord_proj, innermost_level_2, outside_points, ssh, &
corner, step)
! This procedure gets one outermost good contour with sufficient
! area, if it can find one. If the procedure cannot find an
......@@ -80,7 +80,9 @@ contains
! number of good contours found and stored, 0 <= n_cont <= n_max_cont - 1
logical, intent(in):: cyclone
real, intent(in):: extr_coord(:) ! (2) longitude and latitude, in rad
real, intent(in):: extr_coord_proj(:) ! (2)
! coordinates of extremum in projection space
real, intent(in):: innermost_level_2
! ssh level of the innermost contour to consider around the target
......@@ -106,13 +108,12 @@ contains
logical mask(size(ssh, 1), size(ssh, 2))
integer n_max_cont ! >= 3
integer i
real corner_proj(2), extr_coord_proj(2)
real corner_proj(2)
real outside_points_proj(2, size(outside_points, 2))
!-----------------------------------------------------------------
corner_proj = (corner - corner_whole) / step + 1.
extr_coord_proj = (extr_coord - 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
......
......@@ -96,7 +96,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, &
extr%coord, innermost_level_2, outside_points, ssh, corner, step)
real(extr%coord_proj), innermost_level_2, outside_points, ssh, &
corner, step)
! Done with outermost contour, now let us take care of the
! max-speed contour.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment