Versions Compared

Key

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

...

Expand
titleBasic CDS API script example to download hourly snow depth (in m of water equivalent) on 1st January 2013 from ERA5-Land data archived in MARS


Code Block
languagetext
#!/usr/bin/env python
import cdsapi
 
c = cdsapi.Client()
c.retrieve('reanalysis-era5landera5-completeland', {    # do not change this!
    'class'   : 'l5',
    'expver'  : '1',
    'stream'  : 'oper',
    'type'    : 'an',
    'param'   : '141.128',
    'levtype' : 'sfc',
    'date'    : '2013-01-01',
    'time'    : '00/to/23/by/1',
}, 'snow_20130101_era5land.grib')


...

Expand
titleBasic CDS API script example to download hourly snow depth (in m of water equivalent) on 1st January 2013 from ERA5-Land data archived in the CDS


Code Block
languagetext
#!/usr/bin/env python
import cdsapi

c = cdsapi.Client()
c.retrieve(
    'test-reanalysis-era5-land',
    {
        'format':'grib',
        'time':[
            '00:00','01:00','02:00',
            '03:00','04:00','05:00',
            '06:00','07:00','08:00',
            '09:00','10:00','11:00',
            '12:00','13:00','14:00',
            '15:00','16:00','17:00',
            '18:00','19:00','20:00',
            '21:00','22:00','23:00'
        ],
        'day':'01',
        'month':'01',
        'year':'2013',
        'variable':'snow_depth_water_equivalent',
        'type':'analysis'
    },
    'snow_20130101_era5land.grib')


...

Expand
titleBasic CDS API script example to download accumulated runoff from 00UTC to 12UTC on 1st January 2013 from ERA5-Land data archived in MARS


Code Block
languagetext
#!/usr/bin/env python
import cdsapi

c = cdsapi.Client()
c.retrieve('reanalysis-era5landera5-completeland', { # do not change this!
    'class' : 'l5', 
    'expver' : '1',
    'stream' : 'oper',
    'type' : 'fc',
    'param' : '205.128',
    'levtype' : 'sfc',
    'date' : '2013-01-01',
    'time' : '00',
    'step' : '12',
}, 'runoff_00-12_20130101_era5land.grib')


...

Expand
titleBasic CDS API script example to download accumulated runoff from 00UTC to 12UTC on 1st January 2013 from ERA5-Land data archived in the CDS


Code Block
languagetext
#!/usr/bin/env python
import cdsapi

c = cdsapi.Client()

c.retrieve(
    'test-reanalysis-era5-land',
    {
        'formatvariable':'gribrunoff',
        'timeyear':'12:002013',
        'daymonth':'01',
        'monthday':'01',
        'yeartime':'2013',
        'variable':'runoff12:00',
        'typeformat':'forecastgrib'
    },
    'runoff_00-12_20130101_era5land.grib')


...