From 537ffdef6a0a97f8b0393af127b8f95caf6faa71 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ipsl.fr> Date: Wed, 11 Sep 2024 18:12:05 +0200 Subject: [PATCH] Check that `uniform_lon_lat` is true In program `test_mean_speed`. To make it work with a non-uniform grid, we would have to read a contour in projection coordinates. --- Inst_eddies/Tests/test_mean_speed.f90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Inst_eddies/Tests/test_mean_speed.f90 b/Inst_eddies/Tests/test_mean_speed.f90 index 28486746..53a6573f 100644 --- a/Inst_eddies/Tests/test_mean_speed.f90 +++ b/Inst_eddies/Tests/test_mean_speed.f90 @@ -3,12 +3,12 @@ program test_mean_speed ! Libraries: use contour_531, only: convert_to_ind use gpc_f, only: shp_read_pol, polygon - use jumble, only: get_command_arg_dyn, deg_to_rad, twopi, rad_to_deg + use jumble, only: get_command_arg_dyn, deg_to_rad, twopi, rad_to_deg, assert use shapelib, only: shpclose, shpfileobject use shapelib_03, only: shp_open_03 use config_m, only: config - use input_ssh_m, only: input_ssh, corner_whole, step, nlon + use input_ssh_m, only: input_ssh, corner_whole, step, nlon, uniform_lon_lat use mean_speed_m, only: mean_speed implicit none @@ -37,6 +37,8 @@ program test_mean_speed call get_command_arg_dyn(1, ssh_fname, "Required arguments: h-file uv-file") call get_command_arg_dyn(2, uv_fname, "Required arguments: h-file uv-file") call input_ssh(periodic, ssh, u, v, ssh_fname, uv_fname, uv_fname) + call assert(uniform_lon_lat, & + "test_mean_speed only works for uniform lon_lat grid") write(unit = *, nml = main_nml) print *, "Enter namelist main_nml." read(unit = *, nml = main_nml) -- GitLab