Download ECMWF MARS data

These steps to download ECMWF data are based on their instructions here: https://software.ecmwf.int/wiki/display/WEBAPI/Access+MARS

ECMWF parameters are described here: http://apps.ecmwf.int/codes/grib/param-db

  1. Create a directory for mars:
    mkdir -p ~/mars/bin
    mkdir -p ~/mars/lib
  2. Download mars:
    cd ~/mars/bin
    wget https://software.ecmwf.int/wiki/download/attachments/56664858/mars
    export PATH=~/mars/bin/:$PATH
    chmod +x ~/mars/bin/mars
  3. Install ECMWF KEY
  4. Install client libraries
    • Download to ~/mars/lib:
      cd ~/mars/lib
      wget https://software.ecmwf.int/wiki/download/attachments/56664858/ecmwf-api-client-python.tgz
      tar -xzf ecmwf-api-client-python.tgz
      export PYTHONPATH=~/mars/lib:$PYTHONPATH
  5. Put your MARS request into a file e.g. test.req:
    retrieve,
      class   = od,
      stream  = oper,
      expver  = 1,
      date    = 20020501/to/20020510,
      time    = 00/06/12/18,
      type    = an,
      levtype = sfc,
      param   = sea surface temperature,
      target  = "sst.grib"
  6. Request data:
    mars test.req
  7. Check your MARS request using the online catalogue before submitting a request: http://apps.ecmwf.int/mars-catalogue/
  8. There can be long delays. Check your queue here: http://apps.ecmwf.int/webmars/joblist/
  9. Check MARS activity. If there are lots of “queued”  requests, it’s busy!
  10. Some useful hints on using MARS here: https://software.ecmwf.int/wiki/display/UDOC/MARS+FAQ
    https://software.ecmwf.int/wiki/display/WEBAPI/WebAPI+FAQ