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

If average speed on outermost contour is greater than on contour at

level max_speed_contour_ssh, take outermost contour as max-speed
contour.
parent 86260d9f
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,8 @@ contains ...@@ -19,8 +19,8 @@ contains
use spherical_polygon_area_m, only: spherical_polygon_area use spherical_polygon_area_m, only: spherical_polygon_area
type(eddy), intent(inout):: e type(eddy), intent(inout):: e
! e%outermost_contour%points, e%outermost_contour%ssh, e%cyclone, ! e%outermost_contour, e%cyclone, e%ssh_extremum and e%coord_extr
! e%ssh_extremum and e%coord_extr should be defined on input ! should be defined on input
integer, intent(in):: ind_targ_extr(:) ! (2) indices of the target extremum integer, intent(in):: ind_targ_extr(:) ! (2) indices of the target extremum
integer, intent(in):: extr_map(:, :) integer, intent(in):: extr_map(:, :)
...@@ -48,6 +48,8 @@ contains ...@@ -48,6 +48,8 @@ contains
real, allocatable:: nearby_extr(:, :) ! (2, :) longitude and real, allocatable:: nearby_extr(:, :) ! (2, :) longitude and
! latitude, in rad, of all the extrema except the target extremum ! latitude, in rad, of all the extrema except the target extremum
real speed_outerm ! speed on the outermost contour
!--------------------------------------------------------------- !---------------------------------------------------------------
noise_around = any(extr_map < 0) noise_around = any(extr_map < 0)
...@@ -83,10 +85,20 @@ contains ...@@ -83,10 +85,20 @@ contains
e%max_speed_contour%polyline = good_contour(corner, step, ssh, & e%max_speed_contour%polyline = good_contour(corner, step, ssh, &
e%max_speed_contour%ssh, e%coord_extr, nearby_extr) e%max_speed_contour%ssh, e%coord_extr, nearby_extr)
e%max_speed_contour%area &
= spherical_polygon_area(e%max_speed_contour%polyline)
e%max_speed = mean_speed(u, v, e%max_speed_contour%polyline, & e%max_speed = mean_speed(u, v, e%max_speed_contour%polyline, &
e%coord_extr, corner, step) e%coord_extr, corner, step)
! Might the outermost contour be a better choice?
speed_outerm = mean_speed(u, v, e%outermost_contour%polyline, &
e%coord_extr, corner, step)
if (abs(speed_outerm) > abs(e%max_speed)) then
! Abandon the contour coming from max_speed_contour_ssh:
e%max_speed_contour = e%outermost_contour
e%max_speed = speed_outerm
else
e%max_speed_contour%area &
= spherical_polygon_area(e%max_speed_contour%polyline)
end if
end if end if
end subroutine set_max_speed end subroutine set_max_speed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment