Skip to content

Commit

Permalink
Convert transect recipe
Browse files Browse the repository at this point in the history
Q-Q plot recipe is partially converted, pending Issue #808.
  • Loading branch information
jfrost-mo committed Aug 23, 2024
1 parent ea5c1e0 commit d6ef034
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 229 deletions.
17 changes: 17 additions & 0 deletions cset-workflow/includes/basic_qq_plot.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,20 @@
"""
{% endfor %}
{% endif %}

{# Example code to use as basis for multi-model cycling:
{% for equivalent_field in restructure_field_list(PRESSURE_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
[runtime]
[[generic_basic_qq_plot_m{{model_number}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_basic_qq_plot.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number-1]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
{% endfor %}
{% endfor %}
#}
21 changes: 21 additions & 0 deletions cset-workflow/includes/mlevel_transect.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% if EXTRACT_MLEVEL_TRANSECT %}
{% for equivalent_field in restructure_field_list(MODEL_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
[runtime]
[[mlevel_transect_m{{model_number}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
# Transect calculation can take a while, so increase the time limit.
execution time limit = PT60M
[[[environment]]]
CSET_RECIPE_NAME = "transect.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--VERTICAL_COORDINATE='model_level_number'
--MODEL_NAME='{{models[model_number-1]["name"]}}'
--START_COORDS='{{MLEVEL_TRANSECT_STARTCOORDS}}'
--FINISH_COORDS='{{MLEVEL_TRANSECT_FINISHCOORDS}}'
"""
MODEL_NUMBER = {{model_number}}
{% endfor %}
{% endfor %}
{% endif %}
21 changes: 21 additions & 0 deletions cset-workflow/includes/plevel_transect.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% if EXTRACT_PLEVEL_TRANSECT %}
{% for equivalent_field in restructure_field_list(PRESSURE_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
[runtime]
[[plevel_transect_m{{model_number}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
# Transect calculation can take a while, so increase the time limit.
execution time limit = PT60M
[[[environment]]]
CSET_RECIPE_NAME = "transect.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--VERTICAL_COORDINATE='pressure'
--MODEL_NAME='{{models[model_number-1]["name"]}}'
--START_COORDS='{{PLEVEL_TRANSECT_STARTCOORDS}}'
--FINISH_COORDS='{{PLEVEL_TRANSECT_FINISHCOORDS}}'
"""
MODEL_NUMBER = {{model_number}}
{% endfor %}
{% endfor %}
{% endif %}
18 changes: 0 additions & 18 deletions cset-workflow/includes/transect.cylc

This file was deleted.

Loading

0 comments on commit d6ef034

Please sign in to comment.