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

We now allow the order of extrema to have an impact in procedure

set_all_outerm: the value of component suff_amp is modified inside the
first batch of get_1_outerm.
parent 0c6f71e9
No related branches found
No related tags found
No related merge requests found
......@@ -113,20 +113,13 @@ contains
do l = 1, s%number_vis_eddies
i = sorted_extr(l)
if (flat_extr(i)) &
s%list_vis(i)%out_cont = get_1_outerm(s%list_vis(i)%cyclone, &
s%list_vis(i)%coord_extr, innermost_level(i), &
nearby_extr(s%extr_map(llc(1, i):urc(1, i), &
llc(2, i):urc(2, i)), s%list_vis, i), &
ssh(llc(1, i):urc(1, i), llc(2, i):urc(2, i)), &
corner_window(:, i), step)
end do
! We must modify s%list_vis(i)%suff_amp in this loop, separate
! from the previous loop, so we do not influence the batch of
! get_1_outerm.
do i = 1, s%number_vis_eddies
if (flat_extr(i)) then
s%list_vis(i)%out_cont = get_1_outerm(s%list_vis(i)%cyclone, &
s%list_vis(i)%coord_extr, innermost_level(i), &
nearby_extr(s%extr_map(llc(1, i):urc(1, i), &
llc(2, i):urc(2, i)), s%list_vis, i), &
ssh(llc(1, i):urc(1, i), llc(2, i):urc(2, i)), &
corner_window(:, i), step)
if (s%list_vis(i)%out_cont%n_points == 0) then
s%list_vis(i)%suff_amp = .false.
else
......@@ -142,33 +135,33 @@ contains
if (flat_extr(i) .and. s%list_vis(i)%suff_amp) then
associate (extr_map => s%extr_map(llc(1, i):urc(1, i), &
llc(2, i):urc(2, i)))
selection = pack(extr_map, extr_map /= 0)
end associate
noise_around(i) = .not. all(s%list_vis(selection)%suff_amp)
end if
end do
end if
s%list_vis%twice = flat_extr .and. s%list_vis%suff_amp .and. noise_around
do l = 1, s%number_vis_eddies
i = sorted_extr(l)
if (s%list_vis(i)%suff_amp .and. noise_around(i) &
.or. .not. flat_extr(i)) &
s%list_vis(i)%out_cont = get_1_outerm(s%list_vis(i)%cyclone, &
s%list_vis(i)%coord_extr, innermost_level(i), &
nearby_extr(s%extr_map(llc(1, i):urc(1, i), &
llc(2, i):urc(2, i)), s%list_vis, i), &
ssh(llc(1, i):urc(1, i), llc(2, i):urc(2, i)), &
corner_window(:, i), step)
end do
! We must modify s%list_vis(i)%suff_amp in this loop, separate from
! the previous loop, so we do not influence the batch of
! get_1_outerm.
forall (i = 1:s%number_vis_eddies, .not. flat_extr(i)) &
s%list_vis(i)%suff_amp = s%list_vis(i)%out_cont%n_points /= 0
end subroutine set_all_outerm
selection = pack(extr_map, extr_map /= 0)
end associate
noise_around(i) = .not. all(s%list_vis(selection)%suff_amp)
end if
end do
end if
s%list_vis%twice = flat_extr .and. s%list_vis%suff_amp .and. noise_around
do l = 1, s%number_vis_eddies
i = sorted_extr(l)
if (s%list_vis(i)%suff_amp .and. noise_around(i) &
.or. .not. flat_extr(i)) &
s%list_vis(i)%out_cont = get_1_outerm(s%list_vis(i)%cyclone, &
s%list_vis(i)%coord_extr, innermost_level(i), &
nearby_extr(s%extr_map(llc(1, i):urc(1, i), &
llc(2, i):urc(2, i)), s%list_vis, i), &
ssh(llc(1, i):urc(1, i), llc(2, i):urc(2, i)), &
corner_window(:, i), step)
end do
! We must modify s%list_vis(i)%suff_amp in this loop, separate from
! the previous loop, so we do not influence the batch of
! get_1_outerm.
forall (i = 1:s%number_vis_eddies, .not. flat_extr(i)) &
s%list_vis(i)%suff_amp = s%list_vis(i)%out_cont%n_points /= 0
end subroutine set_all_outerm
end module set_all_outerm_m
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