Skip to content

Commit

Permalink
Convert recipe and include file
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrost-mo committed Aug 20, 2024
1 parent 64f57da commit ae3e959
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% if DOMAIN_SURFACE_HISTOGRAM_SERIES_FIELD %}
{% for equivalent_field in restructure_field_list(SURFACE_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
[runtime]
{% for model_field in SURFACE_MODEL_FIELDS %}
[[pre_process_deterministic_domain_surface_histogram_series_{{model_field}}]]
inherit = PARALLEL
[[generic_surface_histogram_series_m{{model_number}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_surface_histogram_series.yaml"
CSET_ADDOPTS = "--VARNAME='{{model_field}}'"

[[collate_deterministic_domain_surface_histogram_series_{{model_field}}]]
inherit = COLLATE
[[[environment]]]
CSET_RECIPE_NAME = "generic_surface_histogram_series.yaml"
CSET_ADDOPTS = "--VARNAME='{{model_field}}'"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number-1]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
{% endfor %}
{% endfor %}
{% endif %}
11 changes: 0 additions & 11 deletions src/CSET/recipes/generic_surface_histogram_series.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,11 @@ parallel:
variable_constraint:
operator: constraints.generate_var_constraint
varname: $VARNAME
validity_time_constraint:
operator: constraints.generate_time_constraint
time_start: $VALIDITY_TIME
pressure_level_constraint:
operator: constraints.generate_level_constraint
coordinate: pressure
levels: []

- operator: write.write_cube_to_nc
filename: intermediate/histogram


collate:
- operator: read.read_cube
filename_pattern: intermediate/*.nc

- operator: write.write_cube_to_nc
overwrite: True

Expand Down

0 comments on commit ae3e959

Please sign in to comment.