-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Is v2.14.0 meant to support CMIP7 CMORized datasets?
I am currently testing ESMValTool with preliminary CMIP7-CMORized CCCma model output, as a means to validate our CMORization procedure.
I have installed v2.14.0 by cloning the github repositories for both ESMValCore and ESMValTool (installing from source via mamba, per the instructions), using branches v2.14.0 for both.
Describe the bug
config_developer.yml
I think the config_developer.yml file has not been updated for the CMIP7 project?
https://github.com/ESMValGroup/ESMValCore/blob/v2.14.0/esmvalcore/config-developer.yml#L29
CMIP7:
cmor_path: "cmip7"
cmor_strict: true
cmor_type: "CMIP6"
With the above, I get the following error:
...
)
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/local.py", line 294, in _get_output_file
preprocessor_filename_template: "{cfg["output_file"]}"
~~~^^^^^^^^^^^^^^^
KeyError: 'output_file'
2026-03-16 15:55:04,919 UTC [3494845] INFO esmvalcore._main:805
If you have a question or need help, please start a new discussion on https://github.com/ESMValGroup/ESMValTool/discussions
If you suspect this is a bug, please open an issue on https://github.com/ESMValGroup/ESMValTool/issues
To make it easier to find out what the problem is, please consider attaching the files run/recipe_*.yml and run/main_log_debug.txt from the output directory.
If I modify this file, the recipe runs successfully.
CMIP7:
cmor_path: "cmip7"
cmor_strict: false
cmor_type: "CMIP7"
output_file: '{project}_{short_name}_{branding_suffix}_{frequency}_{region}_{grid}_{dataset}_{exp}_{ensemble}'
CMIP7 facets
What is the meaning of mip in the context of CMIP7 datasets? I had to include it in my recipe (partial example below) to avoid the errors listed below.
...
diagnostics:
diagnostic:
description: Time mean map - Ice Water Path (CMIP7.3hr.clivi.tavg-u-hxy-u)
themes: []
realms: []
variables:
clivi:
preprocessor: spatial_pattern_clivi
additional_datasets:
- runid: cmip7-v51-ref
project: CanESM_dev_CMIP7 # I've added this project to config-developer.yml the similarly as CMIP7
subdir: rrd001/canesm_runs/cmip7-v51-ref/data/nc_output
activity: CMIP
institute: CCCma
dataset: CanESM5-1
exp: piControl
ensemble: r1i1p1f1
cmor_type: CMIP7
version: v20190429
dataset_ID: CanESM5-1 (cmip7-v51-ref)
# timerange: P30Y/* # Do wildcard timeranges no longer work ???
timerange: 6000/6000
frequency: 3hr
short_name: clivi
branding_suffix: tavg-u-hxy-u
mip: 3hr # Mandatory????
region: glb
grid: gn
scripts:
quickplot_diag:
Error message:
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/recipe.py", line 92, in read_recipe_file
return Recipe(raw_recipe, session, recipe_file=filename)
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/recipe.py", line 919, in __init__
self.datasets = Dataset.from_recipe(recipe_file, session)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/dataset.py", line 167, in from_recipe
return datasets_from_recipe(recipe, session)
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/to_datasets.py", line 424, in datasets_from_recipe
variable_datasets = _get_datasets_for_variable(
recipe,
...<2 lines>...
session=session,
)
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/to_datasets.py", line 388, in _get_datasets_for_variable
for facets, supplementaries in _get_facets_from_recipe(
~~~~~~~~~~~~~~~~~~~~~~~^
recipe,
^^^^^^^
...<2 lines>...
session=session,
^^^^^^^^^^^^^^^^
):
^
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/to_datasets.py", line 362, in _get_facets_from_recipe
yield _get_dataset_facets_from_recipe(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
variable_group=variable_group,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
session=session,
^^^^^^^^^^^^^^^^
)
^
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/to_datasets.py", line 313, in _get_dataset_facets_from_recipe
check.variable(
~~~~~~~~~~~~~~^
facets,
^^^^^^^
...<7 lines>...
variable_group=variable_group,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/fs/site7/eccc/crd/cccma/users/scrd115/A4D/A4D_validation/A4D_standard_diagnostics__ESMVal214/esmvalcore/_recipe/check.py", line 184, in variable
raise RecipeError(msg)
esmvalcore.exceptions.RecipeError: Missing keys {'mip'} in
i.e., it failed here:
https://github.com/ESMValGroup/ESMValCore/blob/v2.14.0/esmvalcore/_recipe/check.py#L170
because mip is specified as a mandatory facet here:
https://github.com/ESMValGroup/ESMValCore/blob/v2.14.0/esmvalcore/_recipe/to_datasets.py#L312