Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference plots and other stuff #1025

Draft
wants to merge 42 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c50d62d
Generalise spatial plot log message
jfrost-mo Dec 3, 2024
31c75cf
Add utility function for equalising attributes
jfrost-mo Dec 3, 2024
b80ad3a
Add utility function to get forecast initiation time
jfrost-mo Dec 3, 2024
f1d67ca
Add forecast reference time constraint
jfrost-mo Dec 3, 2024
8be065a
Add lead_time convertion and difference operators
jfrost-mo Dec 3, 2024
28ac379
Handle globbing anywhere in input path
jfrost-mo Dec 9, 2024
795cd8f
Extract forecast_reference_time from UM data
jfrost-mo Dec 9, 2024
bc9dcd5
Format JSON when writing
jfrost-mo Dec 9, 2024
e918e4d
Improve fully_equalise_attributes
jfrost-mo Dec 9, 2024
22bb5e6
Add model name to cube metadata
jfrost-mo Dec 9, 2024
d73847d
Make convert_to_leadtime model agnostic
jfrost-mo Dec 9, 2024
1c6ee77
Add attribute constraint operator
jfrost-mo Dec 9, 2024
a06e78e
Add forecast lead time constraint operator
jfrost-mo Dec 9, 2024
f79c74c
WIP Difference operator
jfrost-mo Dec 9, 2024
5621a1b
Handle sorting files outside the current directory
jfrost-mo Dec 9, 2024
f959d3b
Use bwr colorbar for difference plots
jfrost-mo Dec 10, 2024
dbe3554
Limit domain statistics to 3 s.f. and move below plot
jfrost-mo Jan 9, 2025
2c7a3c9
Reformat code
jfrost-mo Jan 9, 2025
022e6ba
Reduce useless debug messages
jfrost-mo Jan 9, 2025
9012f9e
Name differences per variable
jfrost-mo Jan 9, 2025
5accaf4
Move model identification into difference operator
jfrost-mo Jan 10, 2025
0629ed7
Rename MODLE_NUMBER to MODEL_IDENTIFERS
jfrost-mo Jan 10, 2025
fbd053d
WIP marking a model as base
jfrost-mo Jan 10, 2025
d306048
Replace all remaining usage of typing.Union with `|`
jfrost-mo Jan 13, 2025
398d2d4
Pass recipe input as strings rather than Paths
jfrost-mo Jan 13, 2025
f779198
Consistently use MODEL_IDENTIFIER in fetch_data
jfrost-mo Jan 13, 2025
d029b74
Move comment to relevent location
jfrost-mo Jan 13, 2025
dd6c1fc
Seperate words with _ for easier to read function names
jfrost-mo Jan 13, 2025
ee2247b
Use integer to mark base cube
jfrost-mo Jan 13, 2025
ca71c69
Adjust tests for renamed data_directories function
jfrost-mo Jan 13, 2025
5ecb159
Mark first path loaded as comparison base
jfrost-mo Jan 13, 2025
b304bae
fixup! Seperate words with _ for easier to read function names
jfrost-mo Jan 13, 2025
bc9ae49
Test setting of cset_comparison_base attribute
jfrost-mo Jan 13, 2025
4861bfa
Use cset_comparison_base to decide comparison order in difference
jfrost-mo Jan 13, 2025
21fedec
Convert various things to model_id
jfrost-mo Jan 13, 2025
162fafc
Move to a simple list for surface fields
jfrost-mo Jan 13, 2025
2b75d61
Merge lead time into initiation time cycling
jfrost-mo Jan 13, 2025
b8588e0
WIP template for rose-suite.conf
jfrost-mo Jan 13, 2025
1fc4c3d
Generate rose-meta.conf
jfrost-mo Jan 13, 2025
5681613
Fix workflow errors
jfrost-mo Jan 14, 2025
ef427b0
Fix test failures in fetch data
jfrost-mo Jan 14, 2025
3be6135
Add recipe and include for surface spatial difference plots
jfrost-mo Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions cset-workflow/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ description = Workflow for running CSET.
URL = https://metoffice.github.io/CSET

# Import all of our Jinja utilities for use in the workflow.
{% from "jinja_utils" import get_models, glob, max, min, zip, restructure_field_list, sanitise_task_name %}
{% from "jinja_utils" import get_models, glob, max, min, zip, sanitise_task_name %}
# Load a list a model detail dictionaries.
{% set models = get_models(ROSE_SUITE_VARIABLES) %}


[scheduling]
# There is rarely a reason to manually set the runahead limit, as we will
# usually be limited by number of concurrent jobs.
{% if CSET_RUNAHEAD_LIMIT|default(False) %}
runahead limit = P{{CSET_RUNAHEAD_LIMIT}}
{% endif %}

# Initial and final cycle points cover the entire period of interest.
{% if CSET_CYCLING_MODE == "case_study" %}
initial cycle point = {{ min(CSET_CASE_DATES) }}
Expand Down Expand Up @@ -101,9 +95,6 @@ URL = https://metoffice.github.io/CSET
[[FETCH_DATA]]
script = rose task-run -v --app-key=fetch_fcst
execution time limit = PT1H
[[[environment]]]
CSET_ANALYSIS_OFFSET = {{CSET_ANALYSIS_OFFSET}}
CSET_ANALYSIS_PERIOD = {{CSET_ANALYSIS_PERIOD}}

[[METPLUS]]
[[[environment]]]
Expand Down Expand Up @@ -142,17 +133,17 @@ URL = https://metoffice.github.io/CSET
WEB_DIR = {{WEB_DIR}}

{% for model in models %}
[[fetch_fcst_m{{model["number"]}}]]
[[fetch_fcst_m{{model["id"]}}]]
# Fetch data from disk or a file based archival system.
inherit = FETCH_DATA
[[[environment]]]
MODEL_NUMBER = {{model["number"]}}
MODEL_IDENTIFIER = {{model["id"]}}
ROSE_APP_COMMAND_KEY = {{model["data_source"]}}
DATA_PATH = {{model["data_path"]}}
DATE_TYPE = {{model["date_type"]}}
{% if model["date_type"] != "initiation" %}
DATA_PERIOD = {{model["data_period"]}}
{% endif %}
DATA_PERIOD = {{model["data_period"]}}
ANALYSIS_OFFSET = {{model["analysis_offset"]}}
ANALYSIS_PERIOD = {{model["analysis_period"]}}
{% endfor %}

[[housekeeping_raw]]
Expand Down
4 changes: 2 additions & 2 deletions cset-workflow/includes/aoa_diag.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% for model in models %}
{% for plev in AOA_PLEV %}
[runtime]
[[aoa_diag_m{{model["number"]}}_plev{{plev}}]]
[[aoa_diag_m{{model["id"]}}_plev{{plev}}]]
inherit = PROCESS
execution time limit = PT60M

Expand All @@ -13,7 +13,7 @@
[[[environment]]]
CSET_RECIPE_NAME = "ageofair.yaml"
CSET_ADDOPTS = "--AOA_PLEV={{plev}} --AOA_CYCLIC={{AOA_CYCLIC}} --MODEL_NAME='{{model["name"]}}'"
MODEL_NUMBER = {{model["number"]}}
MODEL_IDENTIFIERS = {{model["id"]}}
{% endfor %}
{% endfor %}
{% endif %}
8 changes: 4 additions & 4 deletions cset-workflow/includes/basic_qq_plot.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@

