You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

See Brief request syntax to understand each keyword.

(warning) Please note:

In this page you will find some examples in Python which is fully tested and supported.

You will also find some examples in Perl and Java which are provided here for reference only.

You may wish to visit the  Web-API Downloads

Python

 #!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
  
server = ECMWFDataServer()
  
server.retrieve({
    'dataset' : "tigge",
    'step'    : "24/to/120/by/24",
    'number'  : "all",
    'levtype' : "sl",
    'date'    : "20071001/to/20071003",
    'time'    : "00/12",
    'origin'  : "all",
    'type'    : "pf",
    'param'   : "tp",
    'area'    : "70/-130/30/-60",
    'grid'    : "2/2",
    'target'  : "data.grib"
    })

Java

import org.ecmwf.DataServer;
import org.json.JSONObject;
 
public class DataServerExample {
    public static void main(String[] args) throws Exception 
    {
 
        DataServer server = new DataServer(); 
 
        JSONObject  request = new JSONObject();
         
        request.put("dataset" , "tigge");
        request.put("step"    , "24/to/120/by/24");
        request.put("number"  , "all");
        request.put("levtype" , "sl");
        request.put("date"    , "20071001/to/20071003");
        request.put("time"    , "00/12");
        request.put("origin"  , "all");
        request.put("type"    , "pf");
        request.put("param"   , "tp");
        request.put("area"    , "70/-130/30/-60");
        request.put("grid"    , "2/2");
        request.put("target"  , "data.grib");
 
        server.retrieve(request);
    }
}

Perl

#!/usr/bin/env perl
use ECMWF::DataServer;
 
my $server = ECMWF::DataServer->new();
 
$server.retrieve({
    'dataset' : "tigge",
    'step'    : "24/to/120/by/24",
    'number'  : "all",
    'levtype' : "sl",
    'date'    : "20071001/to/20071003",
    'time'    : "00/12",
    'origin'  : "all",
    'type'    : "pf",
    'param'   : "tp",
    'area'    : "70/-130/30/-60",
    'grid'    : "2/2",
    'target'  : "data.grib"
    })



 


 

  • No labels