Skip to content

Commit 3d7a8c6

Browse files
committed
Added static fields for EUPreciP
1 parent 412ef8c commit 3d7a8c6

13 files changed

Lines changed: 42 additions & 13 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ A plugin for [climetlab](https://github.com/ecmwf/climetlab) to retrieve the Eum
99

1010
Ease the download of the dataset time-aligned forecasts, reforecasts (hindcasts) and observations ([ERA5 reanalysis](https://www.ecmwf.int/en/forecasts/dataset/ecmwf-reanalysis-v5)).
1111

12-
> * **Climetlab plugin version**: 0.3.0
13-
> * **Intake catalogues version**: 0.2.1
12+
> * **Climetlab plugin version**: 0.3.1
13+
> * **Intake catalogues version**: 0.2.2
1414
> * **Base dataset version**: 1.0
1515
> * **EUPPBench dataset version**: 1.0
1616
> * **EUPreciPBench dataset version**: 0.5

climetlab_eumetnet_postprocessing_benchmark/EUPP/gridded/static_fields_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from ...config import EUPP_baseurl
99

10-
__version__ = "0.3.0"
10+
__version__ = "0.3.1"
1111

1212
_terms_of_use = """By downloading data from this dataset, you agree to the terms and conditions defined at
1313

climetlab_eumetnet_postprocessing_benchmark/EUPP/gridded/training_data_forecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from ...config import EUPP_baseurl
1111

12-
__version__ = "0.3.0"
12+
__version__ = "0.3.1"
1313

1414
_terms_of_use = """By downloading data from this dataset, you agree to the terms and conditions defined at
1515

climetlab_eumetnet_postprocessing_benchmark/EUPP/gridded/training_data_reforecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .training_data_forecasts import TrainingDataForecastSurface, TrainingDataForecastPressure,\
55
TrainingDataForecastSurfaceProcessed
66

7-
__version__ = "0.3.0"
7+
__version__ = "0.3.1"
88

99

1010
class TrainingDataReforecastSurface(TrainingDataForecastSurface):

climetlab_eumetnet_postprocessing_benchmark/EUPP/stations/training_data_forecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from ...config import EUPP_baseurl
1111

12-
__version__ = "0.3.0"
12+
__version__ = "0.3.1"
1313

1414
_terms_of_use = """By downloading data from this dataset, you agree to the terms and conditions defined at
1515

climetlab_eumetnet_postprocessing_benchmark/EUPP/stations/training_data_reforecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .training_data_forecasts import TrainingDataForecastSurface, TrainingDataForecastPressure,\
55
TrainingDataForecastSurfaceProcessed
66

7-
__version__ = "0.3.0"
7+
__version__ = "0.3.1"
88

99

1010
class TrainingDataReforecastSurface(TrainingDataForecastSurface):

climetlab_eumetnet_postprocessing_benchmark/EUPreciP/precipitations.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
import climetlab as cml
77
from climetlab import Dataset
88
from climetlab.utils.patterns import Pattern
9+
from climetlab.normalize import normalize
910

1011
from ..config import EUPreciP_baseurl
1112

12-
__version__ = "0.3.0"
13+
__version__ = "0.3.1"
1314

1415
_terms_of_use = """By downloading data from this dataset, you agree to the terms and conditions defined at
1516
@@ -82,3 +83,29 @@ class PrecipitationObservation(CosmoDataForecast):
8283

8384
def __init__(self):
8485
CosmoDataForecast.__init__(self, ".EURADCLIM_tp")
86+
87+
88+
class StaticField(CosmoDataForecast):
89+
90+
name = None # TODO
91+
home_page = "-" # TODO
92+
licence = "-" # TODO
93+
documentation = "-" # TODO
94+
citation = "-" # TODO
95+
96+
dataset = None
97+
98+
_static_parameters = ["landu", "mterh", "z"]
99+
100+
@normalize("parameter", _static_parameters)
101+
def __init__(self, parameter):
102+
103+
if parameter == "landu":
104+
CosmoDataForecast.__init__(self, "_land_usage")
105+
elif parameter == "mterh":
106+
CosmoDataForecast.__init__(self, "_model_terrain_height")
107+
elif parameter == "z":
108+
CosmoDataForecast.__init__(self, "_z")
109+
110+
111+
self.source = cml.load_source("url", url)

climetlab_eumetnet_postprocessing_benchmark/gridded/static_fields_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from ..config import baseurl
99

10-
__version__ = "0.3.0"
10+
__version__ = "0.3.1"
1111

1212
_terms_of_use = """By downloading data from this dataset, you agree to the terms and conditions defined at
1313

climetlab_eumetnet_postprocessing_benchmark/gridded/training_data_forecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from ..config import baseurl
1717
from ..utils import convert_to_datetime
1818

19-
__version__ = "0.3.0"
19+
__version__ = "0.3.1"
2020

2121
_terms_of_use = """By downloading data from this dataset, you agree to the terms and conditions defined at
2222

climetlab_eumetnet_postprocessing_benchmark/gridded/training_data_reforecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
TrainingDataForecastSurfaceProcessed
1414
from ..utils import convert_to_datetime
1515

16-
__version__ = "0.3.0"
16+
__version__ = "0.3.1"
1717

1818
# TODO: Add a check for valid reforecast date and then warn the user if not valid
1919

0 commit comments

Comments
 (0)