Skip to content

Commit 6db9bca

Browse files
committed
Rather than setting leveltype and level to None, add cloud_area_fraction to 'Metno.get_ncname', thus blacklisting them from getting _0m added.
1 parent 9476431 commit 6db9bca

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

bris/conventions/cf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ def get_metadata(anemoi_variable: str) -> dict:
3232
"vis": ("visibility_in_air", "height", 0),
3333
"cbh": ("cloud_base_altitude", "height", 0),
3434
"ws": ("wind_speed", "height", 10),
35-
"fog": ("fog_type_cloud_area_fraction", None, None),
36-
"hcc": ("high_type_cloud_area_fraction", None, None),
37-
"lcc": ("low_type_cloud_area_fraction", None, None),
38-
"mcc": ("medium_type_cloud_area_fraction", None, None),
39-
"tcc": ("cloud_area_fraction", None, None),
35+
"fog": ("fog_type_cloud_area_fraction", "height", 0),
36+
"hcc": ("high_type_cloud_area_fraction", "height", 0),
37+
"lcc": ("low_type_cloud_area_fraction", "height", 0),
38+
"mcc": ("medium_type_cloud_area_fraction", "height", 0),
39+
"tcc": ("cloud_area_fraction", "height", 0),
4040
"ssrd": (
4141
"integral_of_surface_downwelling_shortwave_flux_in_air_wrt_time",
4242
"height",

bris/conventions/metno.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ def get_ncname(self, cfname: str, leveltype: str, level: int):
2424
"air_pressure_at_sea_level",
2525
"wind_speed_of_gust",
2626
"land_sea_mask",
27+
"fog_type_cloud_area_fraction",
28+
"high_type_cloud_area_fraction",
29+
"low_type_cloud_area_fraction",
30+
"medium_type_cloud_area_fraction",
31+
"cloud_area_fraction",
2732
]:
2833
# Prevent _0m from being added at the end of variable name
2934
ncname = f"{cfname}"

0 commit comments

Comments
 (0)