Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page info
infoTypeModified date
prefixLast modified on
typeFlat

Show If
special@self

Major modification in progress for this article - please DO NOT UPDATE THIS PAGE or your edits will get overwritten when the new modified article will be published. Please edit the working copy of this page in the C3S Modified CKB articles section.


Info
iconfalse
titleTable of Contents

Table of Contents
maxLevel3

...

Any data in the CDS catalogue can be accessed in these two ways. And since such data is kept online, access is usually fast. Some parts of the ERA5 dataset are not listed in the CDS catalogue. These are only accessible through the CDS API service. An example is ERA5 model level data that resides in the ECMWF's MARS tape archive. The extraction of such data from tape can lead to significantly longer retrieval times than data that is available online.

...

  1. Go to the C3S climate data store (CDS).
  2. Type  'ERA5' in the search box.
  3. Follow the ERA5 dataset title link of interest (there will be many more hits).
  4. Currently there are eight online ERA5 and two ERA5-Land catalogue entries  

    Expand
    titleShow ERA5 catalogue entries in the CDS


  5. Each of these dataset catalogue entries includes the following tabs:
    • Overview . This gives a description of the selected dataset and metadata information (e.g. spatial details, file format, variables, etc).
    • Documentation . This provides links to detailed documentation about the dataset.
    • Download data . This is a download web form.
  6. Go to the Download data tab to make your selection for ERA5 data retrieval. Using this web interface, you can:
    • make selections as per your requirements. For your convenience only valid combinations will show; invalid combinations are greyed out interactively.
    • accept the data licence in the Terms of use section (in case you had not yet accepted it). You will only see this section after you have logged in.

      Note

      You will need to do this regardless whether you are accessing data through the web interface or through the CDS API (see below).


  7. Click on the button Submit Form at the bottom right to submit your data request (you must be logged in and have accepted the terms and conditions before submitting your request).

  8. You will now be redirected to the Your requests page.

...

  1. Build a basic CDS API request.

    • You can use the CDS web interface to help you build your CDS API download script.

    • In the Download data  tab, make some selections, then click the button Show API request at the bottom left and you will be presented with the script.

    • Copy and paste this to your preferred text editor.

      Expand
      titleBasic CDS API script example (for ERA5 19791940-present) to download temperature at a given pressure level, 1000 hPa is shown HERE.


      Code Block
      languagetext
      #!/usr/bin/env python
      
      import cdsapi
      
      c = cdsapi.Client()
      
      c.retrieve(
          'reanalysis-era5-pressure-levels',
          {
              'product_type': 'reanalysis',
              'variable': 'temperature',
              'pressure_level': '1000',
              'year': '2008',
              'month': '01',
              'day': '01',
              'time': '12:00',
              'format': 'netcdf',                 # Supported format: grib and netcdf. Default: grib
          },
          'download.nc')                          # Output file. Adapt as you wish.
      



  2. Refine your CDS API script for ERA5 data listed in CDS for optional post-processing.
    • For a different grid resolution, use the key 'grid'.
    • Please note that the ERA5 native grid of online CDS is 0.25°x0.25° (atmosphere), 0.5°x0.5° (ocean waves), mean, spread and members: 0.5°x0.5° (atmosphere), 1°x1° (ocean waves). ERA5-Land: 0.1°x0.1°. So this will be returned by default.

    • Expand
      titleClick here for a sample script (for ERA5 19591940-present) that downloads temperature at a given pressure level at 1000 hPa for a geographical subset of the data and specified grid


      Code Block
      languagetext
      #!/usr/bin/env python
      import cdsapi
      
      c = cdsapi.Client()
      
      c.retrieve(
          'reanalysis-era5-pressure-levels',
          {
              'product_type': 'reanalysis',
              'variable': 'temperature',
              'pressure_level': '1000',
              'year': '2008',
              'month': '01',
              'day': '01',
              'time': '12:00',
              'format': 'netcdf',                 # Supported format: grib and netcdf. Default: grib
              'area'          : [60, -10, 50, 2], # North, West, South, East.          Default: global
              'grid'          : [1.0, 1.0],       # Latitude/longitude grid.           Default: 0.25 x 0.25
          },
          'era5_temperature_sub_area.nc')         # Output file. Adapt as you wish.



...

Note
titleRequests for ERA5 data in NetCDF

