Retieving data from WEkEO
The wekeo and wekeocds sources provide access to WEkEO.
Using the WEkEO grammar
When we want access data using the WEkEO grammar (see the hda documentation) we need to use the wekeo source. The following example retrieves Normalized Difference Vegetation Index data derived from EO satellite imagery in NetCDF format:
[1]:
import earthkit.data as ekd
ds = ekd.from_source(
"wekeo",
"EO:CLMS:DAT:CLMS_GLOBAL_BA_300M_V3_MONTHLY_NETCDF",
request={
"dataset_id": "EO:CLMS:DAT:CLMS_GLOBAL_BA_300M_V3_MONTHLY_NETCDF",
"startdate": "2019-01-01T00:00:00.000Z",
"enddate": "2019-01-01T23:59:59.999Z",
}
)
ds.to_xarray()
[1]:
<xarray.Dataset> Size: 23GB Dimensions: (time: 1, lat: 47040, lon: 120960) Coordinates: * lat (lat) float64 376kB 80.0 80.0 79.99 ... -59.99 -59.99 -60.0 * lon (lon) float64 968kB -180.0 -180.0 -180.0 ... 180.0 180.0 180.0 * time (time) datetime64[ns] 8B 2019-01-01 Data variables: crs |S1 1B ... day_of_burn (time, lat, lon) float32 23GB dask.array<chunksize=(1, 888, 2283), meta=np.ndarray> Attributes: (12/19) Conventions: CF-1.6 processing_level: L3 identifier: urn:cgls:global:ba300_v3_333m:BA300-NTC_20190101000... institution: VITO NV time_coverage_end: 2019-01-31T23:59:59Z source: Derived from EO satellite imagery ... ... time_coverage_start: 2019-01-01T00:00:00Z platform: Sentinel-3 title: monthly Burnt Area 333M: GLOBE 2019-01-01T00:00:00Z archive_facility: VITO parent_identifier: urn:cgls:global:ba300_v3_333m history: 2023-09-04: Processing line BA
Using the CDSAPI grammar
We can use the wekeocds source to access Copernicus Climate Data Store (CDS) datasets served on WEkEO using the cdsapi standard grammar.
The following example retrieves ERA5 surface data in GRIB format:
[2]:
ds = ekd.from_source(
"wekeocds",
"EO:ECMWF:DAT:REANALYSIS_ERA5_SINGLE_LEVELS_MONTHLY_MEANS",
variable=["2m_temperature", "mean_sea_level_pressure"],
product_type=["monthly_averaged_reanalysis_by_hour_of_day"],
year="2012",
month="12",
time="12:00",
data_format="grib",
download_format="zip"
)
ds.ls()
[2]:
centre | shortName | typeOfLevel | level | dataDate | dataTime | stepRange | dataType | number | gridType | |
---|---|---|---|---|---|---|---|---|---|---|
0 | ecmf | 2t | surface | 0 | 20121201 | 1200 | 0 | an | 0 | regular_ll |
1 | ecmf | msl | surface | 0 | 20121201 | 1200 | 0 | an | 0 | regular_ll |
[ ]: