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

Create intermediary variable `delta_long`

Preparing for more complex association criterium.
parent bdd79850
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ contains
integer l, n_select
type(polyline) polyline_1, polyline_2
logical assoc_eddies ! association between eddies
real delta_long ! difference in longitude, in rad
integer, allocatable:: selection(:)
! identifying numbers of a selection of extrema
......@@ -91,11 +92,12 @@ contains
polyline_2 = e2%out_cont%polyline
end if
delta_long = e1%extr%coord(1) - e2%extr%coord(1)
! Shift the longitudes of polyline_2 to values close to the
! longitude of extremum i1:
polyline_2%points(1, :) = polyline_2%points(1, :) &
+ floor((e1%extr%coord(1) - e2%extr%coord(1)) / twopi &
+ 0.5) * twopi
+ floor(delta_long / twopi + 0.5) * twopi
assoc_eddies = inters_lines(polyline_1, polyline_2, &
min_inters_speed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment