Versions Compared

Key

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

Page info
infoTypeModified date
prefixLast modified on
typeFlat

Note

Please be aware that the following page is relevant for the CDS API package of the current CDS system. If you are using the new CDS-Beta system, version 0.7.0 or higher of the cdsapi package is required and you must use Python3. Note that your CDS-Beta credentials must be used in your request. 

Info
iconfalse
titleTable of Contents

Table of Contents
maxLevel3

5
Easy Heading Macro

Note

You only need to go through this procedure once, before you can use the CDS API on Windows to programmatically download data from either the Climate Data Store (CDS) or the Atmosphere Data Store (ADS).

...

  1. Login to CDS (or Login to ADS)
  2. Copy a 2 line code, which shows a url and your own uid:API key details as followed:
    1. For CDS users, Go to this page and copy the 2 line code displayed in the black box in the "Install the CDS API key" section.
    2. For ADS users, Go to this page and copy the 2 line code displayed in the black box in the "Install the CDS API key" section.
  3. Paste the 2 line code into a  %USERPROFILE%\.cdsapirc file, where in your windows environment, %USERPROFILE% is usually located at C:\Users\Username folder). The CDS API expects to find the .cdsapirc file in your home directory.

    For instructions on how to create a dot file on Windows, please see here or check the instructions provided by one of users on the User Forum.

  4. Install the CDS API client by running the following command in a Command Prompt window:

    Code Block
    pip install cdsapi # for Python 2.7 
    pip3 install cdsapi # for Python 3

    or try

    Code Block
    pip install --user cdsapi # for Python 2.7 
    pip3 install --user cdsapi # for Python 3


  5. Once the CDS API client is installed, it can be used to request data from the datasets listed in the CDS and ADS catalogues. It is necessary to agree to the Terms of Use of every datasets that you intend to download. Attached to each dataset download form, the "Show API request" button displays the python code to be used.

...

Code Block
pip install pyopenssl # for Python 2.7 
pip3 install pyopenssl # for Python 3


Info
iconfalse

This document has been produced in the context of the Copernicus

Atmosphere Monitoring Service (CAMS) and the Copernicus

Climate Change Service (C3S).

The activities leading to these results have been contracted by the European Centre for Medium-Range Weather Forecasts, operator of

CAMS and

C3S on behalf of the European Union (Delegation Agreement signed on 11/11/2014 and Contribution Agreement signed on 22/07/2021). All information in this document is provided "as is" and no guarantee or warranty is given that the information is fit for any particular purpose.

The

user

users thereof

uses

use the information at

its

their sole risk and liability. For the avoidance of all

doubts

doubt , the European Commission and the European Centre for Medium - Range Weather Forecasts

has

have no liability in respect of this document, which is merely representing the

authors

author's view.

Content by Label
showLabelsfalse
max5
spacesCKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("cds","ads") and type = "page" and space = "CKB"
labelscds

...