Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: changed install key instructions


Note
This method is only supported to on UNIX/Linux and Windows platforms with Python. No assumption should be made regarding service availability and individual user support.


Panel
titleColorwhite
titleBGColor#000000
titleStep-by-step guide

This method is an alternative way for downloading allows users to download 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
  3. Python
  4. Client libraries
  5. Check data availability
  6. Choose dataset
  7. Sample ScriptsScript examples
  8. Request syntax

  9. More clients

Anchor
key
key

Panel
titleColorwhite
titleBGColor#2B619E
titleInstall 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/

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

Code Block
languagebash
title$HOME/.ecmwfapirc
{
    "url"   : "https://api.ecmwf.int/v1",
    "key"   : "XXXXXXXXXXXXXXXXXXXXXX",
    "email" : "john.smith@example.com"
}

Include Page
Install ECMWF API Key
Install ECMWF API Key

Anchor
clientlibraries
clientlibraries

Panel
titleColorwhite
titleBGColor#2B619E
titleInstall client libraries

Anchor
python
python

Include Page

Python

You can install the ecmwfapi python library by running:

Code Block
languagebash
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.

Install ECMWF Web API Python client library
Install ECMWF Web API Python client library
 

Anchor
availability
availability

Panel
titleColorwhite
titleBGColor#2B619E
titleCheck Data availability

The data available through the Web API is organized in Datasets has its own availability. If you go toTo check the availability of ECMWF Public Datasets go to the web interface:

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

You 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 archive to become familiar with their availability. You may select a Public Dataset and start navigating trough the contentsits content. 

Note

Please take into account some considerations about the content:

  • Different Different ECMWF Public Datasets include different  "parameters" , "times", and "steps"    
  • In each Datasets ECMWF Public Dataset not all the "parameters" are available from all "steps"  
  • In each Datasets 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).

Info
titleTip
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.
Example


Expand
titleClick 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.

...

Panel
titleColorwhite
titleBGColor#2B619E
titleSample ScriptsScript examples
Content by Label
showLabelsfalse
spacesWEBAPI
showSpacefalse
sortmodified
cqllabel = "examples" and space = "WEBAPI"
labelsexamples

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

Anchor
briefrequestsyntax
briefrequestsyntax

Panel
titleColorwhite
titleBGColor#2B619E
titleRequest syntax

See Brief request syntax 

...

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.

Panel
titleColorwhite
titleBGColor#2B619E
titleClient Libraries

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

attachments

previewfalse
uploadfalse
oldfalse
sortByname
pageAccessing ECMWF data servers in batch

 

Content by Label
showLabelsfalse
max5
spaces~uscs
showSpacefalse
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ("perl","mars","web","script","python","api","batch","java") and type = "page" and space = "~uscs"
labelsmars web api python perl java script batch

Page properties
hiddentrue


Related issues
 

 

 

 

 

 

 

 

 

 

...