From 83614f1661234e1730a70aabf87538a5bf828bbf Mon Sep 17 00:00:00 2001 From: Sylviabohnenstengel Date: Wed, 26 Jun 2024 13:13:32 +0100 Subject: [PATCH 1/6] New recipe and rose meta data for UM based vertical profile on model_levels. --- ...an_vertical_profile_modellevel_series.cylc | 16 ++++++++ cset-workflow/meta/rose-meta.conf | 24 +++++++++++ ...an_vertical_profile_modellevel_series.yaml | 41 +++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc create mode 100644 src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml diff --git a/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc b/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc new file mode 100644 index 000000000..91ca3e686 --- /dev/null +++ b/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc @@ -0,0 +1,16 @@ +{% if DOMAIN_MEAN_VERTICAL_PROFILE_MODELLEVEL_SERIES %} +[runtime] +{% for model_field in MODEL_LEVEL_MODEL_FIELDS %} + [[pre_process_domain_mean_vertical_profile_series_{{model_field}}]] + inherit = PARALLEL + [[[environment]]] + CSET_RECIPE_NAME = "generic_domain_mean_vertical_profile_modellevel_series.yaml" + CSET_ADDOPTS = "--VARNAME='{{model_field}}' --MLEVEL='{{MODEL_LEVELS}}'" + + [[collate_domain_mean_vertical_profile_series_{{model_field}}]] + inherit = COLLATE + [[[environment]]] + CSET_RECIPE_NAME = "generic_domain_mean_vertical_profile_modellevel_series.yaml" + CSET_ADDOPTS = "--VARNAME='{{model_field}}' --MLEVEL='{{MODEL_LEVELS}}'" +{% endfor %} +{% endif %} diff --git a/cset-workflow/meta/rose-meta.conf b/cset-workflow/meta/rose-meta.conf index 53294f33a..84511f1ec 100644 --- a/cset-workflow/meta/rose-meta.conf +++ b/cset-workflow/meta/rose-meta.conf @@ -502,6 +502,14 @@ type=python_boolean compulsory=true sort-key=surface1 +[template variables=DOMAIN_MEAN_VERTICAL_PROFILE_MODELLEVEL_SERIES] +ns=Diagnostics +description=Domain averaged vertical profile for each validity time. Requires fields UM_MODEL_LEVELS and MODEL_LEVEL_MODEL_FIELDS as input. +help=See includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc +type=python_boolean +compulsory=true +sort-key=surface1 + [template variables=LFRIC_PLOT_SPATIAL_PRESSURE_LEVEL_MODEL_FIELD] ns=Diagnostics description=Create plots for the specified pressure level fields. @@ -578,6 +586,14 @@ type=python_list compulsory=true sort-key=pressure2 +[template variables=MODEL_LEVEL_MODEL_FIELDS] +ns=Diagnostics +description=List of standard names of UM model fields on model levels to plot. +help=Include a list of variable names in python list format["var1","var2"]. +type=python_list +compulsory=true +sort-key=pressure2 + [template variables=PRESSURE_LEVELS] ns=Diagnostics description=List of pressure levels to generate plots for. @@ -586,6 +602,14 @@ type=python_list compulsory=true sort-key=pressure2 +[template variables=UM_MODEL_LEVELS] +ns=Diagnostics +description=List of UM model levels to generate plots for. +help=Include an INTEGER list of model levels in python list format[1,2,3,4]. +type=python_list +compulsory=true +sort-key=pressure2 + [template variables=STASH_CODES] ns=Diagnostics description=List of STASH codes to plot. diff --git a/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml b/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml new file mode 100644 index 000000000..c1f77069f --- /dev/null +++ b/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml @@ -0,0 +1,41 @@ +category: Quick Look +title: Domain mean $VARNAME vertical profile as series +description: Plots a time series of vertical profiles for the domain mean $VARNAME using a modellevel coordinate. + +# Pre-processing steps. +parallel: + - operator: read.read_cube + constraint: + operator: constraints.combine_constraints + variable_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + pressure_level_constraint: + operator: constraints.generate_model_level_constraint + model_level: $MLEVEL + validity_time_constraint: + operator: constraints.generate_time_constraint + time_start: $VALIDITY_TIME + + - operator: collapse.collapse + coordinate: [grid_latitude, grid_longitude] + method: MEAN + + # Save domain meaned variable to a file per validity time. + - operator: write.write_cube_to_nc + filename: intermediate/model_level_level_domain_mean + +# Collation steps. +# Reads in intermediate cube and plots it. +collate: + - operator: read.read_cube + filename_pattern: intermediate/*.nc + +# plot the vertical line series + - operator: plot.plot_vertical_line_series + series_coordinate: model_level_number + sequence_coordinate: time + + # Make a single NetCDF with all the data inside it. + - operator: write.write_cube_to_nc + overwrite: True From dcd34e137aa0214ee7e930f244679419eec98edf Mon Sep 17 00:00:00 2001 From: Sylviabohnenstengel Date: Wed, 26 Jun 2024 14:21:14 +0100 Subject: [PATCH 2/6] use correct um_model_levels as input as they might differ from lfric. --- ...nistic_domain_mean_vertical_profile_modellevel_series.cylc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc b/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc index 91ca3e686..6ba0078a3 100644 --- a/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc +++ b/cset-workflow/includes/deterministic_domain_mean_vertical_profile_modellevel_series.cylc @@ -5,12 +5,12 @@ inherit = PARALLEL [[[environment]]] CSET_RECIPE_NAME = "generic_domain_mean_vertical_profile_modellevel_series.yaml" - CSET_ADDOPTS = "--VARNAME='{{model_field}}' --MLEVEL='{{MODEL_LEVELS}}'" + CSET_ADDOPTS = "--VARNAME='{{model_field}}' --MLEVEL='{{UM_MODEL_LEVELS}}'" [[collate_domain_mean_vertical_profile_series_{{model_field}}]] inherit = COLLATE [[[environment]]] CSET_RECIPE_NAME = "generic_domain_mean_vertical_profile_modellevel_series.yaml" - CSET_ADDOPTS = "--VARNAME='{{model_field}}' --MLEVEL='{{MODEL_LEVELS}}'" + CSET_ADDOPTS = "--VARNAME='{{model_field}}' --MLEVEL='{{UM_MODEL_LEVELS}}'" {% endfor %} {% endif %} From 118daf41556da05c7b6df300a1d7d4dc755d2083 Mon Sep 17 00:00:00 2001 From: Sylviabohnenstengel Date: Mon, 1 Jul 2024 17:14:26 +0100 Subject: [PATCH 3/6] correct recipe and remove steering signs --- ...neric_domain_mean_vertical_profile_modellevel_series.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml b/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml index c1f77069f..bf74f8b55 100644 --- a/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml +++ b/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml @@ -11,8 +11,9 @@ parallel: operator: constraints.generate_var_constraint varname: $VARNAME pressure_level_constraint: - operator: constraints.generate_model_level_constraint - model_level: $MLEVEL + operator: constraints.generate_level_constraint + coordinate: "model_level_number" + levels: $MLEVEL validity_time_constraint: operator: constraints.generate_time_constraint time_start: $VALIDITY_TIME From ee9f26ecb6cedb6920573dab35c321a8dc925813 Mon Sep 17 00:00:00 2001 From: Sylvia Bohnenstengel <62748926+Sylviabohnenstengel@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:47:40 +0100 Subject: [PATCH 4/6] Update cset-workflow/meta/rose-meta.conf Co-authored-by: James Frost --- cset-workflow/meta/rose-meta.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cset-workflow/meta/rose-meta.conf b/cset-workflow/meta/rose-meta.conf index 84511f1ec..742f349a5 100644 --- a/cset-workflow/meta/rose-meta.conf +++ b/cset-workflow/meta/rose-meta.conf @@ -605,7 +605,7 @@ sort-key=pressure2 [template variables=UM_MODEL_LEVELS] ns=Diagnostics description=List of UM model levels to generate plots for. -help=Include an INTEGER list of model levels in python list format[1,2,3,4]. +help=Include an integer list of model levels in python list format, e.g: [1,2,3,4] type=python_list compulsory=true sort-key=pressure2 From a470e49cdc58791720755dc4208b0c23f296c80e Mon Sep 17 00:00:00 2001 From: Sylvia Bohnenstengel <62748926+Sylviabohnenstengel@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:47:59 +0100 Subject: [PATCH 5/6] Update src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml Co-authored-by: James Frost --- .../generic_domain_mean_vertical_profile_modellevel_series.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml b/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml index bf74f8b55..9e3582671 100644 --- a/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml +++ b/src/CSET/recipes/generic_domain_mean_vertical_profile_modellevel_series.yaml @@ -1,6 +1,6 @@ category: Quick Look title: Domain mean $VARNAME vertical profile as series -description: Plots a time series of vertical profiles for the domain mean $VARNAME using a modellevel coordinate. +description: Plots a time series of vertical profiles for the domain mean $VARNAME using a `model_level_number` coordinate. # Pre-processing steps. parallel: From b192b8dca2a347f2ee8a162ea7dcbec0b9c68a09 Mon Sep 17 00:00:00 2001 From: Sylvia Bohnenstengel <62748926+Sylviabohnenstengel@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:48:08 +0100 Subject: [PATCH 6/6] Update cset-workflow/meta/rose-meta.conf Co-authored-by: James Frost --- cset-workflow/meta/rose-meta.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cset-workflow/meta/rose-meta.conf b/cset-workflow/meta/rose-meta.conf index 742f349a5..564a5748e 100644 --- a/cset-workflow/meta/rose-meta.conf +++ b/cset-workflow/meta/rose-meta.conf @@ -589,7 +589,7 @@ sort-key=pressure2 [template variables=MODEL_LEVEL_MODEL_FIELDS] ns=Diagnostics description=List of standard names of UM model fields on model levels to plot. -help=Include a list of variable names in python list format["var1","var2"]. +help=Include a list of variable names in python list format, e.g: ["var1","var2"] type=python_list compulsory=true sort-key=pressure2