When requesting ERA5 data from the CDS in NetCDF (web or CDS API), users should not request ERA5 reanalysis atmospheric data, wave data, and ensemble data in one request. This is because the data has different spatial grids, which can cause issues for the current grib to NetCDF converter and produce incorrect results.

Option B: Download ERA5 family data

...

stored on MARS tape archive (no data selection can be made from the CDS download form) - SLOW ACCESS

Although some flavours of the ERA5 family data is not online in the CDS (i.e. not available through the interactive web download form), it is accessible through CDS API. This embraces ERA5-complete , and ERA5.1-complete and ERA5-complete-preliminary, which provide data in the 'raw' format as they were produced:

...

Note

Please be aware that there is an additional queueing system for downloading data from the ECMWF's MARS archive - expect several hours to several days for submitted requests to complete at this time. You can check the Live status of your request


You can discover the ERA5-complete structure (

...

1940-present) and learn how to build a CDS API request by following these steps:

  1. Open the MARS ERA5 catalogue
  2. browse for discovery, and browse your way to the parameter level to build a request.

    Info
    • More information on the available streams, product types and levels is available in the ERA5 data documentation.
    • On the parameter level, use the left-mouse button and the shift key to select more than one field in one retrieval.
    • The MARS catalogue only shows data for the final quality controlled data that is made available 2-3 months in arrear. However, data is also available from preliminary timely updates up to 5 days behind real time, using the same retrieval structure.


    Note

    To retrieve MARS 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.

    As a rule of thumb everything shown on one page at parameter level in the MARS ERA5 catalogue is grouped together on one tape

    • For analysis fields this is one month of data with respect to one particular level type (e.g. surface).
    • For forecast fields on model levels this is limited to one single day.


  3. Use the " View MARS request " feature - this will help you build your own CDS API Python script to retrieve the data through the CDS API.

    Expand
    titleExample: Download ERA5 model level analysis data (temperature) in the native spherical harmonics representation in GRIB format.


    Code Block
    #!/usr/bin/env python
    import cdsapi
    c = cdsapi.Client()
    c.retrieve('reanalysis-era5-complete', { # Requests follow MARS syntax
                                             # Keywords 'expver' and 'class' can be dropped. They are obsolete
                                             # since their values are imposed by 'reanalysis-era5-complete'
        'date'    : '2013-01-01',            # The hyphens can be omitted
        'levelist': '1/10/100/137',          # 1 is top level, 137 the lowest model level in ERA5. Use '/' to separate values.
        'levtype' : 'ml',
        'param'   : '130',                   # Full information at https://apps.ecmwf.int/codes/grib/param-db/
                                             # The native representation for temperature is spherical harmonics
        'stream'  : 'oper',                  # Denotes ERA5. Ensemble members are selected by 'enda'
        'time'    : '00/to/23/by/6',         # You can drop :00:00 and use MARS short-hand notation, instead of '00/06/12/18'
        'type'    : 'an',
    }, 'output')                             # Output file; in this example containing fields in grib format. Adapt as you wish.
    



  4. Tailor your request to
    1. re-grid to the desired regular lat-lon resolution
    2. convert to NetCDF (works for regular grids only, i.e., so you need to use the 'grid' keyword as well)
    3. select sub areas


      Expand
      titleExample to download model level ERA5 analysis data (temperature) for a given area at a regular lat/lon grid in NetCDF format.


      Code Block
      #!/usr/bin/env python
      import cdsapi
      c = cdsapi.Client()
      c.retrieve('reanalysis-era5-complete', { # Requests follow MARS syntax
                                               # Keywords 'expver' and 'class' can be dropped. They are obsolete
                                               # since their values are imposed by 'reanalysis-era5-complete'
          'date'    : '2013-01-01',            # The hyphens can be omitted
          'levelist': '1/10/100/137',          # 1 is top level, 137 the lowest model level in ERA5. Use '/' to separate values.
          'levtype' : 'ml',
          'param'   : '130',                   # Full information at https://apps.ecmwf.int/codes/grib/param-db/
                                               # The native representation for temperature is spherical harmonics
          'stream'  : 'oper',                  # Denotes ERA5. Ensemble members are selected by 'enda'
          'time'    : '00/to/23/by/6',         # You can drop :00:00 and use MARS short-hand notation, instead of '00/06/12/18'
          'type'    : 'an',
          'area'    : '80/-50/-25/0',          # North, West, South, East. Default: global
          'grid'    : '1.0/1.0',               # Latitude/longitude. Default: spherical harmonics or reduced Gaussian grid
          'format'  : 'netcdf',                # Output needs to be regular lat-lon, so only works in combination with 'grid'!
      }, 'ERA5-ml-temperature-subarea.nc')     # Output file. Adapt as you wish.
      



