This method is only supported to UNIX platforms with Python.

This method is an alternative way for downloading ECMWF public datasets in a programmatic way. The user can include this functions in their programs and get the data.

  1. Install ECMWF key
  2. Install client libraries
    1. Python
    2. Client libraries
  3. Check data availability
  4. Choose dataset
  5. Sample Scripts
  6. Request syntax

  7. More clients

  1. If you don't have an account, please self register at https://apps.ecmwf.int/registration/ and then go to the steps below.
  2. login https://apps.ecmwf.int/auth/login/

  3. retrieve you key at https://api.ecmwf.int/v1/key/

  4. Copy the information in this page and paste it in the file $HOME/.ecmwfapirc

{
    "url"   : "https://api.ecmwf.int/v1",
    "key"   : "XXXXXXXXXXXXXXXXXXXXXX",
    "email" : "john.smith@example.com"
}

Python

You can install the ecmwfapi python library by running:

sudo pip install https://software.ecmwf.int/wiki/download/attachments/23694554/ecmwf-api-client-python.tgz

If you cannot run the sudo or pip commands, just download the ecmwf-api-client-python.tgz. Extract its content and copy the module ecmwfapi to a directory pointed by the environment variable PYTHONPATH.

The data available through the Web API is organized in Datasets has its own availability. If you go to

http://apps.ecmwf.int/datasets/

You will view all the Datasets that are available from our archive. We strongly recommend you to to navigate through our datasets archive to become familiar with the availability of our archive.You may select a Dataset and start navigate trough the contents. 

Some of the Datasets available are not complete:

  • Different Datasets include different  "parameters" , "times", and "steps"     
  • In each Datasets not all the "parameters" are available from all "steps"     
  • In each Datasets not all the "steps" are available from all "times"

The web-application above will help you to check and understand the availability. For any kind of selections the system will update the attributes in a dynamic way to reflect the current availability. (ie if you change the steps some parameters will be added or removed).

We encourage users to use the "View MARS request" feature at the bottom of the page once the selection has been done. Using this MARS request you can build your own script. See Brief request syntax

For instance:

  • If you click on the interim Dataset http://apps.ecmwf.int/datasets/data/interim_full_daily/ you will get a web page reflecting the availability of  this specific Dataset as the period that this specific Dataset is available, the forecast steps and the parameters that are available etc.
  • From this page you have the option to define the attributes of your requests such as the "date", the "time" the "steps" and the "parameters" that you are interested in.
  • In the case of the interim Dataset if you select time "06:00:00" only,  the system updates the availability of the "steps" dynamically. In that case only the "step" 00 is available (ie checkable).
  • Additionally  if you select "step" 00 you will see that only a subset of the parameters are now available and only these parameters can now be checked.

Spend some time to understand how it works, make some selections try to execute the MARS scripts.

See Available ECMWF Public Datasets.

Python ERA-interim samples

Python ERA-40 samples

Python ERA-15 samples

Python era20c examples

Python MACC Reanalysis samples

Python MACC Near-Realtime samples

Python TIGGE samples

Sample client scripts

See Brief request syntax 

We also have some API for several client languages. Note that PYTHON is the most tested and supported.

Perl

You need to download the clien, extract its content and to a directory pointed by the environment variable  PERL5LIB . This code relies on the JSON perl module, as well as libwww-perl and Crypt::SSLeay.

Java

You need to download the client and you will also need the Java JSON package.

 

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues