Skip to content

Commit

Permalink
Merge pull request #697 from MetOffice/658_extend_um_vertical_plottin…
Browse files Browse the repository at this point in the history
…g_to_modellevel

Extend UM vertical plotting to model level
  • Loading branch information
Sylviabohnenstengel authored Jul 4, 2024
2 parents 415a908 + b192b8d commit d57c88b
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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='{{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='{{UM_MODEL_LEVELS}}'"
{% endfor %}
{% endif %}
24 changes: 24 additions & 0 deletions cset-workflow/meta/rose-meta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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, e.g: ["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.
Expand All @@ -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, e.g: [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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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 `model_level_number` 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_level_constraint
coordinate: "model_level_number"
levels: $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

0 comments on commit d57c88b

Please sign in to comment.