Skip to end of metadata
Go to start of metadata

WARNING: This page has been moved to Access ECMWF Public Datasets.

Introduction

This service will allow you to access the ECMWF public datasets . You will need to have an account on ECMWF web site. If you don't have an account, please self register at https://apps.ecmwf.int/registration/.

The procedure is very simple: the user writes a request, submits it and retrieves a file (grib or netcdf format) including the requested data.

This method is supported on UNIX/Linux and Windows platforms with Python. No assumption should be made regarding service availability and individual user support.
Step-by-step guide

This method allows users to download ECMWF public datasets in a programmatic way.

  1. Install ECMWF key
  2. Install client libraries
  3. Check data availability
  4. Choose dataset
  5. Script examples
  6. Request syntax

Install ECMWF KEY
  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/

    Note that the key expires in 1 year. You will receive an email to the registered email address 1 month before the expiration date with the renewal instructions. To check the expiry date of your current key log into www.ecmwf.int, then click here.

  4. Copy the information in this page and paste it in the file $HOME/.ecmwfapirc (Unix/Linux) or %USERPROFILE%\.ecmwfapirc (Windows; see how to create a file with a leading dot)

contents of $HOME/.ecmwfapirc (Unix/Linux) or %USERPROFILE%\.ecmwfapirc (Windows)
{
    "url"   : "https://api.ecmwf.int/v1",
    "key"   : "XXXXXXXXXXXXXXXXXXXXXX",
    "email" : "john.smith@example.com"
}

Install client libraries

Python

This version of the library provides support for both Python 2.7.x and Python 3.

For languages other than Python please see Web-API Downloads

You can install the ecmwfapi python library by running on Unix/Linux:

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

or on Windows:

pip install https://software.ecmwf.int/wiki/download/attachments/56664858/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.

 

Check Data availability

To check the availability of ECMWF Public Datasets go to the web interface:

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

Using this interface you can discover all the ECMWF Public Datasets that are available from our archive. We strongly recommend you to to navigate through our public datasets to become familiar with their availability. You may select a Public Dataset and start navigating trough its content. 

Please take into account some considerations about the content:

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

The web interface 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. (i.e. if you change the steps some parameters will be added or removed).

Tip

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 Python script. If you are interested on the syntax go to Brief request syntax.
 Click here to see an example of usage...
  • If you click on the ERA-interim http://apps.ecmwf.int/datasets/data/interim_full_daily/ you will get a web page reflecting the availability of  this specific Public Dataset as the period that it is available, the forecast steps and the parameters that are available etc.
  • From this page you have the option to define the values of your requests such as the "date", the "time" the "steps" and the "parameters" that you are interested in.
  • In the case of ERA-Interim 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 (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.

Choosing a dataset

Request syntax

There is no content with the specified labels

 

 

 



 

 

 

 

 

 

 

Contact

WebAPI UPDATES

Blog Posts

Recently Updated

 

 

 


 

 

WARNING: This page has been moved to Access MARS.

8 Comments

  1. Tried and tested, at home on my Mac. Very good...

  2. A frequently asked question is whether it's possible to use the API(s) to retrieve data in netCDF format.  Are there plans to implement this and, if so, what is the time scale ?

    Also, are there plans to support the MARS 'compute' functionality ?

    1. netCDF is on our future plans

      'compute' functionality will not be available on Web API ( we would like to keep it 'light' ). However a similar functionality for arithmetic may be available on a separate package.

  3. What is the current situation for batch retrievals concerning netCDF? is the option available or only via Wed data portals?

    1. You may use

      'format':'netcdf'

  4. The 'Loading table...' does not work at the moment (under 'Choosing a dataset') 

  5. I have tried to run c# for EPS data, but it gives me an error (Unable to connect to the remote server) for web request. my url is "https://api.ecmwf.int/v1" 

    What should I do for overcoming this problem? thanks in advance