Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Download temperature data for 2014
import pandas as pd
dates = pd.date_range('2014-01-01', '2014-12-31', freq='D')
dates = [str(d).split()[0] for d in dates]
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
for date in dates:
server.retrieve({
'stream' : "oper",
'levtype' : "sfc",
'param' : "165.128/166.128/167.128",
'dataset' : "interim",
'step' : "00",
'grid' : "0.25/0.25",
'time' : "00/06/12/18",
'date' : date,
'type' : "an",
'class' : "ei",
'target' : date + ".nc3",
'format' : "netcdf" })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment