From 4df00c356e9a250edeb14b4a31d296d9a26f6adc Mon Sep 17 00:00:00 2001 From: jwarner8 Date: Thu, 4 Jul 2024 17:00:58 +0100 Subject: [PATCH] bug fixes --- cset-workflow/meta/rose-meta.conf | 4 ++-- cset-workflow/rose-suite.conf.example | 4 ++++ src/CSET/operators/transect.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cset-workflow/meta/rose-meta.conf b/cset-workflow/meta/rose-meta.conf index 53294f33a..0b3e1443a 100644 --- a/cset-workflow/meta/rose-meta.conf +++ b/cset-workflow/meta/rose-meta.conf @@ -419,8 +419,8 @@ help=This functionality extracts data for each variable defined in CS_VARS, such as transects through valleys, or through a front as it passes through. type=python_boolean trigger=template variables=CS_STARTCOORDS: True; -trigger=template variables=CS_FINISHCOORDS: True; -trigger=template variables=CS_VARS: True; + template variables=CS_FINISHCOORDS: True; + template variables=CS_VARS: True; compulsory=true sort-key=cs1 diff --git a/cset-workflow/rose-suite.conf.example b/cset-workflow/rose-suite.conf.example index 2961b840f..62343dc1b 100644 --- a/cset-workflow/rose-suite.conf.example +++ b/cset-workflow/rose-suite.conf.example @@ -21,6 +21,9 @@ CSET_INPUT_FILE_PATH="" CSET_LOCAL_CSET_PATH="$HOME/CSET" CSET_RUNAHEAD_LIMIT=10 !!CSET_TIMES_PER_FILE=0 +CS_FINISHCOORDS="" +CS_STARTCOORDS="" +CS_VARS="" DETERMINISTIC_PLOT_AGGREGATE_PRECIPITATION=False DETERMINISTIC_PLOT_CAPE_RATIO=False DETERMINISTIC_PLOT_MODEL_LEVEL_AIR_TEMP=False @@ -28,6 +31,7 @@ DETERMINISTIC_PLOT_SURFACE_AIR_TEMP=False DOMAIN_MEAN_SURFACE_TIME_SERIES=False DOMAIN_MEAN_TIME_SERIES_STASH=False ENSEMBLE_PLOT_SURFACE_AIR_TEMP=False +EXTRACT_TRANSECT=False FETCH_FCST_OPT_CONF="filesystem" HOUSEKEEPING_MODE=2 LFRIC_DOMAIN_MEAN_SURFACE_TIME_SERIES=False diff --git a/src/CSET/operators/transect.py b/src/CSET/operators/transect.py index 5746e75c5..e38fe2e75 100644 --- a/src/CSET/operators/transect.py +++ b/src/CSET/operators/transect.py @@ -94,8 +94,8 @@ def calc_transect(cube: iris.cube.Cube, startcoords: tuple, endcoords: tuple): ) # Compute minimum gap between x/y spatial coords. - lon_min = np.min(lon_coord.points[1:] - lon_coord.points[:-1]) - lat_min = np.min(lat_coord.points[1:] - lat_coord.points[:-1]) + lon_min = np.abs(np.min(lon_coord.points[1:] - lon_coord.points[:-1])) + lat_min = np.abs(np.min(lat_coord.points[1:] - lat_coord.points[:-1])) # For scenarios where coord is at 90 degree to the grid (i.e. no # latitude/longitude change). Only xmin or ymin will be zero, not both