Widget HTML Atas

Download Era Interim Using R

1. Learn about ERA-Interim data

  1. Read What is ERA-Interim.
  2. Browse the ERA-Interim catalogue and make sure the data you are interested in is available in ERA-Interim. A demonstration (for ERA5 but the same principle applies for ERA-Interim) is available as part of the video tutorial below:

    Full Transcript (pdf)
  3. Read the ERA-Interim data documentation and take note of the parameters (fields) you want to use, and of the corresponding values for data type, stream, level type (surface, pressure levels, model levels, etc) base time and forecast steps.

2. License agreement

Read the Conditions of Use and accept the agreement at the bottom the page.

3. Download a data sample

ECMWF provides a web interface to quickly download a sample dataset for evaluation.

  1. Go to ECMWF Web User Interface for ERA-Interim
  2. Make sure you are logged in with your ECMWF user ID (top right of the page)
  3. In the left hand menu select if you want daily or monthly data, and surface, pressure levels or model levels
  4. Select the time period you want to download. Since October 25th 2017,  the time period you can select for daily data is limited to one month, and for monthly data to one year.
  5. Select Time and Step options
  6. Select the parameters you want to download data for
  7. On the next page, if you are shown a data license, review and accept the data licence
  8. The data can be downloaded in the GRIB file format or in NetCDF. NetCDF is experimental and unsupported. Select the desired format.
  9. On the next page you are shown a summary of your data request. Review it, and at this stage you may also change the output grid resolution and also select a specific geographical area of interest. Once you are ready to proceed with the download, click "Retrieve Now".
  10. Once the data is retrieved you are shown a download link, click it to download the data.
  11. It can take up to a few hours to extract the data from the archives, depending on demand and on the size of your data request. If you don't want to wait you can come back later, check the status of your request in your Job List, and download the data from there.  After three days the data is deleted from our servers.
  12. With the download link you are shown a technical summary of your data request. We recommend you copy this to a text document and keep it for your own documentation.

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 ERA-Interim documentation.

3. Further downloads

For operational data downloads you should not use the sampling web interface. Instead, you should download data using the ECMWF Web-API (with Python scripts).

(warning) Before proceeding with the steps below, users must be ECMWF registered and have their computer set up as described on How to download data via the ECMWF WebAPI (steps 1-4)

4. Run an ERA-Interim test retrieval script

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 "test.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-03",     "time": "00:00:00",     "step": "3",     "grid": "0.75/0.75",     "area":"75/-20/10/60",     "format":"netcdf",     "target": "test.nc" })

2. Run the script. On most computers you would do this by opening a command prompt and typing

The test request will download data from ECMWF and save as file "test.nc" in the directory you issued the command from. The file should be around 58 KB.

(warning) If you get an error message, most likely your computer setup is wrong, or you did not accept the data license, please go back to the previous set-up steps.

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 it can take longer.

If it all worked fine, you are now ready to retrieve the data you need by following the instructions below

5. Create your data retrieval script

  1. As a starting point, browse the ERA-Interim data catalogue for the data you are interested in, and in the last step make a selection in all boxes and click "View the MARS request". This shows a template Python script with your selected options.
  2. Copy the template Python script to a text file and save it, for example as 'my_ERA-Interim_script_v1.py'.
  3. Adapt the template Python script to your requirements, taking the following remarks into account:
    1. In most cases, you will have to add lat/lon "grid" in your script, e.g., "grid": "1.0/1.0". This will enable you to download data on a regular lat/lon grid. And this is necessary if you download the data in NetCDF format.
    2. For an output in NetCDF format, add "format" : "netcdf" in your script. By default, output will be in GRIB format. Notice if you retrieve forecast data in NetCDF, please be aware of this potential issue.
    3. If you specify "grid" , the horizontal resolution is in decimal degrees. For more details, see this link. If not set, the archived grid as specified in the data documentation is used.
    4. If you do not want global data, you can add "area" as N/W/S/E in lat/lon degrees. Southern latitudes and western longitudes must be given as negative numbers, e.g., "area" : "75/-20/10/60" . If you set "area", you should also add a lat/lon grid, e.g., "grid": "1.0/1.0", as shown in c. For more details about "area", see this link.
    5. If you are retrieving forecast data ( "type":"fc" ), make sure that "steps" are specified. Note that if "type" is set to "fc" , then "time" is the time of the forecast.
    6. Change the"target" : "CHANGEME" , to the desired output path and file name, e.g.  or . The default path is the current working directory.

(warning) Limits: There are limits of the number and size of downloads .

(lightbulb) Data tapes and retrieval efficiency:

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. To find out what data is available on each tape, browse the ERA-Interim data catalogue and make your way until the bottom of the tree archive (where parameters are listed). Once you will have reached that level of the archive, what you see is what you can find on one single tape. See Retrieval efficiency page for more details and additional ERA-Interim script examples (e.g. daily and monthly means).

6. Run your data retrieval script

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).

Note that the data retrieval is not designed to be instant. A larger request can take hours and even days to complete.

For long running processes you can check the progress of your request in your job list.

To report an issue or bug please contact Copernicus Support at ECMWF.

Posted by: willianlenkiewicz.blogspot.com

Source: https://confluence.ecmwf.int/display/CKB/How+to+download+ERA-Interim+data+from+the+ECMWF+data+archive