Retrieving data from the ADS

The ads data source provides access to the Copernicus Atmosphere Data Store (ADS).

[1]:
import earthkit.data as ekd

Getting GRIB data

[2]:
d = ekd.from_source(
    "ads",
    "cams-global-reanalysis-eac4",
    request=dict(
        variable=["particulate_matter_10um", "particulate_matter_1um"],
        area=[50, -50, 20, 50],  # N,W,S,E
        date="2012-05-10",
        time="12:00",
    ),
)
d
[2]:
GRIB file

path/var/folders/93/w0p869rx17q98wxk83gn9ys40000gn/T/earthkit-data-cgr/ads-retriever-20ef80df9b4a493343393658dfcd60b694fd03475bc9ad4ff3294b2d7cc73ba9.cache
size31.4 KiB
typesfieldlist, pandas, xarray, numpy, array
[3]:
d.to_fieldlist().ls()
[3]:
parameter.variable time.valid_datetime time.base_datetime time.step vertical.level vertical.level_type ensemble.member geography.grid_type
0 pm10 2012-05-10 12:00:00 2012-05-10 12:00:00 0 days 0 surface 0 regular_ll
1 pm1 2012-05-10 12:00:00 2012-05-10 12:00:00 0 days 0 surface 0 regular_ll

Getting NetCDF data

[4]:
d1 = ekd.from_source(
    "ads",
    "cams-global-reanalysis-eac4",
    request=dict(
        variable=["particulate_matter_10um", "particulate_matter_1um"],
        area=[50, -50, 20, 50],  # N,W,S,E
        date="2012-05-10",
        time="12:00",
        format="netcdf",
    ),
)
d1
[4]:
NetCDF file

path/var/folders/93/w0p869rx17q98wxk83gn9ys40000gn/T/earthkit-data-cgr/ads-retriever-458498ff9a64f6cc6bbed7d9741487804c545f4db2881dae723decaaec676297.nc
size60.5 KiB
typesxarray, pandas, fieldlist, numpy, array
[5]:
d1.to_fieldlist().ls()
[5]:
parameter.variable time.valid_datetime time.base_datetime time.step vertical.level vertical.level_type ensemble.member geography.grid_type
0 pm10 2012-05-10 12:00:00 2012-05-10 12:00:00 0 days None unknown 0 None
1 pm1 2012-05-10 12:00:00 2012-05-10 12:00:00 0 days None unknown 0 None
[ ]: