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.
}, 'e5-oper-4v-sf-1986072409-uv10m-cds-marsoutfile.grib')

For the temporal specification, the CDS uses the validity date and time whereas MARS uses date, time and step. 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.



DateTimeLatitudeLongitude10m U

19790417

900

-74.051

164.160

7.2323150635e+01

19800330

700

-1.827

280.406

-5.9812698364e+01

19800330

800

-1.827

280.406

-9.8439865112e+01

19800330

900

-1.827

280.406

-7.1381820679e+01

19820908

700

-74.051

164.160

-6.9596405029e+01

19820908

800

-74.051

164.160

-5.2189117432e+01

19821024

2100

-74.051

164.160

-1.5377770996e+02

19841004

700

-74.051

164.160

-5.5174591064e+01

19841004

800

-74.051

164.160

-6.8660507202e+01

19841004

900

-74.051

165.120

-7.1647964478e+01

19860724

800

-74.051

164.160

-8.8280364990e+01

19860724

900

-74.051

164.160

-2.9203100586e+02

19871016

2000

-74.051

164.160

-9.4200180054e+01

19871016

2100

-74.051

164.160

-1.5219485474e+02

19890711

2100

38.080

78.333

7.0804840088e+01

19890912

800

-74.051

164.160

-8.3815658569e+01

19890912

900

-74.051

164.160

-1.6730293274e+02

19900402

700

-74.051

164.160

5.8469223022e+01

19930624

600

-74.051

164.160

6.0172592163e+01

19930624

700

-74.051

164.160

1.0357415771e+02

19930624

800

-74.051

164.160

7.8659744263e+01

19930624

900

-74.051

164.160

5.5145812988e+01

19930705

2000

38.080

78.333

8.0320663452e+01

19930705

2100

38.361

78.398

5.9963912964e+01

19940914

2100

-74.051

164.160

-7.9331817627e+01

19970607

700

-74.051

164.160

5.8002792358e+01

19970607

800

-74.051

164.160

1.0099096680e+02

19970923

1900

-74.051

164.160

1.3710269165e+02

20010423

2100

-74.051

164.160

-8.0685379028e+01

20040327

800

-74.051

164.160

-6.4567825317e+01

20050314

800

-1.827

280.406

-6.1867416382e+01

20050314

900

-1.827

280.406

-9.2169509888e+01

20060304

900

-1.827

280.125

-6.3722732544e+01

20060328

800

-1.827

280.406

-5.7734420776e+01

20060328

900

-1.827

280.406

-1.1018218994e+02

20070331

2100

-74.051

164.160

8.7419113159e+01

20090303

700

-1.827

280.406

-8.9056137085e+01

20090303

800

-1.827

280.406

-1.3375457764e+02

20090303

900

-1.827

280.406

-2.0406346130e+02

20091218

2100

43.138

75.000

-5.9425277710e+01

20100325

900

-1.827

280.688

-5.4004959106e+01

20110127

900

-1.827

280.406

-5.3115798950e+01

20111224

2100

43.138

75.000

-6.8307769775e+01

20130719

2100

-74.051

164.160

-6.1746520996e+01

20140426

700

-1.265

280.688

5.7151275635e+01

20140426

700

-1.546

280.406

-8.5247161865e+01

20140426

800

-1.265

280.688

7.2114089966e+01

20140426

800

-1.546

280.406

-1.4157341003e+02

20140426

900

-1.546

280.406

-2.0927426147e+02

20160522

2000

-74.051

164.160

-6.6684082031e+01

20160522

2100

-74.051

164.160

-5.9349365234e+01

20160929

2100

-74.051

164.160

6.5295028687e+01

20161128

2100

42.857

75.375

-5.2441085815e+01

...