...
Info |
---|
Following the previous paragraph, the natural way to group requests would be: Note the following:
|
What is the best approach to loop over several
...
hindcastDates for a CMA request?
Info | ||
---|---|---|
| ||
for HindcastDate hindcastDate in HindcastDatehindcastDate-list (eg, 2010-03-01 to 2010-03-31) |
What is the best approach to get all
...
hindcastDays for several HindcastYears ?
The best approach is to iterate over the HindcastYears. For each HindcastYear iterate over all HindcastMonths hindcastMonths and for each HindcastMonth hindcastMonth iterate over all its HindcastDayshindcastDays.
Info | ||
---|---|---|
| ||
for HindcastYear in HindcastYears |
A simple web API example, requesting Control forecast, sfc for one hindcast date for model version 2014-05-01
Code Block | ||
---|---|---|
| ||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer modelVersionDate = "2014-05-01" HindcastDatehindcastDate = "2014-04-01" # The selected hindcast date server = ECMWFDataServer() server.retrieve({ "class": "s2", "dataset": "s2s", "date": ModelVersionDate, "expver": "prod", "hdate": HindcastDatehindcastDate, "levtype": "sfc", "origin": "babj", "param": "165", "step": "0", "stream": "enfh", "target": "data.cf.sfc", "time": "00", "type": "cf", }) |
If the request is "small" you may request more HindcastDates hindcastDates in one go.
Do you need more CMA re-forecast examples before you continue below?
...
By setting the variable "target" accordingly you can have each hindcastDate hindcastDate to be written on a separate file .
...