To access ECMWF you will need an API KEY that can be optained at https://api.ecmwf.int/v1/key/. A full description of the ECMWF WEB API can be found at { "ECMWF" : "API", "version" : 1 }.
Code Block |
---|
language | javascript |
---|
title | Content $HOME/.ecmwfapirc |
---|
|
{
"url" : "https://api.ecmwf.int/v1",
"key" : "XXXXXXXXXX",
"email" : "john.smith@example.com"
} |
Code Block |
---|
|
#!/usr/bin/python
from ecmwf import ECMWFDataServer
server = ECMWFDataServer(
'https://api.ecmwf.int/v1',
'XXXXXXXXXXXXXXXXXXXXXX',
'john.smith@example.com'
)
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"
}) |