From b0a034d2a48f1b09defd63af8e546f6879013bff Mon Sep 17 00:00:00 2001 From: daflack Date: Wed, 29 Jan 2025 14:22:01 +0000 Subject: [PATCH] Adds recipe and includes files, updates rose-meta.conf in diagnostics for hour of day aggregation. Fixes #1032 --- ...es_case_study_aggregation_hour_of_day.cylc | 18 +++++ ...es_case_study_aggregation_hour_of_day.cylc | 18 +++++ ...es_case_study_aggregation_hour_of_day.cylc | 18 +++++ ...ld_case_study_aggregation_hour_of_day.cylc | 21 ++++++ ...ld_case_study_aggregation_hour_of_day.cylc | 21 ++++++ ...ld_case_study_aggregation_hour_of_day.cylc | 18 +++++ ...ce_case_study_aggregation_hour_of_day.cylc | 22 ++++++ cset-workflow/meta/diagnostics/rose-meta.conf | 73 ++++++++++++++++++- ...e_series_case_aggregation_hour_of_day.yaml | 34 +++++++++ ...nce_case_aggregation_mean_hour_of_day.yaml | 27 +++++++ ...e_series_case_aggregation_hour_of_day.yaml | 34 +++++++++ ...nce_case_aggregation_mean_hour_of_day.yaml | 26 +++++++ ...e_series_case_aggregation_hour_of_day.yaml | 35 +++++++++ ...nce_case_aggregation_mean_hour_of_day.yaml | 29 ++++++++ ...nce_case_aggregation_mean_hour_of_day.yaml | 31 ++++++++ 15 files changed, 424 insertions(+), 1 deletion(-) create mode 100644 cset-workflow/includes/deterministic_domain_mean_surface_time_series_case_study_aggregation_hour_of_day.cylc create mode 100644 cset-workflow/includes/deterministic_domain_mean_vertical_model_level_profile_series_case_study_aggregation_hour_of_day.cylc create mode 100644 cset-workflow/includes/deterministic_domain_mean_vertical_pressure_profile_series_case_study_aggregation_hour_of_day.cylc create mode 100644 cset-workflow/includes/plot_spatial_mlevel_model_field_case_study_aggregation_hour_of_day.cylc create mode 100644 cset-workflow/includes/plot_spatial_plevel_model_field_case_study_aggregation_hour_of_day.cylc create mode 100644 cset-workflow/includes/plot_spatial_surface_model_field_case_study_aggregation_hour_of_day.cylc create mode 100644 cset-workflow/includes/spatial_surface_difference_case_study_aggregation_hour_of_day.cylc create mode 100644 src/CSET/recipes/generic_mlevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml create mode 100644 src/CSET/recipes/generic_mlevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml create mode 100644 src/CSET/recipes/generic_plevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml create mode 100644 src/CSET/recipes/generic_plevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml create mode 100644 src/CSET/recipes/generic_surface_domain_mean_time_series_case_aggregation_hour_of_day.yaml create mode 100644 src/CSET/recipes/generic_surface_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml create mode 100644 src/CSET/recipes/surface_spatial_difference_case_aggregation_mean_hour_of_day.yaml diff --git a/cset-workflow/includes/deterministic_domain_mean_surface_time_series_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/deterministic_domain_mean_surface_time_series_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..e11bf16c6 --- /dev/null +++ b/cset-workflow/includes/deterministic_domain_mean_surface_time_series_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,18 @@ +{% if DOMAIN_MEAN_SURFACE_TIME_SERIES_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +{% for field in SURFACE_MODEL_FIELDS %} +{% for model in models %} +[runtime] + [[generic_surface_domain_mean_time_series_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "generic_surface_domain_mean_time_series_case_aggregation_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = {{model["id"]}} +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/includes/deterministic_domain_mean_vertical_model_level_profile_series_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/deterministic_domain_mean_vertical_model_level_profile_series_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..4b5ce2a07 --- /dev/null +++ b/cset-workflow/includes/deterministic_domain_mean_vertical_model_level_profile_series_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,18 @@ +{% if DOMAIN_MEAN_VERTICAL_PROFILE_MODEL_LEVEL_SERIES_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +{% for field in MODEL_LEVEL_MODEL_FIELDS %} +{% for model in models %} +[runtime] + [[generic_mlevel_domain_mean_vertical_profile_series_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "generic_mlevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = {{model["id"]}} +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/includes/deterministic_domain_mean_vertical_pressure_profile_series_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/deterministic_domain_mean_vertical_pressure_profile_series_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..6f8f274cd --- /dev/null +++ b/cset-workflow/includes/deterministic_domain_mean_vertical_pressure_profile_series_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,18 @@ +{% if DOMAIN_MEAN_VERTICAL_PROFILE_SERIES_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +{% for field in PRESSURE_LEVEL_MODEL_FIELDS %} +{% for model in models %} +[runtime] + [[generic_plevel_domain_mean_vertical_profile_series_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "generic_plevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = {{model["id"]}} +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/includes/plot_spatial_mlevel_model_field_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/plot_spatial_mlevel_model_field_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..eac5ed0f2 --- /dev/null +++ b/cset-workflow/includes/plot_spatial_mlevel_model_field_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,21 @@ +{% if PLOT_SPATIAL_MODEL_LEVEL_MODEL_FIELD_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +{% for field in MODEL_LEVEL_MODEL_FIELDS %} +{% for model in models %} +{% for mlevel in UM_MODEL_LEVELS %} +[runtime] + [[generic_mlevel_spatial_plot_sequence_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(mlevel)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "generic_mlevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --MLEVEL='{{mlevel}}' + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = {{model["id"]}} +{% endfor %} +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/includes/plot_spatial_plevel_model_field_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/plot_spatial_plevel_model_field_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..6a37ec775 --- /dev/null +++ b/cset-workflow/includes/plot_spatial_plevel_model_field_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,21 @@ +{% if PLOT_SPATIAL_PRESSURE_LEVEL_MODEL_FIELD_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +{% for field in PRESSURE_LEVEL_MODEL_FIELDS %} +{% for model in models %} +{% for plevel in PRESSURE_LEVELS %} +[runtime] + [[generic_plevel_spatial_plot_sequence_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(plevel)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "generic_plevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --PLEVEL='{{plevel}}' + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = {{model["id"]}} +{% endfor %} +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/includes/plot_spatial_surface_model_field_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/plot_spatial_surface_model_field_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..cf9aa26a0 --- /dev/null +++ b/cset-workflow/includes/plot_spatial_surface_model_field_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,18 @@ +{% if PLOT_SPATIAL_SURFACE_MODEL_FIELD_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +{% for field in SURFACE_MODEL_FIELDS %} +{% for model in models %} +[runtime] + [[generic_spatial_plot_time_series_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "generic_surface_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --MODEL_NAME='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = {{model["id"]}} +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/includes/spatial_surface_difference_case_study_aggregation_hour_of_day.cylc b/cset-workflow/includes/spatial_surface_difference_case_study_aggregation_hour_of_day.cylc new file mode 100644 index 000000000..40b1abd6d --- /dev/null +++ b/cset-workflow/includes/spatial_surface_difference_case_study_aggregation_hour_of_day.cylc @@ -0,0 +1,22 @@ +{% if SPATIAL_SURFACE_DIFFERENCE_CASE_AGGREGATION_HOUR_OF_DAY|default(False) %} +# Models are listed in order, so model 1 is the first element. +{% set base_model = models[0] %} +# As we use model 1 as the base model we skip it here. +{% for model in models[1:] %} +{% for field in SURFACE_MODEL_FIELDS %} +[runtime] + [[spatial_surface_difference_case_aggregation_by_hour_of_day_m{{model["id"]}}_{{sanitise_task_name(field)}}]] + inherit = PROCESS_CASE_AGGREGATION + [[[directives]]] + --mem=5000 + [[[environment]]] + CSET_RECIPE_NAME = "surface_spatial_difference_case_aggregation_mean_hour_of_day.yaml" + CSET_ADDOPTS = """ + --VARNAME='{{field}}' + --BASE_MODEL='{{base_model["name"]}}' + --OTHER_MODEL='{{model["name"]}}' + """ + MODEL_IDENTIFIERS = '1 {{model["id"]}}' +{% endfor %} +{% endfor %} +{% endif %} diff --git a/cset-workflow/meta/diagnostics/rose-meta.conf b/cset-workflow/meta/diagnostics/rose-meta.conf index 05164b3a8..d9f032981 100644 --- a/cset-workflow/meta/diagnostics/rose-meta.conf +++ b/cset-workflow/meta/diagnostics/rose-meta.conf @@ -31,6 +31,14 @@ type=python_boolean compulsory=true sort-key=0surface2 +[template variables=PLOT_SPATIAL_SURFACE_MODEL_FIELD_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create case aggregated plots for the specified surface fields + averaged by hour of day. +type=python_boolean +compulsory=true +sort-key=0surface2 + [template variables=SPATIAL_SURFACE_DIFFERENCE] ns=Diagnostics/Quicklook description=Create difference plots for the specified surface fields. @@ -40,7 +48,14 @@ sort-key=0surface3 [template variables=SPATIAL_SURFACE_DIFFERENCE_CASE_AGGREGATION_LEAD_TIME] ns=Diagnostics/Quicklook -description=Create difference plots for the specified surface fields. +description=Create difference plots for the specified surface fields aggregated by lead time. +type=python_boolean +compulsory=true +sort-key=0surface3 + +[template variables=SPATIAL_SURFACE_DIFFERENCE_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create difference plots for the specified surface fields aggregated by hour of day. type=python_boolean compulsory=true sort-key=0surface3 @@ -60,6 +75,14 @@ type=python_boolean compulsory=true sort-key=0surface4 +[template variables=DOMAIN_MEAN_SURFACE_TIME_SERIES_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create a case aggregated time series plot of surface field domain + mean by hour of day. +type=python_boolean +compulsory=true +sort-key=0surface4 + [template variables=DOMAIN_SURFACE_HISTOGRAM_SERIES_FIELD] ns=Diagnostics/Quicklook description=Create a series of histogram plots for selected surface fields for each cycle time. @@ -75,6 +98,14 @@ type=python_boolean compulsory=true sort-key=0surface5 +[template variables=DOMAIN_SURFACE_HISTOGRAM_SERIES_FIELD_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create a series of histogram plots for selected surface fields. + Cases are aggregated by hour of day. +type=python_boolean +compulsory=true +sort-key=0surface5 + [template variables=SURFACE_SINGLE_POINT_TIME_SERIES] ns=Diagnostics/Quicklook description=Plot a time series at a single specified location in a surface field. @@ -146,6 +177,14 @@ type=python_boolean compulsory=true sort-key=1pressure3 +[template variables=PLOT_SPATIAL_PRESSURE_LEVEL_MODEL_FIELD_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create plots for the specified pressure level fields. + Cases are aggregated by hour of day. +type=python_boolean +compulsory=true +sort-key=1pressure3 + [template variables=DOMAIN_MEAN_VERTICAL_PROFILE_SERIES] ns=Diagnostics/Quicklook description=Domain averaged vertical profile of pressure levels for each time. @@ -161,6 +200,14 @@ type=python_boolean compulsory=true sort-key=1pressure3 +[template variables=DOMAIN_MEAN_VERTICAL_PROFILE_SERIES_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Domain averaged vertical profile of pressure levels for each time. + Cases are aggregated by hour of day. +type=python_boolean +compulsory=true +sort-key=1pressure3 + [template variables=DOMAIN_HISTOGRAM_SERIES] ns=Diagnostics/Quicklook description=Create a series of histogram plots for selected pressure levels for each cycle time. @@ -185,6 +232,14 @@ type=python_boolean compulsory=true sort-key=1pressure4a +[template variables=DOMAIN_HISTOGRAM_SERIES_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create a series of histogram plots for selected pressure levels for each cycle time. + Cases are aggregated by hour of day. +type=python_boolean +compulsory=true +sort-key=1pressure4a + [template variables=EXTRACT_PLEVEL_TRANSECT] ns=Diagnostics/Quicklook description=Plot a cross section of pressure for variables. @@ -258,6 +313,14 @@ type=python_boolean compulsory=true sort-key=2modellevel3 +[template variables=PLOT_SPATIAL_MODEL_LEVEL_MODEL_FIELD_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Create plots for specified model level fields and aggregate cases by + hour of day. +type=python_boolean +compulsory=true +sort-key=2modellevel3 + [template variables=DOMAIN_MEAN_VERTICAL_PROFILE_MODEL_LEVEL_SERIES] ns=Diagnostics/Quicklook description=Domain averaged vertical profile for each validity time. @@ -273,6 +336,14 @@ type=python_boolean compulsory=true sort-key=2modellevel4 +[template variables=DOMAIN_MEAN_VERTICAL_PROFILE_MODEL_LEVEL_SERIES_CASE_AGGREGATION_HOUR_OF_DAY] +ns=Diagnostics/Quicklook +description=Case aggregated,domain averaged vertical profile for each validity + time aggregated by hour of day. +type=python_boolean +compulsory=true +sort-key=2modellevel4 + [template variables=EXTRACT_MLEVEL_TRANSECT] ns=Diagnostics/Quicklook description=Plot a cross section of model_level_number for variables. diff --git a/src/CSET/recipes/generic_mlevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml b/src/CSET/recipes/generic_mlevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml new file mode 100644 index 000000000..251034e1b --- /dev/null +++ b/src/CSET/recipes/generic_mlevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml @@ -0,0 +1,34 @@ +category: Profiles +title: $MODEL_NAME Domain horizontal mean $VARNAME vertical profile as series case aggregation by hour of day +description: | + Plots a time series of vertical profiles for the domain mean $VARNAME using a + `model_level_number` coordinate. This recipe aggregates over all cases using a + consistent hour of day. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + variable_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + pressure_level_constraint: + operator: constraints.generate_level_constraint + coordinate: model_level_number + levels: "*" + + - operator: collapse.collapse + coordinate: [grid_latitude, grid_longitude] + method: MEAN + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + # Plot the vertical line series. + - operator: plot.plot_vertical_line_series + series_coordinate: model_level_number + sequence_coordinate: hour + + # Make a single NetCDF with all the data inside it. + - operator: write.write_cube_to_nc + overwrite: True diff --git a/src/CSET/recipes/generic_mlevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml b/src/CSET/recipes/generic_mlevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml new file mode 100644 index 000000000..60ce9d0e3 --- /dev/null +++ b/src/CSET/recipes/generic_mlevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml @@ -0,0 +1,27 @@ +category: Model Level Spatial +title: $MODEL_NAME $VARNAME $MLEVEL Level Spatial Plot case aggregation by hour of day +description: | + Extracts ands plots the $VARNAME from a file at model level $MLEVEL. The cases + are aggregated together by keeping the hour of day consistent. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + variable_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + model_level_constraint: + operator: constraints.generate_level_constraint + coordinate: "model_level_number" + levels: $MLEVEL + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + - operator: plot.spatial_contour_plot + sequence_coordinate: hour + stamp_coordinate: realization + + - operator: write.write_cube_to_nc + overwrite: True diff --git a/src/CSET/recipes/generic_plevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml b/src/CSET/recipes/generic_plevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml new file mode 100644 index 000000000..540d47e7f --- /dev/null +++ b/src/CSET/recipes/generic_plevel_domain_mean_vertical_profile_series_case_aggregation_hour_of_day.yaml @@ -0,0 +1,34 @@ +category: Profiles +title: $MODEL_NAME Domain horizontal mean $VARNAME vertical profile as series case aggregation by hour of day +description: | + Plots a time series of vertical profiles for the domain mean $VARNAME using a + log pressure coordinate. Multiple cases are aggregated together keeping the + hour of day consistent. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + variable_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + pressure_level_constraint: + operator: constraints.generate_level_constraint + coordinate: pressure + levels: "*" + + - operator: collapse.collapse + coordinate: [grid_latitude, grid_longitude] + method: MEAN + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + # Plot the vertical line series. + - operator: plot.plot_vertical_line_series + series_coordinate: pressure + sequence_coordinate: hour + + # Make a single NetCDF with all the data inside it. + - operator: write.write_cube_to_nc + overwrite: True diff --git a/src/CSET/recipes/generic_plevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml b/src/CSET/recipes/generic_plevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml new file mode 100644 index 000000000..8f2684d8a --- /dev/null +++ b/src/CSET/recipes/generic_plevel_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml @@ -0,0 +1,26 @@ +category: Pressure Level Spatial +title: $MODEL_NAME $VARNAME $PLEVEL Level Spatial Plot case aggregation by hour of day +description: | + Extracts ands plots the $PLEVELNAME from $MODEL_NAME at pressure level $PLEVEL. + Multiple cases are aggregated together keeping the hour of day consistent. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + variable_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + pressure_level_constraint: + operator: constraints.generate_level_constraint + coordinate: pressure + levels: $PLEVEL + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + - operator: plot.spatial_contour_plot + sequence_coordinate: hour + + - operator: write.write_cube_to_nc + overwrite: True diff --git a/src/CSET/recipes/generic_surface_domain_mean_time_series_case_aggregation_hour_of_day.yaml b/src/CSET/recipes/generic_surface_domain_mean_time_series_case_aggregation_hour_of_day.yaml new file mode 100644 index 000000000..871eb0e55 --- /dev/null +++ b/src/CSET/recipes/generic_surface_domain_mean_time_series_case_aggregation_hour_of_day.yaml @@ -0,0 +1,35 @@ +category: Time Series +title: $MODEL_NAME Domain mean surface $VARNAME time series case aggregation by hour of day +description: | + Plots a time series of the domain mean surface $VARNAME by averaging over + all cases by using a consistent hour of day. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + varname_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + cell_methods_constraint: + operator: constraints.generate_cell_methods_constraint + cell_methods: [] + pressure_level_constraint: + operator: constraints.generate_level_constraint + coordinate: "pressure" + levels: [] + + - operator: collapse.collapse + coordinate: [grid_latitude, grid_longitude] + method: MEAN + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + # Make a single NetCDF with all the data inside it. + - operator: write.write_cube_to_nc + overwrite: True + + # Plot the data. + - operator: plot.plot_line_series + series_coordinate: hour diff --git a/src/CSET/recipes/generic_surface_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml b/src/CSET/recipes/generic_surface_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml new file mode 100644 index 000000000..0d7c25afa --- /dev/null +++ b/src/CSET/recipes/generic_surface_spatial_plot_sequence_case_aggregation_mean_hour_of_day.yaml @@ -0,0 +1,29 @@ +category: Surface Spatial Plot +title: $MODEL_NAME Surface $VARNAME case aggregation by hour of day +description: | + Extracts and plots the surface $VARNAME for all times in $MODEL_NAME. Case + aggregation occurs over hour of day. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + varname_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + cell_methods_constraint: + operator: constraints.generate_cell_methods_constraint + cell_methods: [] + pressure_level_constraint: + operator: constraints.generate_level_constraint + coordinate: "pressure" + levels: [] + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + - operator: plot.spatial_pcolormesh_plot + sequence_coordinate: hour + + - operator: write.write_cube_to_nc + overwrite: True diff --git a/src/CSET/recipes/surface_spatial_difference_case_aggregation_mean_hour_of_day.yaml b/src/CSET/recipes/surface_spatial_difference_case_aggregation_mean_hour_of_day.yaml new file mode 100644 index 000000000..956e89deb --- /dev/null +++ b/src/CSET/recipes/surface_spatial_difference_case_aggregation_mean_hour_of_day.yaml @@ -0,0 +1,31 @@ +category: Surface Spatial Plot Difference +title: Surface $VARNAME difference ($BASE_MODEL - $OTHER_MODEL) case aggregation by hour of day +description: | + Extracts and plot the difference in surface $VARNAME for all times. The cases + are aggregated over hour of day. + +steps: + - operator: read.read_cubes + constraint: + operator: constraints.combine_constraints + varname_constraint: + operator: constraints.generate_var_constraint + varname: $VARNAME + cell_methods_constraint: + operator: constraints.generate_cell_methods_constraint + cell_methods: [] + pressure_level_constraint: + operator: constraints.generate_level_constraint + coordinate: "pressure" + levels: [] + + - operator: misc.difference + + - operator: collapse.collapse_by_hour_of_day + method: MEAN + + - operator: plot.spatial_pcolormesh_plot + sequence_coordinate: hour + + - operator: write.write_cube_to_nc + overwrite: True