diff --git a/src/anemoi/transform/variables/__init__.py b/src/anemoi/transform/variables/__init__.py index 0776b59..bb49775 100644 --- a/src/anemoi/transform/variables/__init__.py +++ b/src/anemoi/transform/variables/__init__.py @@ -40,10 +40,12 @@ def __eq__(self, other) -> bool: return False return self.name == other.name + @property @abstractmethod def is_pressure_level(self): pass + @property @abstractmethod def level(self): pass diff --git a/src/anemoi/transform/variables/variables.py b/src/anemoi/transform/variables/variables.py index 24679b6..53c4303 100644 --- a/src/anemoi/transform/variables/variables.py +++ b/src/anemoi/transform/variables/variables.py @@ -15,9 +15,11 @@ def __init__(self, name, data: dict) -> None: super().__init__(name) self.data = data + @property def is_pressure_level(self): return self.data.get("levtype", None) == "pl" + @property def level(self): return self.data.get("levelist", None)