Versions Compared

Key

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


Excerpt
hiddentrue

You may start with the examples available on TIGGE sample scripts or by creating your request using our Datasets Web Interface.

Table of Contents

Public users

How to write my first Web-API script?

...

You may start with the examples available on ERA-interim TIGGE sample scripts or by creating your request using our Datasets Web Interface . Please note the following:

  1. We strongly advice you to start with a simple request. ( 1-2 parameters 1 time step 1-2  steps etc)
  2. In case of Python the request will be a dictionary with "keys" and "values" that represent your selection. (eg "step":"00", "time": 00")
  3. The request is strongly connected to the availability of the data
  4. The request has a Python dictionary format.
  5. You can use Use the example below as a basis to write your own script

          

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

server.retrieve({
    'origin' 
   : "stream"kwbc",
    'levelist'  : "oper200",
    "'levtype"'   : "sfcpl",
    'expver'    "param": "165.128/41.128prod",
    "'dataset"'   : "interimtigge",
    "step":'step'      : "0/6",
    "grid"'grid'      : "0.755/0.755",
    'param'     : "131/132",
    'time'      : "00/06/12/18",
    'date'      : "002014-10-01",
    'type'      : "cf",
    'class'     : "ti",
    'target'    : "tigge_2014-10-01_00061218.grib"
})

ECMWF members (i.e. licence holders, authorised users, staff and members of NHMSs in Member and Co-operating States):

You can use the 'mars' script with the MARS syntax or you can request it from Python using this class:

Code Block
languagepy
#!/usr/bin/env python
from ecmwfapi import ECMWFService
  
server = ECMWFService("mars")
server.execute(
    {
    "class": "od"date" : "2013-09-01/to/2013-09-30",
    "type" "date": "20150101",
    "expver": "an1",
    "class" "levtype": "sfc",
    "param": "ei167.128",
    "step": "0/to/240/by/12",
    "stream": "oper",
    "time": "target00",
    "type": "data.gribfc"
    },
    "target.grib")


Content by Label
showLabelsfalse
max510
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" webapi-faqs" and label in ("documentation","python") and type = "page" and space = "~usaUDOC"
labelskb-how-to-article