diff --git a/Inst_eddies/Tests/test_mean_speed.f90 b/Inst_eddies/Tests/test_mean_speed.f90 index 9e1188c571008f8e79cb2513635856f7dfeece83..258e0e00186462d12752b58870cace7923e36721 100644 --- a/Inst_eddies/Tests/test_mean_speed.f90 +++ b/Inst_eddies/Tests/test_mean_speed.f90 @@ -2,10 +2,9 @@ program test_mean_speed ! Libraries: use gpc_f, only: shp_read_pol, polygon - use jumble, only: get_command_arg_dyn + use jumble, only: get_command_arg_dyn, deg_to_rad, assert use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf95_get_var, & nf95_find_coord, nf95_inquire_dimension, nf95_nowrite - use jumble, only: deg_to_rad, assert use shapelib, only: shpclose, shpfileobject use shapelib_03, only: shp_open_03 @@ -13,7 +12,7 @@ program test_mean_speed implicit none - real corner(2) + real corner(2) ! in degrees real:: center(2) = [9.625, - 33.875] ! longitude and latitude, in degrees integer ncid, varid, dimid integer:: ishape = 0 diff --git a/Inst_eddies/get_1_outerm.f90 b/Inst_eddies/get_1_outerm.f90 index 682cf39ac85bb74da2d6d0b42977897937a392ed..814e0185f5b582ce2422ea232efd8e123846fb65 100644 --- a/Inst_eddies/get_1_outerm.f90 +++ b/Inst_eddies/get_1_outerm.f90 @@ -68,7 +68,10 @@ contains ! 1, the outermost contour is element with subscript n_cont. The ! contours are in monotonic order of ssh. The contour with a given ! subscript in cont_list_proj corresponds to the contour with the - ! same subscript in cont_list. For i <= n_cont, + ! same subscript in cont_list. More precisely, the point with + ! subscript j in contour i of cont_list_proj corresponds to the + ! point with subscript j in contour i of cont_list (this is + ! important for mean_speed). For i <= n_cont, ! cont_list_proj(i)%area has its default initialization value and ! the order of points in cont_list_proj(i) (clockwise or ! counter-clockwise) is not specified. @@ -185,7 +188,11 @@ contains corner_whole, step) cont_list(n_cont) = out_cont%polyline out_cont%ssh = cont_list_proj(n_cont)%ssh + call ccw_orient(out_cont) + ! (Note we have to orient out_cont after copying it to + ! cont_list, so that cont_list corresponds to cont_list_proj + ! point by point.) end if end if test_n_points diff --git a/Inst_eddies/set_contours.f90 b/Inst_eddies/set_contours.f90 index 2c85c81cc328f828641ef29fa41c5f0bc4728e08..4834e110459a78f01ffee532a6236ef851fe1c83 100644 --- a/Inst_eddies/set_contours.f90 +++ b/Inst_eddies/set_contours.f90 @@ -77,7 +77,10 @@ contains ! 1, the outermost contour is element with subscript n_cont. The ! contours are in monotonic order of ssh. The contour with a given ! subscript in cont_list_proj corresponds to the contour with the - ! same subscript in cont_list. For i <= n_cont, + ! same subscript in cont_list. More precisely, the point with + ! subscript j in contour i of cont_list_proj corresponds to the + ! point with subscript j in contour i of cont_list (this is + ! important for mean_speed). For i <= n_cont, ! cont_list_proj(i)%area has its default initialization value and ! the order of points in cont_list_proj(i) (clockwise or ! counter-clockwise) is not specified. diff --git a/Inst_eddies/set_max_speed.f90 b/Inst_eddies/set_max_speed.f90 index cc82777c1dbd6553ad32e4bcab233a9f18dd7c30..15e97fb03400ccf0b8dc5b0b992f4c62903198af 100644 --- a/Inst_eddies/set_max_speed.f90 +++ b/Inst_eddies/set_max_speed.f90 @@ -55,7 +55,10 @@ contains ! 1, the outermost contour is element with subscript n_cont. The ! contours are in monotonic order of ssh. The contour with a given ! subscript in cont_list_proj corresponds to the contour with the - ! same subscript in cont_list. For i <= n_cont, + ! same subscript in cont_list. More precisely, the point with + ! subscript j in contour i of cont_list_proj corresponds to the + ! point with subscript j in contour i of cont_list (this is + ! important for mean_speed). For i <= n_cont, ! cont_list_proj(i)%area has its default initialization value and ! the order of points in cont_list_proj(i) (clockwise or ! counter-clockwise) is not specified.