E-OBS
In [2]:
Copied!
from springtime.datasets.meteo.eobs import EOBSMultiplePoints, EOBSSinglePoint, EOBSBoundingBox
from springtime.datasets.meteo.eobs import EOBSMultiplePoints, EOBSSinglePoint, EOBSBoundingBox
Data at single point¶
In [2]:
Copied!
# Create an instance of data
dataset = EOBSSinglePoint(point=(4.740135, 46.751076), years=[2010, 2011], grid_resolution="0.25deg")
dataset
# Create an instance of data
dataset = EOBSSinglePoint(point=(4.740135, 46.751076), years=[2010, 2011], grid_resolution="0.25deg")
dataset
Out[2]:
EOBSSinglePoint(dataset='EOBSSinglePoint', product_type='ensemble_mean', variables=('mean_temperature',), grid_resolution='0.25deg', years=(2010, 2011), version='26.0e', point=(4.740135, 46.751076))
In [3]:
Copied!
# Download data
dataset.download()
# Download data
dataset.download()
Downloading E-OBS variable mean_temperature for 2011-2022 period from https://knmi-ecad-assets-prd.s3.amazonaws.com/ensembles/data/Grid_0.25deg_reg_ensemble/tg_ens_mean_0.25deg_reg_2011-2022_v26.0e.nc to /tmp/data/e-obs/tg_ens_mean_0.25deg_reg_2011-2022_v26.0e.nc
In [4]:
Copied!
# Load data as a dataframe
eobs_df = dataset.load()
eobs_df
# Load data as a dataframe
eobs_df = dataset.load()
eobs_df
Out[4]:
tg | geometry | |
---|---|---|
time | ||
2011-01-01 | -0.43 | POINT (4.62500 46.87500) |
2011-01-02 | 0.63 | POINT (4.62500 46.87500) |
2011-01-03 | -1.19 | POINT (4.62500 46.87500) |
2011-01-04 | -3.22 | POINT (4.62500 46.87500) |
2011-01-05 | -0.02 | POINT (4.62500 46.87500) |
... | ... | ... |
2011-12-27 | 0.50 | POINT (4.62500 46.87500) |
2011-12-28 | 2.09 | POINT (4.62500 46.87500) |
2011-12-29 | 3.24 | POINT (4.62500 46.87500) |
2011-12-30 | 4.99 | POINT (4.62500 46.87500) |
2011-12-31 | 7.13 | POINT (4.62500 46.87500) |
365 rows × 2 columns
Data at multiple points¶
In [3]:
Copied!
# Create an instance of data
dataset = EOBSMultiplePoints(points=((5.740135, 47.751076), (4.740135, 46.751076)), years=[2010, 2011], grid_resolution="0.25deg")
dataset
# Create an instance of data
dataset = EOBSMultiplePoints(points=((5.740135, 47.751076), (4.740135, 46.751076)), years=[2010, 2011], grid_resolution="0.25deg")
dataset
Out[3]:
EOBSMultiplePoints(dataset='EOBSMultiplePoints', product_type='ensemble_mean', variables=('mean_temperature',), grid_resolution='0.25deg', years=(2010, 2011), version='26.0e', points=((5.740135, 47.751076), (4.740135, 46.751076)))
In [4]:
Copied!
# Download data
dataset.download()
# Download data
dataset.download()
In [5]:
Copied!
# Load data as a dataframe
eobs_df = dataset.load()
eobs_df
# Load data as a dataframe
eobs_df = dataset.load()
eobs_df
Out[5]:
tg | geometry | ||
---|---|---|---|
points | time | ||
0 | 2011-01-01 | -1.37 | POINT (5.62500 47.87500) |
2011-01-02 | 0.23 | POINT (5.62500 47.87500) | |
2011-01-03 | -2.71 | POINT (5.62500 47.87500) | |
2011-01-04 | -4.24 | POINT (5.62500 47.87500) | |
2011-01-05 | -0.35 | POINT (5.62500 47.87500) | |
... | ... | ... | ... |
1 | 2011-12-27 | 0.50 | POINT (4.62500 46.87500) |
2011-12-28 | 2.09 | POINT (4.62500 46.87500) | |
2011-12-29 | 3.24 | POINT (4.62500 46.87500) | |
2011-12-30 | 4.99 | POINT (4.62500 46.87500) | |
2011-12-31 | 7.13 | POINT (4.62500 46.87500) |
730 rows × 2 columns
Data in a bounding box¶
In [12]:
Copied!
# Create an instance of data
dataset = EOBSBoundingBox(area={"name":"amsterdam", "bbox":[4, 50, 5, 55]}, years=[2010, 2011], grid_resolution="0.25deg")
dataset
# Create an instance of data
dataset = EOBSBoundingBox(area={"name":"amsterdam", "bbox":[4, 50, 5, 55]}, years=[2010, 2011], grid_resolution="0.25deg")
dataset
Out[12]:
EOBSBoundingBox(dataset='EOBSBoundingBox', product_type='ensemble_mean', variables=('mean_temperature',), grid_resolution='0.25deg', years=(2010, 2011), version='26.0e', area=NamedArea(name='amsterdam', bbox=BoundingBox(xmin=4.0, ymin=50.0, xmax=5.0, ymax=55.0)))
In [13]:
Copied!
# Download data
dataset.download()
# Download data
dataset.download()
In [14]:
Copied!
# Load data as a xarray.Dataset
eobs_df = dataset.load()
eobs_df
# Load data as a xarray.Dataset
eobs_df = dataset.load()
eobs_df
Out[14]:
<xarray.Dataset> Dimensions: (latitude: 20, longitude: 4, time: 365) Coordinates: * latitude (latitude) float64 50.12 50.38 50.62 50.88 ... 54.38 54.62 54.88 * longitude (longitude) float64 4.125 4.375 4.625 4.875 * time (time) datetime64[ns] 2011-01-01 2011-01-02 ... 2011-12-31 Data variables: tg (time, latitude, longitude) float32 dask.array<chunksize=(365, 20, 4), meta=np.ndarray> Attributes: E-OBS_version: 26.0e Conventions: CF-1.4 References: http://surfobs.climate.copernicus.eu/dataaccess/access_eo... history: Thu Sep 29 13:37:19 2022: ncks --no-abc -d time,22280,264... NCO: netCDF Operators version 4.7.5 (Homepage = http://nco.sf....
In [ ]:
Copied!