Versions Compared

Key

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

Table of Contents
maxLevel3

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 In Progress Knowledge Base articles section

...

1 - Introduction

This article describes how users can access the family of ERA5 datasets via the Climate Data Store (CDS) infrastructure.

...

2 - Prerequisites

...

  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.


    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.
      



...

  1. edit the script to change:


    Code Block
    'reanalysis-era5-complete' to 'reanalysis-era5.1-complete'
    


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


Expand
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 follow the same procedure as for era5-complete explained above, however:

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


    Expand
    titleExample to download ERA5 back extension 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-complete-preliminary-back-extension', { # Please note the name of the dataset
                                               # Keywords 'expver' and 'class' can be dropped. They are obsolete
                                               # since their values are imposed by 'reanalysis-era5-complete-preliminary-back-extension'
        'date': '1964-01-01',                  # Valid range:  1950-01-01 to 1978-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-back-extension-temperature-monthly-mean.nc')
    




...