Skip to content

Commit

Permalink
#3724: Add Jinja2 exclude list. Not working for all recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbillowsMO committed Dec 17, 2024
1 parent 84c6a66 commit e803843
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 13 deletions.
40 changes: 27 additions & 13 deletions esmvaltool/utils/recipe_test_workflow/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
#!jinja2

# See "How to add a recipe to the RTW" documentation for more information. Recipe paths
# are specified relative to esmvaltool/recipes. For recipes in subdirectories,
# `--` stands for `/` since the latter is an illegal char.
{% set FAST_RECIPES =
[
'recipe_radiation_budget',
'recipe_albedolandcover',
'recipe_heatwaves_coldwaves',
'recipe_autoassess_landsurface_soilmoisture',
'recipe_consecdrydays',
'examples--recipe_python',
'recipe_ocean_multimap',
'recipe_ocean_amoc',
]
%}
# `recipe_ensclus` should be in fast: is in medium temporarily to avoid empty variable.
{% set MEDIUM_RECIPES =
[
'recipe_ensclus',
]
%}

[scheduler]
UTC mode = True

[task parameters]
# See "How to add a recipe to the RTW" documentation for more information.
# Recipe paths are specified relative to esmvaltool/recipes. For recipes in
# subdirectories, `--` stands for `/` since the latter is an illegal char.
fast = recipe_radiation_budget, \
recipe_albedolandcover, \
recipe_heatwaves_coldwaves, \
recipe_autoassess_landsurface_soilmoisture, \
recipe_consecdrydays, \
examples--recipe_python, \
recipe_ocean_multimap, \
recipe_ocean_amoc
medium = recipe_ensclus # Should be in fast: is in medium temporarily to
# avoid empty variable.
# By default all recipes are run. To override this, add to the RECIPES_TO_EXCLUDE
# list in your specific SITE `.cylc` file.
fast = {{ FAST_RECIPES | join(', ') }}
medium = {{ MEDIUM_RECIPES | join(', ') }}

[scheduling]
initial cycle point = now
Expand Down
17 changes: 17 additions & 0 deletions esmvaltool/utils/recipe_test_workflow/site/metoffice.cylc
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#!jinja2

# Add recipes you DO NOT want to run at your site here. (Both medium and fast
# recipes can be added to this list). NOTE: No error will be raised if you make a typo.
# It it recommended to double-check recipes are actually excluded.
{% set RECIPES_TO_EXCLUDE =
[
'examples--recipe_python',
'recipe_consecdrydays',
'recipe_heatwaves_coldwaves',
'recipe_radiation_budget',
]
%}

[task parameters]
fast = {{ FAST_RECIPES | reject("in", RECIPES_TO_EXCLUDE) | join(', ') }}
medium = {{ MEDIUM_RECIPES | reject("in", RECIPES_TO_EXCLUDE) | join(', ') }}

[runtime]
[[root]]
[[[environment]]]
Expand Down

0 comments on commit e803843

Please sign in to comment.