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

Preparing to move the computation of nearby_extr out of procedure

set_max_speed. Abandon the computation with pack_indices, this was
supposed to give the same result than the computation with argwhere
but be faster if not any(extr_map) < 0. I was not sure of that. I
abandon that because I want to eventually remove the coding of
sufficient amplitude in extr_map.
parent 37524353
No related branches found
No related tags found
No related merge requests found
...@@ -10,12 +10,14 @@ contains ...@@ -10,12 +10,14 @@ contains
use, intrinsic:: IEEE_ARITHMETIC, only: IEEE_IS_NAN use, intrinsic:: IEEE_ARITHMETIC, only: IEEE_IS_NAN
! Lbraries:
use contour_531, only: convert_to_reg_coord, convert_to_ind, null_polyline use contour_531, only: convert_to_reg_coord, convert_to_ind, null_polyline
use derived_types, only: eddy, null_ssh_contour
use geometry, only: polygon_point_dist_2d use geometry, only: polygon_point_dist_2d
use jumble, only: argwhere
use derived_types, only: eddy, null_ssh_contour
use good_contour_m, only: good_contour use good_contour_m, only: good_contour
use inside_4_m, only: inside_4 use inside_4_m, only: inside_4
use jumble, only: pack_indices, argwhere
use max_speed_contour_ssh_m, only: max_speed_contour_ssh use max_speed_contour_ssh_m, only: max_speed_contour_ssh
use mean_speed_m, only: mean_speed use mean_speed_m, only: mean_speed
use spherical_polyline_area_m, only: spherical_polyline_area use spherical_polyline_area_m, only: spherical_polyline_area
...@@ -73,16 +75,8 @@ contains ...@@ -73,16 +75,8 @@ contains
e%speed_cont%ssh = max_speed_contour_ssh(ssh, u, v, ind_targ_extr, & e%speed_cont%ssh = max_speed_contour_ssh(ssh, u, v, ind_targ_extr, &
e%radius4) e%radius4)
i = extr_map(ind_targ_extr(1), ind_targ_extr(2)) i = extr_map(ind_targ_extr(1), ind_targ_extr(2))
nearby_extr = convert_to_reg_coord(argwhere(extr_map > 0 &
if (any(extr_map < 0)) then .and. extr_map /= i), corner, step)
! Noise around
nearby_extr = convert_to_reg_coord(argwhere(extr_map > 0 &
.and. extr_map /= i), corner, step)
else
nearby_extr = convert_to_reg_coord(pack_indices(extr_map, &
excluded = [0, i]), corner, step)
end if
e%speed_cont%polyline = good_contour(corner, step, ssh, & e%speed_cont%polyline = good_contour(corner, step, ssh, &
e%speed_cont%ssh, e%coord_extr, nearby_extr) e%speed_cont%ssh, e%coord_extr, nearby_extr)
e%max_speed = mean_speed(u, v, e%speed_cont%polyline, e%coord_extr, & e%max_speed = mean_speed(u, v, e%speed_cont%polyline, e%coord_extr, &
......
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