From 0f7437ac57eccb3fc9268ecb5afd031216a72ad8 Mon Sep 17 00:00:00 2001 From: James Frost Date: Thu, 20 Aug 2026 10:18:15 +0100 Subject: [PATCH 1/2] Fix default value for SCORES_CATEGORICAL_POD The current value of an empty string cannot be parsed by the loader and thus crashes the parbake process. Additionally diagnostics should be turned off by default in the example configuration. This does however show the need to have more automated testing of the workflow. Fixes #2400 --- src/CSET/cset_workflow/rose-suite.conf.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CSET/cset_workflow/rose-suite.conf.example b/src/CSET/cset_workflow/rose-suite.conf.example index 2880435e5..26a47dd6b 100644 --- a/src/CSET/cset_workflow/rose-suite.conf.example +++ b/src/CSET/cset_workflow/rose-suite.conf.example @@ -128,8 +128,8 @@ POINT_OBS=False !!POINT_OBS_USE_WMO_STATION_NUMBERS=False !!POINT_OBS_WMO_BLOCK_STTN_NUMBERS=[] PRESSURE_LEVELS=[] -SCORES_CATEGORICAL_POD=True -SCORES_CATEGORICAL_POD_ENTRIES=[""] +SCORES_CATEGORICAL_POD=False +!!SCORES_CATEGORICAL_POD_ENTRIES=[] PRESSURE_LEVEL_FIELDS=[] !!PROB_TEMPERATURE_CONDITION=[] !!PROB_TEMPERATURE_THRESHOLD=[] From 9244a8e0cfe9d7cbb2deeca2481b7bd310ceb110 Mon Sep 17 00:00:00 2001 From: James Frost Date: Thu, 20 Aug 2026 10:31:58 +0100 Subject: [PATCH 2/2] Skip invalid entries in SCORES_CATEGORICAL_POD_ENTRIES Invalid entries are logged then skipped, preventing the loader from crashing. --- src/CSET/loaders/verification.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/CSET/loaders/verification.py b/src/CSET/loaders/verification.py index c0b136a30..96a7a1e57 100644 --- a/src/CSET/loaders/verification.py +++ b/src/CSET/loaders/verification.py @@ -15,9 +15,12 @@ """Load verification recipes.""" import itertools +import logging from CSET.recipes import Config, RawRecipe, get_models +logger = logging.getLogger(__name__) + def _get_scores_spatial_methods(conf): """Compile list of the required scores spatial plots.""" @@ -290,7 +293,15 @@ def load(conf: Config): for field_and_method, scores_method in itertools.product( conf.SCORES_CATEGORICAL_POD_ENTRIES, scores_timeseries_categorical ): - var, op, value = field_and_method.split(",") + try: + var, op, value = field_and_method.split(",") + except ValueError as err: + logger.exception( + f"Invalid value in SCORES_CATEGORICAL_POD_ENTRIES: {field_and_method}", + exc_info=err, + ) + # Skip invalid entry. + continue yield RawRecipe( recipe=f"surface_categorical_model_obs_{scores_method}.yaml",