{# 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() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[generic_basic_qq_plot_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[generic_basic_qq_plot_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_basic_qq_plot.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
#}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{% if DOMAIN_HISTOGRAM_SERIES|default(False) %}
{% for equivalent_field in restructure_field_list(PRESSURE_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
{% for plevel in PRESSURE_LEVELS %}
[runtime]
[[generic_plevel_histogram_series_m{{model_number}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(plevel)}}]]
[[generic_plevel_histogram_series_m{{model_identifier}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(plevel)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_plevel_histogram_series.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--PLEVEL='{{plevel}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% if DOMAIN_MEAN_SURFACE_TIME_SERIES|default(False) %}
{% for equivalent_field in restructure_field_list(SURFACE_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[generic_surface_domain_mean_time_series_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[generic_surface_domain_mean_time_series_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_surface_domain_mean_time_series.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% if DOMAIN_MEAN_VERTICAL_PROFILE_MODELLEVEL_SERIES|default(False) %}
{% for equivalent_field in restructure_field_list(MODEL_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[generic_mlevel_domain_mean_vertical_profile_series_m{{model_number}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(mlevel)}}]]
[[generic_mlevel_domain_mean_vertical_profile_series_m{{model_identifier}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(mlevel)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_mlevel_domain_mean_vertical_profile_series.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% if DOMAIN_MEAN_VERTICAL_PROFILE_SERIES|default(False) %}
{% for equivalent_field in restructure_field_list(PRESSURE_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[generic_plevel_domain_mean_vertical_profile_series_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[generic_plevel_domain_mean_vertical_profile_series_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_plevel_domain_mean_vertical_profile_series.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% if DOMAIN_SURFACE_HISTOGRAM_SERIES_FIELD|default(False) %}
{% for equivalent_field in restructure_field_list(SURFACE_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[generic_surface_histogram_series_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[generic_surface_histogram_series_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_surface_histogram_series.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
4 changes: 2 additions & 2 deletions cset-workflow/includes/deterministic_plot_cape_ratio.cylc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% if DETERMINISTIC_PLOT_CAPE_RATIO|default(False) %}
{% for model in models %}
[runtime]
[[plot_cape_ratio_m{{model["number"]}}]]
[[plot_cape_ratio_m{{model["id"]}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "CAPE_ratio_plot.yaml"
CSET_ADDOPTS = """
--MODEL_NAME='{{model["name"]}}'
"""
MODEL_NUMBER = {{model["number"]}}
MODEL_IDENTIFIERS = {{model["id"]}}
{% endfor %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% if DETERMINISTIC_PLOT_INFLOW_PROPERTIES|default(False) %}
{% for model in models %}
[runtime]
[[inflow_layer_properties_plot_m{{model["number"]}}]]
[[inflow_layer_properties_plot_m{{model["id"]}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "inflow_layer_properties_plot.yaml"
CSET_ADDOPTS = """
--MODEL_NAME='{{model["name"]}}'
"""
MODEL_NUMBER = {{model["number"]}}
MODEL_IDENTIFIERS = {{model["id"]}}
{% endfor %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{% if SURFACE_SINGLE_POINT_TIME_SERIES|default(False) %}
{% for equivalent_field in restructure_field_list(SURFACE_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[generic_surface_single_point_time_series_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[generic_surface_single_point_time_series_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_surface_single_point_time_series.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
--LONGITUDE_POINT='{{LONGITUDE_POINT}}'
--LATITUDE_POINT='{{LATITUDE_POINT}}'
--SINGLE_POINT_METHOD='{{SINGLE_POINT_METHOD}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
8 changes: 4 additions & 4 deletions cset-workflow/includes/mlevel_transect.cylc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% if EXTRACT_MLEVEL_TRANSECT|default(False) %}
{% for equivalent_field in restructure_field_list(MODEL_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[mlevel_transect_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[mlevel_transect_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
# Transect calculation can take a while, so increase the time limit.
execution time limit = PT60M
Expand All @@ -11,11 +11,11 @@
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--VERTICAL_COORDINATE='model_level_number'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
--START_COORDS='{{MLEVEL_TRANSECT_STARTCOORDS}}'
--FINISH_COORDS='{{MLEVEL_TRANSECT_FINISHCOORDS}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
8 changes: 4 additions & 4 deletions cset-workflow/includes/plevel_transect.cylc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% if EXTRACT_PLEVEL_TRANSECT|default(False) %}
{% for equivalent_field in restructure_field_list(PRESSURE_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
[runtime]
[[plevel_transect_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[plevel_transect_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
# Transect calculation can take a while, so increase the time limit.
execution time limit = PT60M
Expand All @@ -11,11 +11,11 @@
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--VERTICAL_COORDINATE='pressure'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
--START_COORDS='{{PLEVEL_TRANSECT_STARTCOORDS}}'
--FINISH_COORDS='{{PLEVEL_TRANSECT_FINISHCOORDS}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endif %}
8 changes: 4 additions & 4 deletions cset-workflow/includes/plot_spatial_mlevel_model_field.cylc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{% if PLOT_SPATIAL_MODEL_LEVEL_MODEL_FIELD|default(False) %}
{% for equivalent_field in restructure_field_list(MODEL_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
{% for mlevel in UM_MODEL_LEVELS %}
[runtime]
[[generic_mlevel_spatial_plot_sequence_m{{model_number}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(mlevel)}}]]
[[generic_mlevel_spatial_plot_sequence_m{{model_identifier}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(mlevel)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_mlevel_spatial_plot_sequence.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MLEVEL='{{mlevel}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions cset-workflow/includes/plot_spatial_plevel_model_field.cylc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% if PLOT_SPATIAL_PRESSURE_LEVEL_MODEL_FIELD|default(False) %}
{% for equivalent_field in restructure_field_list(PRESSURE_LEVEL_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for model_identifier, field in equivalent_field.items() %}
{% for plevel in PRESSURE_LEVELS %}
[runtime]
[[generic_plevel_spatial_plot_sequence_m{{model_number}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(plevel)}}]]
[[generic_plevel_spatial_plot_sequence_m{{model_identifier}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(plevel)}}]]
inherit = PROCESS
[[[directives]]]
--mem=4000
Expand All @@ -12,9 +12,9 @@
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--PLEVEL='{{plevel}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{models[model_identifier]["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model_identifier}}
{% endfor %}
{% endfor %}
{% endfor %}
Expand Down
10 changes: 5 additions & 5 deletions cset-workflow/includes/plot_spatial_surface_model_field.cylc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{% if PLOT_SPATIAL_SURFACE_MODEL_FIELD|default(False) %}
{% for equivalent_field in restructure_field_list(SURFACE_MODEL_FIELDS) %}
{% for model_number, field in equivalent_field.items() %}
{% for field in SURFACE_MODEL_FIELDS %}
{% for model in models %}
[runtime]
[[generic_spatial_plot_time_series_m{{model_number}}_{{sanitise_task_name(field)}}]]
[[generic_spatial_plot_time_series_m{{model["id"]}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "generic_surface_spatial_plot_sequence.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--MODEL_NAME='{{models[model_number]["name"]}}'
--MODEL_NAME='{{model["name"]}}'
"""
MODEL_NUMBER = {{model_number}}
MODEL_IDENTIFIERS = {{model["id"]}}
{% endfor %}
{% endfor %}
{% endif %}
19 changes: 19 additions & 0 deletions cset-workflow/includes/spatial_surface_difference.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% if SPATIAL_SURFACE_DIFFERENCE|default(False) %}
{% set base_model = models|selectattr("id", 0)|first %}
# As we use model 0 as the base model we skip it here.
{% for model in models|selectattr("id") %}
{% for field in SURFACE_MODEL_FIELDS %}
[runtime]
[[spatial_surface_difference_m{{model_identifier}}_{{sanitise_task_name(field)}}]]
inherit = PROCESS
[[[environment]]]
CSET_RECIPE_NAME = "surface_spatial_difference.yaml"
CSET_ADDOPTS = """
--VARNAME='{{field}}'
--BASE_MODEL='{{base_model["name"]}}'
--OTHER_MODEL='{{model["name"]}}'
"""
MODEL_IDENTIFIERS = '0 {{model_identifier}}'
{% endfor %}
{% endfor %}
{% endif %}
Loading
Loading