-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Derived variables specify which input variables they need for the derivation. In many cases this will work just fine for CMIP7, but in some cases, this will need to be updated.
For example, the CMIP7 project may not be one of the available options:
ESMValCore/esmvalcore/preprocessor/_derive/amoc.py
Lines 15 to 26 in da81d5f
| def required(project): | |
| """Declare the variables needed for derivation.""" | |
| if project == "CMIP5": | |
| required = [{"short_name": "msftmyz", "mip": "Omon"}] | |
| elif project == "CMIP6": | |
| required = [ | |
| {"short_name": "msftmz", "optional": True}, | |
| {"short_name": "msftyz", "optional": True}, | |
| ] | |
| else: | |
| msg = f"Project {project} can not be used for Amoc derivation." | |
| raise ValueError(msg) |
Or the mip needs to be updated:
ESMValCore/esmvalcore/preprocessor/_derive/et.py
Lines 16 to 18 in 1e53ae9
| def required(project): # noqa: ARG004 | |
| """Declare the variables needed for derivation.""" | |
| return [{"short_name": "hfls", "mip": "Amon"}] |
(would need to be
atmos for CMIP7)
Or if, if some of the input variables have a different branding suffix, a special entry for CMIP7 with a branding suffix may need to be added:
ESMValCore/esmvalcore/preprocessor/_derive/vegfrac.py
Lines 25 to 34 in 1e53ae9
| def required(project: str) -> list[Facets]: | |
| """Declare the variables needed for derivation.""" | |
| sftlf: Facets = {"short_name": "sftlf", "mip": "fx"} | |
| if project == "CMIP5": | |
| sftlf["ensemble"] = "r0i0p0" | |
| return [ | |
| {"short_name": "baresoilFrac"}, | |
| {"short_name": "residualFrac"}, | |
| sftlf, | |
| ] |
(would need to be
sftlf: Facets = {"short_name": "sftlf", "branding_suffix": "ti-u-hxy-u", "mip": "atmos"} for CMIP7)