• MARS stands for Meteorological Archive and Retrieval System. MARS is the ECMWF archival system which handles the requests that are submitted externally through the Web-API.
  • A MARS request is basically a request for retrieving data from MARS using a specific language
  • For more information about MARS you may visit  the MARS user documentation.
  • An easy way to create your own MARS request is by using the web interfaces: How to check the content of the archive - Web API FAQ
  • Make some selections and click on "View the MARS request". The system will automatically translate your selections to a MARS request.
  • This request can be used as a pilot to build your Web API script.

In the case of ERA Interim an example could be:

era-interim.py
#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
   
server = ECMWFDataServer()
   
server.retrieve({
    'stream'    : "oper",
    'levtype'   : "sfc",
    'param'     : "165.128/41.128",
    'dataset'   : "interim",
    'step'      : "0",
    'grid'      : "0.75/0.75",
    'time'      : "00",
    'date'      : "2013-09-01/to/2013-09-30",
    'type'      : "an",
    'class'     : "ei",
    'target'    : "interim_2013-09-01to2013-09-30_00.grib"
})
era-interim.mars
retrieve,
   stream=oper,
   levtype=sfc,
   param=165.128/41.128,
   dataset=interim,
   step=0,
   grid=0.75/0.75,
   time=00,
   date=2013-09-01/to/2013-09-30,
   type=an,
   class="ei",
   target="interim_2013-09-01to2013-09-30_00.grib"