Skip to content

Commit

Permalink
Convert more recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrost-mo committed Aug 22, 2024
1 parent 47530b7 commit d6b08fe
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 60 deletions.
15 changes: 8 additions & 7 deletions cset-workflow/includes/deterministic_plot_cape_ratio.cylc
Original file line number Diff line number Diff line change
@@ -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 %}
15 changes: 8 additions & 7 deletions cset-workflow/includes/deterministic_plot_inflow_properties.cylc
Original file line number Diff line number Diff line change
@@ -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 %}
44 changes: 15 additions & 29 deletions src/CSET/recipes/CAPE_ratio_plot.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,29 @@
category: Diagnostics
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

Expand Down
24 changes: 7 additions & 17 deletions src/CSET/recipes/inflow_layer_properties_plot.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,27 @@
category: Diagnostics
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

Expand Down

0 comments on commit d6b08fe

Please sign in to comment.