Please be aware that on 26 September 2024 the ADS legacy system has been decommissioned. Although some of the functionalities are common to the new ADS system we invite you to read the quick guide and additional information on some of the changes: Please read: CDS and ADS migrating to new infrastructure: Common Data Store (CDS) Engine .
IMPORTANT: New CDS API is designed to be backward compatible which means that once your .cdsapirc is updated, your API script may run successfully immediately, downloading data from the new ADS.
Introduction
The Atmosphere Data Store (ADS) is the cornerstone infrastructure which supports the implementation of the Copernicus Atmosphere Monitoring Service (CAMS). It is built on the same infrastructure as the Climate Data Store (CDS). It enables the provision of reliable data and expertise related to air quality, solar energy, and the role atmospheric gases and particles play in climate change.
The ADS :
- is designed as a distributed system which provides improved access to local and remote datasets via a powerful service-oriented architecture.
- offers seamless web-based and API-based search and retrieve facilities to access air quality data and information.
The data provided by the ADS are free and open data, subject to the user agreeing to the relevant dataset licence(s). For further details about the underlying infrastructure, please see this article from the ECMWF Newsletter 151.
How the ADS works
The ADS provides a Catalogue which lists CAMS data and products, such as observations, reanalyses and air quality forecasts. Users can search through the catalogue, and can filter the entries by means of both a faceted search (Variable domain, Parameter family, Spatial coverage, Product type, Temporal coverage) and a textual search.
Users can request data from the ADS using a variety of methods:
- the ADS web interface
- the CDS Application Programming Interface (CDS API)
1) The ADS web interface is an interactive system: the user fills a web form to construct their query (please note that only a valid query can be submitted via the web form).
Please make sure that you select all the mandatory fields before submit a request.
The user can then currently choose between two options:
- submit the form and download the result of the query;
- show the query as an API request
These are shown in the following figures:
Figure 1: Web interface | Figure 2: Request options on the web interface |
2) The CDS API is a service providing programmatic access in Python to ADS data. Users need to have a CDS account to use it with their related CDS API credentials. For a full description and some useful examples, please see How to use the CDS API.
If users have more than one 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:
import cdsapi import yaml with open('/path/to/ads/cdsapirc', 'r') as f: credentials = yaml.safe_load(f) c = cdsapi.Client(url=credentials['url'], key=credentials['key']) c.retrieve("dataset-short-name", {... sub-selection request ...}, "target-file")
We strongly suggest to construct API requests by using the web interface of the relevant dataset and using the 'Show API request' button to get the code.
Figure 3: Show API request feature
Users can also set the PROXY within the API script:
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)
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, an error message will shown by the 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.
As the ADS is a distributed platform, the datasets are hosted at a number of different locations. Some data are stored on the ADS disks themselves; others are hosted remotely on the data providers' storage systems, e.g. the ECMWF Meteorological Archival and Retrieval System (MARS).
Table 2 shows where the ADS datasets are currently stored.
Please note that the items the user selects to include in a single ADS request can make a significant difference in terms of performance i.e. how long a given request will take to run. Please see the page Efficiency tips for how to build an efficient request.
On the ADS cache disks, requests and relevant results are generally stored for 1.5 to 2 days, depending on the user load on the ADS system. After this period, files can be deleted, starting from the oldest.
Please note that cached data (if present) is used to fulfill an ADS request only if the ADS request is exactly identical to a previous one. This means that data will be extracted from the cache, rather than being re-retrieved from the dataset itself.
The ADS data availability information is now available through REST API:
https://ads.atmosphere.copernicus.eu/api/catalogue/v1/docs
Here is a sample data availability request:
curl -X 'GET' \ 'https://ads.atmosphere.copernicus.eu/api/catalogue/v1/collections/cams-europe-air-quality-forecasts/constraints.json' \ -H 'accept: application/json'
Request states
After sending a request, the user can track its state on the 'Your Requests' page of the ADS web interface. There are five different states of a request:
- Accepted. Each request is assigned a unique ID and a priority. The priority is chosen according to different criteria, such as the origin of the request (ADS web interface/API). For example, the ADS web interface usually has higher priority because it is an interactive application and users expect an immediate response to their request.
- In progress. The request is being fulfilled and the data is being collected from the relevant datasets.
- Failed. The request encountered problems and did not complete.
- Unavailable. The data has expired from cache and therefore cannot be retrieved at the current time. In this case the request should be resubmitted by the user.
- Succeed. The resulting data file is ready to download for ADS web interface requests (Completed CDS API requests are not shown, please see note below).
User can check the live status of the ADS system here https://ads.atmosphere.copernicus.eu/live.
Please note:
- Users can also follow the status of their CDS API request on the 'Your Requests' ADS web page, while the request is actually running.
- If the CDS API request completes successfully, the data file will be automatically downloaded to the user's computer. The details of this request will be on 'Your Requests' ADS web page.
- If the request fails, the details of this CDS API request will remain on the 'Your Requests' ADS web page, for further investigation.
Limits
Limits are set on usage of ADS resources to ensure an appropriate level of performance for users.
Please note that these limits are changed from time to time according to the current workload of the system and number of concurrent tasks.
The ADS will queue requests which would otherwise cause any of these limits to be exceeded.
Also, ADS data requests have limits in terms of number of fields and volume size, which are different for each dataset (see the "Datasets" Table 1 below). These values are dependent on each dataset's structure and where the dataset is actually stored. Again, these restrictions are introduced to help the system maintain good performance and minimise the queuing time for all users.
Please note, that these limits are also enforced for requests sent via the CDS API.
Datasets
Table 1: Summary of the number of fields limits, as well as the major features of all ADS datasets (last reviewed on )
Dataset | Number of fields limit | Volume size limit | Adaptor (indicates where the data are stored; see "Efficiency Tips" below) | Notes |
10000 | 175 GB for GRIB files, 30 GB for netCDF files | MARS Internal/external | Those variables listed as fast-access are readily available from ADS disks. Those variables listed as slow-access and data older than 30 days are stored in ECMWF MARS tape archive. | |
100000 | 175 GB for GRIB files, 30 GB for netCDF files | MARS Internal/external | Those variables listed as fast-access are readily available from ADS disks. Those variables listed as slow-access are stored in ECMWF MARS tape archive. | |
100000 | 175 GB for GRIB files, 30 GB for netCDF files | MARS Internal | N/A | |
CAMS global inversion-optimised greenhouse gas fluxes and concentrations | 500 | N/A | adaptor.url | Stored locally on ADS disks |
100000 | 175 GB for GRIB files, 30 GB for netCDF files | MARS external | Data are stored in ECMWF MARS tape archive | |
CAMS global greenhouse gas reanalysis (EGG4) monthly averaged fields | 100000 | 175 GB for GRIB files, 30 GB for netCDF files | MARS external | Data are stored in ECMWF MARS tape archive |
10000 | N/A | adaptor.cams_solar_rad2.retrieve | This data is calculated on demand by a service jointly provided by DLR, Armines, and Transvalor. The ADS forwards requests to this service and returns the data from it. | |
10000 | N/A | adaptor.cams_solar_rad2.retrieve | This data is calculated on demand by a service jointly provided by DLR, Armines, and Transvalor. The ADS forwards requests to this service and returns the data from it. | |
5000 | N/A | adaptor.cams_regional_fc.retrieve | There are three classes of speed at which these requests will be processed:
| |
1000 | N/A | adaptor.url | Check the documentation for data availability | |
CAMS European air quality forecasts optimised at observation sites | 1000 | N/A | adaptor.url | |
1000 | N/A | adaptor.url2.retrieve | N/A | |
CAMS global biomass burning emissions based on fire radiative power (GFAS) | N/A | N/A | N/A | |
1000 | N/A | adaptor.url | ||
1000 | N/A | adaptor.url |
Efficiency tips
- Where the data are actually stored can make a significant difference in the speed at which a request is processed. ADS data hosted in 'MARS internal' is stored on ADS disks, and so is faster to retrieve. The 'MARS external' datasets are stored in the ECMWF MARS (tape) archive, and in this case it is important to request as much data as possible from the same tape file in your ADS request.
- It is better to submit small requests rather than very large requests. This will ensure your requests are not given a lower priority in the ADS request queue.
- When using the CDS API, it is strongly recommended that users take as a starting point the example API request script shown at the bottom of the ADS web 'Download data' page for the dataset of interest, and use this as the basis for your request.
CDS API examples
CDS API Request for sulphate aerosol optical depth 550nm from CAMS global reanalysis (EAC4) dataset on on 01-01-2004, at 00 UTC.