From 7956cb540dd0af4f131980f2d7008d0352c077bc Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Fri, 1 Feb 2019 19:39:14 +0100 Subject: [PATCH] Polish. --- Tests/test_max_speed_contour_ssh.f | 7 +++++-- get_snapshot.f | 5 +++-- get_var.f | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Tests/test_max_speed_contour_ssh.f b/Tests/test_max_speed_contour_ssh.f index 10a18029..90f91304 100644 --- a/Tests/test_max_speed_contour_ssh.f +++ b/Tests/test_max_speed_contour_ssh.f @@ -20,8 +20,11 @@ program test_max_speed_contour_ssh integer ncid, varid real, allocatable:: ssh(:, :) ! (n_lon, n_lat) sea-surface height, in m real, allocatable:: u(:, :), v(:, :) ! (n_lon, n_lat) wind, in m s-1 - integer:: ind_extr(2) = [19, 11] ! indices in the two dimensions of - ! the extremum + + integer:: ind_extr(2) = [19, 11] + ! indices in the two dimensions of the extremum, relative to lower + ! left corner + integer:: radius = 3 namelist /main_nml/ ilon_llc, ilat_llc, ilon_urc, ilat_urc, ind_extr, radius diff --git a/get_snapshot.f b/get_snapshot.f index 48515b1a..d7a4ab3f 100644 --- a/get_snapshot.f +++ b/get_snapshot.f @@ -89,8 +89,9 @@ contains new_fill_value = ieee_value(0., IEEE_QUIET_NAN)) call get_var(periodic, max_radius(1), v, ncid, nlon, k, name = "v", & new_fill_value = ieee_value(0., IEEE_QUIET_NAN)) - ! (We will need quiet NaNs rather the original fill values for u - ! and v when we compute the max-speed contours.) + ! (We will need quiet NaNs rather the original fill values for + ! u and v when we compute the max-speed contours and when we + ! search the ssh of max-speed contours.) call nf95_close(ncid) call set_all_outerm(s, min_amp, max_radius, step, periodic, ssh, & diff --git a/get_var.f b/get_var.f index 57452beb..9b578ddd 100644 --- a/get_var.f +++ b/get_var.f @@ -8,7 +8,7 @@ contains new_fill_value) ! Read a NetCDF variable, change the missing value and extend it - ! in longitude. + ! in longitude if periodic. ! Libraries: use netcdf95, only: nf95_inq_varid, nf95_get_var, nf95_get_att @@ -16,7 +16,7 @@ contains logical, intent(in):: periodic ! grid is periodic in longitude integer, intent(in):: max_rad_lon ! maximum radius of an eddy in - ! longitude, in number of grid points + ! longitude, in number of grid points, used only if periodic real, intent(out):: values(1 - merge(max_rad_lon, 0, periodic):, :) ! (1 - merge(max_rad_lon, 0, periodic):nlon + merge(max_rad_lon, 0, -- GitLab