Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2) The CDS API is a service providing programmatic access in Python to ADS data. Users need to have a ADS CDS account to use it with the their related CDS API keycredentials. For a full description and some useful examples, please see How to use the CDS API

If users have more than one CDS API key and therefore ADS API key (e.g. you also have a Climate Data Store (CDS) account), you have to pass credentials in explicitly , and the following method can be used:

...

We strongly suggest to construct CDS API requests by using the web interface of the relevant dataset and using the 'Show API request' button to get the code.

For non-Python users, please note that the CDS API is REST-based so it can be wrapped by any programming language. Please see this example with the R package: Download CDS ERA5 data using R.

Users can also set the PROXY within the CDS API script:

Code Block
languagepy
import requests
import cdsapi


session = requests.Session()

session.proxies = {
   'http': 'http://10.10.10.10:8000',
   'https': 'http://10.10.10.10:8000',
}

client = cdsapi.Client(session=session)


Note

Please note:  Currently, all ADS datasets are covered by Copernicus Products Licence, and users have to accept it in order to be able to download datasets (whether through the web interface, or the CDS API). If the licence has not been accepted, the error message below will shown by the CDS API:

At the time this article was written, the acceptance of the licence can only be carried out through the ADS web interface for the relevant dataset, by forming a request on the "Download data" page. The user will then be prompted to accept the licence. Once that is done, the CDS API request can be successfully submitted to the ADS.

...