Computational Science Community Wiki

ECMWF Meterology, and how to get it.

This page details the methods used to download meterology data from ECMWF, both from their website, and from their data servers.

Website Access for Interim (and other data) and batch scripts for downloading

ECMWF meteorology data is now accessible from their website.

The first time you want to access this data you will need to register here to get a token and key: https://software.ecmwf.int/wiki/display/WEBAPI/Access+ECMWF+Public+Datasets

These you should put into a file in you home directory called: .ecmwfapirc

 {
    "url"   : "https://api.ecmwf.int/v1",
    "key"   : "###############",
    "email" : "XXXX@YYYY.ac.uk"
 }

Then register for particular database by clicking on relavent link (e.g. for interim data).

Once you have done the above then you can start downloading the meteorology data.

Set up your environment following instructions on the website e.g.  export PYTHONPATH=/Users/scott_a_n/ecmwf-api-client-python 

Copy this script - which will download the data needed by WPS - and change the dates (idate and edate) to match your period of interest.

   1 #!/usr/bin/env python
   2 
   3 import time
   4 from datetime import date
   5 
   6 # export PYTHONPATH = /usr/bin/ecmwfapi
   7 from ecmwfapi import ECMWFDataServer
   8  
   9 server = ECMWFDataServer()
  10 
  11 # Set dates for data extraction - SAMBBA campaign period
  12 idate = date(2012,07,01)
  13 edate = date(2012,10,31)
  14 
  15 while (idate <= edate):
  16 
  17     iyear = idate.year
  18     imonth = idate.month
  19     iday = idate.day
  20 
  21     strdate = "%d%02d%02d" % (iyear, imonth, iday)
  22     print strdate   
  23 
  24     # extract 3D data
  25     server.retrieve({
  26         'dataset' : "interim",
  27         'step'    : "0",
  28         'levtype' : "pl",
  29         'levelist': "all",
  30         'date'    : strdate,
  31         'time'    : "00/06/12/18",
  32         'origin'  : "all",
  33         'type'    : "an",
  34         'param'   : "129/130/131/132/157",
  35         'grid'    : "128",
  36         'target'  : "pl_"+strdate+".grib"
  37         })
  38 
  39     # extract surface data
  40     server.retrieve({
  41         'dataset' : "interim",
  42         'step'    : "0",
  43         'levtype' : "sfc",
  44         'date'    : strdate,
  45         'time'    : "00/06/12/18",
  46         'origin'  : "all",
  47         'type'    : "an",
  48         'param'   : "172/134/151/165/166/167/168/235/33/34/31/141/139/170/183/236/39/40/41/42",
  49         'grid'    : "256", # use higher resolution surface data
  50         'target'  : "sfc_"+strdate+".grib"
  51         })
  52 
  53     # move to next day
  54     
  55     idate = idate.replace(day=idate.day + 1)
  56 
  57 print "End."

Finally, run this script to download the data files (on ARCHER, or similar supercomputers, this can be done through a serial batch script).

Below is old information - please use method for Reanalysis data above instead!

ECMWF data server - use this for accessing Operational Data

Access

Access to ECMWF met files can be applied for from here: http://www.ecmwf.int/about/computer_access_registration/forms/ Contact at ECMWF is Roddy Sharp (roddy[dot]sharp[at]metoffice[dot]gov[dot]uk)

Obtaining Data

Example script:

to be added...