Coverage for mlair/configuration/era5_settings.py: 38%
6 statements
« prev ^ index » next coverage.py v6.4.2, created at 2023-06-01 13:03 +0000
« prev ^ index » next coverage.py v6.4.2, created at 2023-06-01 13:03 +0000
1"""Settings to access not public era5 data."""
3from typing import Tuple
6def era5_settings(sampling="daily") -> Tuple[str, str]:
7 """
8 Check for sampling as only hourly resolution is supported by era5 and return path on HPC systems.
10 :param sampling: temporal resolution to load data for, only hourly supported (default "daily")
12 :return: HPC path
13 """
14 if sampling == "hourly": # pragma: no branch
15 ERA5_DATA_PATH = "."
16 FILE_NAMES = "*.nc"
17 else:
18 raise NameError(f"Given sampling {sampling} is not supported, only hourly sampling can be used.")
19 return ERA5_DATA_PATH, FILE_NAMES