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

Compute llc and urc from `cont_list_proj`

Instead of from `out_cont`.
parent 58d40aa4
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ program test_set_max_speed
! ssh, u, v.
! Libraries:
use contour_531, only: convert_to_ind, null_polyline, polyline
use contour_531, only: null_polyline, polyline
use gpc_f, only: shp_read_pol, polygon
use jumble, only: get_command_arg_dyn, assert, deg_to_rad
use shapelib, only: shpfileobject, shpclose
......@@ -125,12 +125,8 @@ program test_set_max_speed
call shpclose(hshp)
! Restrict the field to the outermost contour:
llc = floor(convert_to_ind(minval(e%out_cont%points, dim = 2), &
corner, step))
urc = ceiling(convert_to_ind(maxval(e%out_cont%points, dim = 2), &
corner, step))
llc = floor(minval(cont_list_proj(n_cont)%points, dim = 2))
urc = ceiling(maxval(cont_list_proj(n_cont)%points, dim = 2))
! Should have no effect except because of roundup error:
urc(2) = min(urc(2), nlat)
......
......@@ -10,11 +10,12 @@ contains
! This procedure sets contours in an eddy.
! Libraries:
use contour_531, only: convert_to_ind, polyline
use contour_531, only: polyline
use config_m, only: min_amp
use derived_types, only: extremum, ssh_contour
use get_1_outerm_m, only: get_1_outerm
use input_ssh_m, only: corner_whole => corner
use set_max_speed_m, only: set_max_speed
type(ssh_contour), intent(out):: out_cont ! outermost contour
......@@ -101,10 +102,10 @@ contains
if (out_cont%closed) then
! {begin} Restrict the field to the outermost contour:
llc = floor(convert_to_ind(minval(out_cont%points, dim = 2), corner, &
step))
urc = ceiling(convert_to_ind(maxval(out_cont%points, dim = 2), corner, &
step))
llc = floor((corner_whole - corner) / step &
+ minval(cont_list_proj(n_cont)%points, dim = 2))
urc = ceiling((corner_whole - corner) / step &
+ maxval(cont_list_proj(n_cont)%points, dim = 2))
! Should have no effect except because of roundup error:
urc(2) = min(urc(2), size(ssh, 2))
......
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