Since October 25th 2017, the time period you can select on the ECMWF Web User Interface for ERA-Interim is limited, namely for daily data to one month, and for monthly data to one year. The purpose of the ECMWF web user interface is only to provide small sample datasets for evaluation. Data over longer time periods should not be downloaded through the web interface, but using the ECMWF WebAPI with Python scripts as described below.
Please note also that the web user interface does not list all available data. For listings of all available data please see the ECMWF archive catalogue (which allows you to browse through the entire ERA-Interim archive) and the respective ERA-Interim dataset documentation.
You need:
This is to configure your computer to programmatically retrieve data from ECMWF. You only need to do this once, and only if you have never retrieved ECMWF data using Python before. For more information refer to Access ECMWF Public Datasets of ECMWF WebAPI.
1. Install the ECMWF WebAPI client library by running:
sudo pip install https://software.ecmwf.int/wiki/download/attachments/56664858/ecmwf-api-client-python.tgz |
2. Get and install an ECMWF API key:
Go to https://apps.ecmwf.int/auth/login/ to verify you are logged in. If you are not, log in with your ECMWF account details (as registered in step 2).
Go to https://api.ecmwf.int/v1/key/ . You will see something like below:
{ "url" : "https://api.ecmwf.int/v1", "key" : "XXXXXXXXXXXXXXXXXXXXXX", "email" : "john.smith@example.com" } |
3. Copy the bit with the curly brackets as shown above into a text file and save the file as $HOME/.ecmwfapirc (on Unix/Linux) or %USERPROFILE%\.ecmwfapirc (on Windows)
This is to verify that your computer is set up correctly.
1. Copy the following Python script to a text file and save it, for example as 'my_ERA-Interim_test_script.py'
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() server.retrieve({ "class": "ei", "dataset": "interim", "expver": "1", "stream": "oper", "type": "fc", "levtype": "sfc", "param": "167.128", "date": "2017-08-01/to/2017-08-31", "time": "00:00:00", "step": "3", "grid": "0.75/0.75", "target": "my_ERA5_test_file.grb", }) |
2. Run the script. On most computers you would do this by opening a command prompt and typing
python my_ERA-Interim_test_script.py |
The test request will download data from ECMWF and save as file 'my_ERA-Interim_test_file.grb' in the directory you issued the command from.
Note that the data retrieval is not designed to be instant. The test request above usually takes a few minutes to complete, but depending on demand can take longer.
3. With your favourite GRIB file reader verify that you can read the file. If you are not familiar with GRIB please see What are GRIB files and How to read or decode a GRIB file
If you get an error message or the output is not as specified in to the Python script, most likely your computer setup is wrong, or you did not accept the ERA5 license, so please go back to the previous steps.
"grid"
:
"0.3/0.3"
. Otherwise, GRIB to netCDF conversion will fail. "area"
:
"75/-20/10/60"
. Requires "grid" to be set to a regular grid e.g. "grid"
:
"0.3/0.3"
.Change the "target"
:
"CHANGEME"
,
to the desired output path and file name, e.g. "data1.nc" or "./data/data1.grib". The default path is the current working directory.
Limitations:
Note that the data retrieval is not designed to be instant. A larger request can take hours and even days to complete.
To retrieve data efficiently (and get your data quicker!) you should retrieve all the data you need from one tape, then from the next tape, and so on. In most cases this means retrieving all the data you need for one month, then for the next month, and so on. See Retrieval efficiency pages.
On most computers you would do this by opening a command prompt and typing
python my_ERA-Interim_script_v1.py |
This will retrieve the data as specified and download it as a single file to your computer into the current directory (or whichever "target" directory you specified).
For long running processes you can check the progress of your request in your job list.
Check that the data you downloaded meets your requirements.
To report an issue or bug please contact Copernicus Support at ECMWF
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.