From 2133d213494745de4a6d69fddd634d1ff868ced3 Mon Sep 17 00:00:00 2001 From: James Frost Date: Tue, 20 Aug 2024 16:00:07 +0100 Subject: [PATCH] Convert more recipes --- .../deterministic_plot_cape_ratio.cylc | 15 ++++--- .../deterministic_plot_inflow_properties.cylc | 15 ++++--- src/CSET/recipes/CAPE_ratio_plot.yaml | 44 +++++++------------ .../recipes/inflow_layer_properties_plot.yaml | 24 +++------- 4 files changed, 38 insertions(+), 60 deletions(-) diff --git a/cset-workflow/includes/deterministic_plot_cape_ratio.cylc b/cset-workflow/includes/deterministic_plot_cape_ratio.cylc index 5d26336f9..ee0f0be65 100644 --- a/cset-workflow/includes/deterministic_plot_cape_ratio.cylc +++ b/cset-workflow/includes/deterministic_plot_cape_ratio.cylc @@ -1,12 +1,13 @@ {% if DETERMINISTIC_PLOT_CAPE_RATIO %} +{% for model in models %} [runtime] - [[parallel_plot_cape_ratio]] - inherit = PARALLEL - [[[environment]]] - CSET_RECIPE_NAME = "CAPE_ratio_plot.yaml" - - [[collate_plot_cape_ratio]] - inherit = COLLATE + [[plot_cape_ratio_m{{model["number"]}}]] + inherit = PROCESS [[[environment]]] CSET_RECIPE_NAME = "CAPE_ratio_plot.yaml" + CSET_ADDOPTS = """ + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_NUMBER = {{model["number"]}} +{% endfor %} {% endif %} diff --git a/cset-workflow/includes/deterministic_plot_inflow_properties.cylc b/cset-workflow/includes/deterministic_plot_inflow_properties.cylc index e3c8d007e..9593172b7 100644 --- a/cset-workflow/includes/deterministic_plot_inflow_properties.cylc +++ b/cset-workflow/includes/deterministic_plot_inflow_properties.cylc @@ -1,12 +1,13 @@ {% if DETERMINISTIC_PLOT_INFLOW_PROPERTIES %} +{% for model in models %} [runtime] - [[parallel_inflow_layer_properties]] - inherit = PARALLEL - [[[environment]]] - CSET_RECIPE_NAME = "inflow_layer_properties_plot.yaml" - - [[collate_inflow_layer_properties]] - inherit = COLLATE + [[inflow_layer_properties_plot_m{{model["number"]}}]] + inherit = PROCESS [[[environment]]] CSET_RECIPE_NAME = "inflow_layer_properties_plot.yaml" + CSET_ADDOPTS = """ + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_NUMBER = {{model["number"]}} +{% endfor %} {% endif %} diff --git a/src/CSET/recipes/CAPE_ratio_plot.yaml b/src/CSET/recipes/CAPE_ratio_plot.yaml index c87aa9566..1c6d7434f 100644 --- a/src/CSET/recipes/CAPE_ratio_plot.yaml +++ b/src/CSET/recipes/CAPE_ratio_plot.yaml @@ -1,42 +1,28 @@ -title: CAPE ratio plot +title: $MODEL_NAME CAPE ratio plot description: | Extracts data required for, and calculates the CAPE ratio diagnostic, plotting on a map. -parallel: +steps: - operator: read.read_cubes - constraint: - operator: constraints.generate_time_constraint - time_start: $VALIDITY_TIME + - operator: convection.cape_ratio SBCAPE: - operator: filters.filter_cubes - constraint: - operator: constraints.generate_stash_constraint - stash: m01s20i114 + operator: filters.filter_cubes + constraint: + operator: constraints.generate_var_constraint + varname: m01s20i114 MUCAPE: - operator: filters.filter_cubes - constraint: - operator: constraints.generate_stash_constraint - stash: m01s20i112 + operator: filters.filter_cubes + constraint: + operator: constraints.generate_var_constraint + varname: m01s20i112 MUCIN: - operator: filters.filter_cubes - constraint: - operator: constraints.generate_stash_constraint - stash: m01s20i113 + operator: filters.filter_cubes + constraint: + operator: constraints.generate_var_constraint + varname: m01s20i113 MUCIN_thresh: -75 - - operator: filters.filter_cubes - constraint: - operator: constraints.generate_time_constraint - time_start: $VALIDITY_TIME - - - operator: write.write_cube_to_nc - filename: intermediate/cape_ratio - -collate: - - operator: read.read_cube - filename_pattern: intermediate/*.nc - - operator: write.write_cube_to_nc overwrite: True diff --git a/src/CSET/recipes/inflow_layer_properties_plot.yaml b/src/CSET/recipes/inflow_layer_properties_plot.yaml index 8f7c17364..c87297732 100644 --- a/src/CSET/recipes/inflow_layer_properties_plot.yaml +++ b/src/CSET/recipes/inflow_layer_properties_plot.yaml @@ -1,36 +1,26 @@ -title: Inflow layer properties plot +title: $MODEL_NAME Inflow layer properties plot description: | Extracts data required for, and calculates the Inflow properties diagnostic, plotting on a spatial map. parallel: - operator: read.read_cubes - constraint: - operator: constraints.generate_time_constraint - time_start: $VALIDITY_TIME - operator: convection.inflow_layer_properties EIB: operator: filters.filter_cubes constraint: - operator: constraints.generate_stash_constraint - stash: m01s20i119 + operator: constraints.generate_var_constraint + varname: m01s20i119 BLheight: operator: filters.filter_cubes constraint: - operator: constraints.generate_stash_constraint - stash: m01s00i025 + operator: constraints.generate_var_constraint + varname: m01s00i025 Orography: operator: filters.filter_cubes constraint: - operator: constraints.generate_stash_constraint - stash: m01s00i033 - - - operator: write.write_cube_to_nc - filename: intermediate/inflow_layer - -collate: - - operator: read.read_cube - filename_pattern: intermediate/*.nc + operator: constraints.generate_var_constraint + varname: m01s00i033 - operator: plot.spatial_contour_plot