Table of Contents |
---|
How is the TIGGE data organised in MARS?
Info |
---|
In general it is organised, as a huge tree, with the indentation below, showing different levels down that tree:
|
Best practise to iterate over all dates and all times for for a particular level type (eg Pressure levels)
Info |
---|
The best approach is to iterate over the dates and for each date iterate over the times. |
...
Info |
---|
ie select a set of 'dates' and 'times' and add the 'steps', 'origins', 'levels' and 'parameters' that you need.
|
...
Code Block | ||
---|---|---|
| ||
#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
def retrieve_tigge_data():
dates = ['2014-12-01', '2014-12-02']
times = ['00', '12']
for date in dates:
for time in times:
target = 'tigge_cf_sfc_%s_%s.grb' % (date, time)
tigge_cf_sfc_request(date, time, target)
def tigge_cf_sfc_request(date, time, target):
'''
A TIGGE request for control forecast, sfc, for 3 origins : ECMWF, JMA and KMA.
Keep in mind that if you wish to download the same data, for more than one origins,
it is more efficient to request all of them in one go.
You can change the keywords below to adapt it to your needs,
(ie to add more parameters, or steps, or even more origins etc),
Presumably you need to check the availability of the requested origins.
'''
server.retrieve({
'class': 'ti',
'dataset': 'tigge',
'date': date,
'expver': 'prod',
'grid': '0.5/0.5',
'levtype': 'sfc',
'origin': 'ecmf/rjtd/rksl',
'param': '167/168',
'step': '0/96/168',
'target': target,
'time': time,
'type': 'cf',
})
if __name__ == '__main__':
retrieve_tigge_data()
|
...
Info |
---|