ecmwf / cdsapi

Python API to access the Copernicus Climate Data Store (CDS)
Apache License 2.0
230 stars 56 forks source link

Exception: Resource cams-global-reanalysis-eac4 not found #43

Closed Rich2020 closed 3 years ago

Rich2020 commented 3 years ago

Trying to retrieve data via API results in an exception (see title). The code used was generated by the CAMS UI located here: https://ads.atmosphere.copernicus.eu/cdsapp#!/dataset/cams-global-reanalysis-eac4?tab=form

Code generated:

import cdsapi

c = cdsapi.Client()

c.retrieve(
    'cams-global-reanalysis-eac4',
    {
        'variable': 'temperature',
        'pressure_level': '1',
        'model_level': '1',
        'date': '2003-01-01/2020-12-31',
        'time': [
            '00:00', '03:00', '06:00',
            '09:00', '12:00', '15:00',
            '18:00', '21:00',
        ],
        'format': 'grib',
    },
    'download.grib')

All terms/conditions accepted and .cdsapirc set according to instructions laid out here (for Mac): https://ads.atmosphere.copernicus.eu/api-how-to

UPDATE: that error is very misleading. The issue was that I need to use the ADS URL and key (rather than the CDS version), as provided here: https://ads.atmosphere.copernicus.eu/api-how-to It's also very confusing that the instructions on that ADS page explicitly refer to CDS...

alexbnlee commented 1 year ago

Thanks so much. It solves my issues, too.

yuzhangtu commented 5 months ago

Thanks! This informataion is very helpful. The ADS url and key are needed in .cdsapirc file to access the cams-global-reanalysis data. I also have a test on downloading the ERA5 file. Then it is necessary to update the URL and key to ADS.