Versions Compared

Key

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

...

Expand
titleCDS API script to retrieve the "4v" 10m winds

The CDS API script below can be used to retrieve the "4v" 10m wind components from the ECMWF data archive, MARS. For more information on how to use this script, see How to download ERA5.

Code Block
#!/usr/bin/env python
import cdsapi
 
c = cdsapi.Client()
c.retrieve('reanalysis-era5-complete', {     # do not change this!
    'stream'  : 'oper',
    'type'    : '4v',
    'levtype' : 'sfc',
    'param'   : '165.128/166.128',
    'date'    : '1986-07-23',
    'time'    : '21',
    'step'    : '12',
    'grid'    : '0.25/0.25', # Latitude/longitude grid: east-west (longitude) and north-south resolution (latitude). Default: reduced Gaussian grid
    'format'  : 'grib', # Default: grib, supported netcdf.
}, 'outfile.grib')

For the temporal specification, the CDS uses the validity date and time, whereas MARS uses date, time and step. The 4v trajectories begin from 9 and 21 UTC and the step is hourly to 12 hours. In the script above, the validity date/time is given by adding the step, 12 hours, to the time, 21 :00 UTC. This yields a validity date/time of 1986-07-24, 9 UTC, which is the 12th event in the first table below, for the 10m U.

...