...

data is only available for the years 2000-2006 inclusive - so make sure that your request dates are within this time period.

...

titleExample to download ERA5.1 monthly mean temperature at 50 hPa at a regular lat/lon grid in NetCDF format.
Code Block
#!/usr/bin/env python
import cdsapi
c = cdsapi.Client()
c.retrieve('reanalysis-era5.1-complete', { # Please note the addition '.1' for ERA5.1!
                                           # Keywords 'expver' and 'class' can be dropped. They are obsolete
                                           # since their values are imposed by 'reanalysis-era5.1-complete'
    'date': '2005-01-01',                  # Valid range:  2000-01-01 to 2006-12-31. Always first of the month for monthly means
    'levelist': '50',                      # Pressure level at 50 hPa
    'levtype': 'pl',
    'param': '130.128',                    # Full information at https://apps.ecmwf.int/codes/grib/param-db/
    'stream': 'moda',                      # Monthly means (of Daily means).
    'type': 'an',
    'grid'    : '1.0/1.0',                 # Latitude/longitude grid resolution.
    'format'  : 'netcdf',                  # Output needs to be regular lat-lon, so only works in combination with 'grid'!
}, 'era5.1-temperature-monthly-mean.nc')

For ERA5-complete preliminary back-extension (1950-1978) follow the same procedure as for era5-complete explained above, however:

edit the script to change:

Code Block
'reanalysis-era5-complete' to 'reanalysis-era5-complete-preliminary-back-extension'

data is available for the years 1950-1978 inclusive - so make sure that your request dates are within this time period.

...

titleExample to download ERA5 back extension (preliminary 1950-1978) hourly temperature from model level 1 to 5 at a regular lat/lon grid in NetCDF format

...

languagepy

...

time period.


Expand
titleExample to download ERA5 back extension (preliminary 1950-1978) .1 monthly mean temperature at 50 hPa at a regular lat/lon grid in NetCDF format.


Code Block
#!/usr/bin/env python
import cdsapi
c = cdsapi.Client()
c.retrieve('reanalysis-era5.1-complete-preliminary-back-extension', { # Please note the name of the datasetaddition '.1' for ERA5.1!
                                           # Keywords 'expver' and 'class' can be dropped. They are obsolete
                                           # since their values are imposed by 'reanalysis-era5.1-complete-preliminary-back-extension'
    'date': '19642005-01-01',                  # Valid range:  19502000-01-01 to 19782006-12-31. Always first of the month for monthly means
    'levelist': '50',                      # Pressure level at 50 hPa
    'levtype': 'pl',
    'param': '130.128',                    # Full information at https://apps.ecmwf.int/codes/grib/param-db/
    'stream': 'moda',                      # Monthly means (of Daily means).
    'type': 'an',
    'grid'    : '1.0/1.0',                 # Latitude/longitude grid resolution.
    'format'  : 'netcdf',                  # Output needs to be regular lat-lon, so only works in combination with 'grid'!
}, 'era5.preliminary-back1-extension-temperature-monthly-mean.nc')





Info
iconfalse

This document has been produced in the context of the Copernicus Climate Change Service (C3S).

The activities leading to these results have been contracted by the European Centre for Medium-Range Weather Forecasts, operator of C3S on behalf of the European Union (Delegation agreement Agreement signed on 11/11/2014 and Contribution Agreement signed on 22/07/2021). All information in this document is provided "as is" and no guarantee or warranty is given that the information is fit for any particular purpose.

The users thereof use the information at their sole risk and liability. For the avoidance of all doubt , the European Commission and the European Centre for Medium - Range Weather Forecasts have no liability in respect of this document, which is merely representing the author's view.

Content by Label
showLabelsfalse
max5
spacesCKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("cds","era5") and type = "page" and space = "CKB"
labelscds

...