Skip to end of metadata
Go to start of metadata

How is the CERA-20C  Synoptic Monthly Means for Ensembles (edmm) organised in MARS?

In general it is organised, as a huge tree, with the indentation below, showing different levels down that tree

  • stream: Synoptic monthly means for ensembles (edmm)
    • Decade: 1900
      • all years of a decade, months, times, types (an/fc), level types, levels, parameters and ensemble members (same tape file)
    • Decade: 1910
      • ...
    • Decade: ...
      • ...
    • Decade: 2010
      • ...

What would be the natural way to group requests?

The idea is to request as much data as possible from the same tape file.  In general the most efficient  way to group requests would be per decade, i.e. put all years, months, times, types, level types, levels, desired parameters and ensemble members for a specific decade in one request.


  • The objective of the examples below is to demonstrate how to iterate efficiently for a particular CERA-20C request.
  • At this point you may wish to have a look on the  CERA-20C synoptic monthly means availability and identify your desired level type, data type, time periods, parameters, etc.
  • The requests below can be used as a starting point, however, you will need to adapt them to your requirements, for example change some values (the right side of the "key":"value" pairs) or add or remove some keys.

Requesting analysis (an) surface (sfc) data over multiple years

In the data tree 'decade' is highest. Getting data for the whole decade in one go might exceed data volume limitations though, so we split our request by years: we get all data we need for the first year, then move on to the next year, and so on.

#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()

def retrieve_cera20c_edmm():
       A function to demonstrate how to iterate efficiently over all months,
       for a list of years, for a CERA-20C synoptic monthly means request. 
       You can extend the number of years to adapt the iteration to your needs.
       You can use the variable 'target' to organise the requested data in files as you wish."        
    yearStart = 2000
    yearEnd = 2003
    monthStart = 1
    monthEnd = 12

    # edmm is arranged by years, so we iterate over the years
    for year in list(range(yearStart, yearEnd + 1)):
        requestMonthList = []
        for month in list(range(monthStart, monthEnd + 1)):
            requestMonthList.append('%04d-%02d-01' % (year, month))
        requestMonths = "/".join(requestMonthList)
        # we submit a data request for the current year
        target = "cera20c_edmm_an_%s_sfc.grb" % (year)
        era20c_edmm_sfc_request(requestMonths, target)

def era20c_edmm_sfc_request(requestMonths, target):
        A CERA-20C request for analysis, sfc data.
        You can change the keywords below to adapt it to your needs.
        (eg add or remove  parameters, times etc)
        "class": "ep",
        "dataset": "cera20c",
        "stream": "edmm",
        "expver": "1",
        "type": "an",
        "levtype": "sfc",
        "date": requestMonths,
        "param": "165.128/166.128/167.128/168.128",
        "target": target,
        "time": "00/06/12/18"

if __name__ == '__main__':