Versions Compared

Key

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

...

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


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')

This CDS API script can be used to retrieve the "4v" 10m wind components from the ECMWF data archive, MARS. For more information on how to use this scriptCDS API scripts, see How to download ERA5. 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 you should use the hourly steps from 1 to 12 hours. In the script above, the validity date/time would be given by adding the step, 12 hours, to the time, 21 UTC, thereby yielding a validity date/time of 1986-07-24 at 9 UTC, which is the 12th event in Table 1 below, for the 10m U.

...