Versions Compared

Key

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

Page info
infoTypeModified date
prefixLast modified on
typeFlat

Table of Contents
maxLevel5
Introduction

The following procedures describe how to compute the pressure and geopotential on model levels, geopotential height and geometric height.

Pressure on model levels

In ERA5, pressure is provided at the surface, but not on individual model levels. However, an illustration of pressure on model levels (p_ml) is shown in Figure 1, and the pressure can be computed for particular dates and times using the procedure described below.

You will need the following Inputs:

  • logarithm of surface pressure (lnsp)

    Code Block
    languagepy
    titleExample to download ERA5 lnsp data for a given area at a regular lat/lon grid in NetCDF format
    collapsetrue
    #!/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',                     # 1 is top level, 137 the lowest model level in ERA5. Use '/' to separate values.
        'levtype' : 'ml',
        'param'   : '152',                   # 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-lnsp-subarea.nc')            # Output file. Adapt as you wish.
    


  • a(n) and b(n) coefficients defining the model levels; these are included in the GRIB header of each model level GRIB message and are also tabulated here.

The model half-level pressure (p_half), illustrated in Figure 2, is given by:


Info
iconfalse


Mathdisplay
\text{p_half} = a + b \ast \text{sp}


where sp (

Mathinline
\text{sp} = e^{lnsp}

 ) is the surface pressure (and lnsp is it's natural logarithm).

The pressure on model levels (p_ml), illustrated in Figure 1, is given by the mean of the pressures on the model half levels immediately above and below (see Figure 2):

Info
iconfalse


Mathdisplay
\text{p_ml} = \frac{\text{p_half_above} + \text{p_half_below}}{2}


This means that the pressure on model levels is in the middle of the layers defined by the model half levels (Figure 2).

For more details about the vertical discretisation in the ECMWF Integrated Forecasting System (IFS), please see Part-iii Dynamics and numerical procedures, section 2.2 and the FULL-POS documentation at:

http://www.umr-cnrm.fr/gmapdoc/spip.php?article157

Illustrations of model levels, model half levels and model layers




Figure 1. An illustration of IFS model levels, showing
how they follow the terrain near the surface of the
Earth. Level=1 is near the top of the atmosphere
and Level=137 is near the surface of the Earth. The
left hand axes are altitude (km) and pressure (hPa),
while the right hand axis is level number.

Figure 2. An illustration of IFS model levels, model half-levels and model layers. The pressure
on model levels is in the middle of the layers defined by the model half
levels immediately above and below. The uppermost layer is adjacent to the
top of the atmosphere (where p=0), while the lowest layer is adjacent to the
surface of the Earth (where p=sp).

Geopotential on model levels

In ERA5, geopotential (z) is provided at the surface, but not on individual model levels. However, geopotential on model levels can be computed using the procedure described below.

Inputs:

  • geopotential at the surface
  • logarithm of surface pressure (lnsp)
  • temperature and specific humidity on all the model levels

Output: Geopotential for each level, in m2/s2.

In the procedure below, the output data is written in GRIB format.

Please note, this procedure is an approximation to the calculation performed in the IFS (which also takes account of the effects of cloud ice and water and rain and snow).

Prerequisites to calculating Geopotential on model levels

You will need:

  • A computer running Linux
  • Python3
  • The CDS API installed; Your computer must be set up for downloading ERA5 model level data (from the 'reanalysis-era5-complete' dataset, stored in ECMWF's MARS catalogue) through the CDS API. For more details, please follow the instructions here (step B).

  • The ecCodes library to read and write data. 

Step 1: Download input data

First we must retrieve the required ERA5 data. We need:

  • Temperature (t) and specific humidity (q) on each model level.
  • The logarithm of surface pressure (lnsp) and geopotential (z) on model level 1.

We use a Python script to download the ERA5 data from the MARS catalogue using the CDS API. The procedure is:

  1. Copy the script below to a text editor on your computer
  2. Edit the date, type, step, time, grid and area in the script to meet your requirements
  3. Save the script (for example with the filename as 'get_data_geopotential_on_ml.py')
  4. Run the script
Code Block
languagepy
titlePython script to download ERA5 data NOT listed in CDS through CDS API
linenumberstrue
collapsetrue
#!/usr/bin/env python
import cdsapi
c = cdsapi.Client()

# data download specifications:
cls     = "ea"         # do not change
expver  = "1"          # do not change
levtype = "ml"         # do not change
stream  = "oper"       # do not change
date    = "2018-01-01" # date: Specify a single date as "2018-01-01" or a period as "2018-08-01/to/2018-01-31". For periods > 1 month see https://confluence.ecmwf.int/x/l7GqB
tp      = "an"         # type: Use "an" (analysis) unless you have a particular reason to use "fc" (forecast).
time    = "00:00:00"   # time: ERA5 data is hourly. Specify a single time as "00:00:00", or a range as "00:00:00/01:00:00/02:00:00" or "00:00:00/to/23:00:00/by/1".

c.retrieve('reanalysis-era5-complete', {
    'class'   : cls,
    'date'    : date,
    'expver'  : expver,
    'levelist': '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137',         # For each of the 137 model levels
    'levtype' : 'ml',
    'param'   : '130/133', # Temperature (t) and specific humidity (q)
    'stream'  : stream,
    'time'    : time,
    'type'    : tp,
	'grid'    : [1.0, 1.0], # Latitude/longitude grid: east-west (longitude) and north-south resolution (latitude). Default: 0.25 x 0.25
	'area'	  : area, #example: [60, -10, 50, 2], # North, West, South, East. Default: global
}, 'tq_ml.grib')


c.retrieve('reanalysis-era5-complete', {
    'class'   : cls,
    'date'    : date,
    'expver'  : expver,
    'levelist': '1',       # Geopotential (z) and Logarithm of surface pressure (lnsp) are 2D fields, archived as model level 1
    'levtype' : levtype,
    'param'   : '129/152', # Geopotential (z) and Logarithm of surface pressure (lnsp) 
    'stream'  : stream,
    'time'    : time,
    'type'    : tp,
	'grid'    : [1.0, 1.0], # Latitude/longitude grid: east-west (longitude) and north-south resolution (latitude). Default: 0.25 x 0.25
	'area'	  : area, #example: [60, -10, 50, 2], # North, West, South, East. Default: global
}, 'zlnsp_ml.grib')

Running the script produces two new files in the current working directory:

  • 'tq_ml.grib' (a GRIB file containing temperature and specific humidity)
  • 'zlnsp_ml.grib' (a GRIB file containing geopotential and log of surface pressure).

Step 2: Compute geopotential on model levels

We then use a Python script to compute geopotential (z) for all model levels:

  1. Copy the script below to a text editor
  2. Save the script as 'compute_geopotential_on_ml.py'
  3. Run the script 'compute_geopotential_on_ml.py' with the correct arguments, i.e. :  python compute_geopotential_on_ml.py tq_ml.grib zlnsp_ml.grib -o z_on_ml.grib
Expand
titlecompute_geopotential_on_ml.py

Include Page
ECC:compute_geopotential_on_ml.py
ECC:compute_geopotential_on_ml.py

This script is from ECMWF's generic article Compute geopotential on model levels .

Alternatively, there is a customer-supplied script (which runs on Microsoft Windows) that computes geopotential on model levels for a specific location. This script was written for the ERA-Interim dataset, but can be adapted to ERA5. Please see the article ERA-Interim: compute geopotential on model levels for details.

For users experienced in Metview, there is a built-in function called mvl_geopotential_on_ml.

Geopotential height

In ERA5, and often in meteorology, heights (the height of the land and sea surface, or specific heights in the atmosphere) are not represented as geometric height, or altitude (in metres above the spheroid), but as geopotential height (in metres above the geoid, which is represented by the mean sea level in ERA5). Note, that ECMWF usually archive the geopotential (in m2/s2), not the geopotential height.

To obtain the geopotential height (h) in metres (of the land and sea surface or at particular heights in the atmosphere), simply divide the geopotential by the Earth's gravitational acceleration, which has a fixed value of 9.80665 m/s2 in the IFS. This geopotential height is relative to the geoid over land and the mean sea level over ocean - for more information see ERA5: data documentation - spatial reference systems.

Geometric height

The geometric height or altitude (alt) is given by:

Info
iconfalse


Mathdisplay
alt = Re \ast h/(Re-h)


where Re is the radius of the Earth. This geometric height is relative to the geoid over land and the mean sea level over ocean and it is assumed that the Earth is a perfect sphere - for more information see ERA5: data documentation - spatial reference systems.


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 signed on 11/11/2014). 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 = "era5" and type = "page" and space = "CKB"
labels era-interim