Versions Compared

Key

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

...

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



...