The step within cmor/fix routine which ensures that a dataset's standard name is in the iris.std_names.STD_NAMES can fail for some CMIP7 variables, presumably because the library has not been updated in the current version of iris used by ESMValCore/Tool v2.14.0 (i.e the latest, v3.15.0).
For example, the CMIP7 entry for od550csaer_tavg-u-hxy-u, https://github.com/ESMValGroup/ESMValCore/blob/main/esmvalcore/cmor/tables/cmip7/tables/CMIP7_aerosol.json#L2141
File "/fs/site8/eccc/crd/cccma/users/rkw001/code/esmvalcore/esmvalcore_v2.14_a4d/esmvalcore/preprocessor/__init__.py", line 563, in _run_preproc_function
return function(items, **kwargs)
File "/fs/site8/eccc/crd/cccma/users/rkw001/code/esmvalcore/esmvalcore_v2.14_a4d/esmvalcore/cmor/fix.py", line 204, in fix_metadata
cube_list = fix.fix_metadata(cube_list)
File "/fs/site8/eccc/crd/cccma/users/rkw001/code/esmvalcore/esmvalcore_v2.14_a4d/esmvalcore/cmor/_fixes/fix.py", line 395, in fix_metadata
cube = self._fix_standard_name(cube)
File "/fs/site8/eccc/crd/cccma/users/rkw001/code/esmvalcore/esmvalcore_v2.14_a4d/esmvalcore/cmor/_fixes/fix.py", line 509, in _fix_standard_name
cube.standard_name = self.vardef.standard_name
^^^^^^^^^^^^^^^^^^
File "/fs/site8/eccc/crd/cccma/users/rkw001/envs/a4d_env_esmvalv214/lib/python3.13/site-packages/iris/common/mixin.py", line 259, in standard_name
self._metadata_manager.standard_name = _get_valid_standard_name(name)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/fs/site8/eccc/crd/cccma/users/rkw001/envs/a4d_env_esmvalv214/lib/python3.13/site-packages/iris/common/mixin.py", line 56, in _get_valid_standard_name
raise ValueError("{!r} is not a valid standard_name".format(name))
ValueError: 'atmosphere_optical_thickness_due_to_ambient_aerosol_particles_assuming_clear_sky' is not a valid standard_name
This looks to be an iris issue,
import iris.std_names
In [3]: "atmosphere_optical_thickness_due_to_ambient_aerosol_particles_assuming_clear_sky" in iris.std_names.STD_NAMES
Out[3]: False
In [7]: iris.__version__
Out[7]: '3.15.0'
However, relevant to ESMValCore is that I cannot get around this check even when setting cmor_table/strict: false
The step within
cmor/fixroutine which ensures that a dataset's standard name is in theiris.std_names.STD_NAMEScan fail for some CMIP7 variables, presumably because the library has not been updated in the current version ofirisused by ESMValCore/Tool v2.14.0 (i.e the latest, v3.15.0).For example, the CMIP7 entry for
od550csaer_tavg-u-hxy-u, https://github.com/ESMValGroup/ESMValCore/blob/main/esmvalcore/cmor/tables/cmip7/tables/CMIP7_aerosol.json#L2141This looks to be an
irisissue,However, relevant to ESMValCore is that I cannot get around this check even when setting
cmor_table/strict: false