Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions esmvalcore/_recipe/to_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@

_ALIAS_INFO_KEYS: tuple[str, ...] = (
"project",
"activity",
"driver",
"dataset",
"rcm_version",
"driver",
"ensemble",
"exp",
"sub_experiment",
"ensemble",
"frequency",
"domain",
"region",
"grid",
"version",
)
"""List of keys to be used to compose the alias, ordered by priority."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from esmvalcore.cmor.fix import Fix

if TYPE_CHECKING:
from collections.abc import Sequence

from iris.cube import Cube


class Snw(Fix):
"""Fixes for snw."""

def fix_metadata(self, cubes: Sequence[Cube]) -> Sequence[Cube]:
cube = self.get_cube_from_list(cubes)
cube = cube.copy()
cube.remove_coord("height")
return [cube]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Fixes for rcm HadREM3-GA7-05 driven by CNRM-CERFACS-CNRM-CM5."""

from __future__ import annotations

from esmvalcore.cmor._fixes.cordex.cordex_fixes import (
MOHCHadREM3GA705 as BaseFix,
)

Tas = BaseFix

Pr = BaseFix
AllVars = BaseFix
3 changes: 3 additions & 0 deletions esmvalcore/cmor/_fixes/cordex/cordex_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def fix_metadata(self, cubes):
iris.cube.CubeList
"""
for cube in cubes:
if self.vardef.standard_name:
cube.standard_name = self.vardef.standard_name
cube.long_name = self.vardef.long_name
cube.coord("latitude").var_name = "lat"
cube.coord("longitude").var_name = "lon"
for coord in cube.coords("time"):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from esmvalcore.cmor._fixes.cordex.cnrm_cerfacs_cnrm_cm5.cosmo_crclim_v1_1 import (
Snw as BaseSnw,
)


class Snw(BaseSnw):
"""Fixes for snw."""
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
MOHCHadREM3GA705 as BaseFix,
)

Tas = BaseFix

Pr = BaseFix
AllVars = BaseFix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from esmvalcore.cmor._fixes.cordex.cnrm_cerfacs_cnrm_cm5.cosmo_crclim_v1_1 import (
Snw as BaseSnw,
)


class Snw(BaseSnw):
"""Fixes for snw."""
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
MOHCHadREM3GA705 as BaseFix,
)

Tas = BaseFix

Pr = BaseFix
AllVars = BaseFix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from esmvalcore.cmor._fixes.cordex.cnrm_cerfacs_cnrm_cm5.cosmo_crclim_v1_1 import (
Snw as BaseSnw,
)


class Snw(BaseSnw):
"""Fixes for snw."""
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
MOHCHadREM3GA705 as BaseFix,
)

Tas = BaseFix

Pr = BaseFix
AllVars = BaseFix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from esmvalcore.cmor._fixes.cordex.cnrm_cerfacs_cnrm_cm5.cosmo_crclim_v1_1 import (
Snw as BaseSnw,
)


class Snw(BaseSnw):
"""Fixes for snw."""
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
MOHCHadREM3GA705 as BaseFix,
)

Tas = BaseFix

Pr = BaseFix
AllVars = BaseFix
12 changes: 12 additions & 0 deletions esmvalcore/config/configurations/defaults/extra_facets_cordex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@ projects:
'*':
'*':
use_standard_grid: true
COSMO-crCLIM-v1-1:
'*':
'*':
use_standard_grid: true # lat/lon coords missing bounds
HIRHAM5:
'*':
'*':
use_standard_grid: true
RACMO22E:
'*':
'*':
use_standard_grid: true # lat/lon coords missing bounds
RCA4:
'*':
'*':
use_standard_grid: true # lat/lon coords missing bounds