Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Following the previous paragraph,  the natural way to group requests would be:
all parameters, all levels, all members, all time-steps for 1 hindcast date.

(warning) Note the following:

  1. 'all' means 'all' that the user wants. It doesn't have to be all parameters.
  2. If a user is interested only on z500,  he may request more hindcast dates in one go, since the overall request will not be so big.

What is the best approach to loop over several

...

hindcastDates  for a CMA request?

Info
titleThe main idea in brief:

for HindcastDate hindcastDate in HindcastDatehindcastDate-list (eg, 2010-03-01 to 2010-03-31)
     S2S-request(HindcastDatehindcastDate)

(lightbulb) You may wish to have a look on some CMA re-forecast examples or to visit the ECMWF Web API Home

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
titleThe main idea in brief:
for HindcastYear in HindcastYears
for HindcastMonthhindcastMonth in HindcastMonthshindcastMonths
for HindcastDayhindcastDay in HindcastDayshindcastDays
HindcastDatehindcastDate = HindcastYear-HindcastMonthhindcastMonth-HindcastDayhindcastDay
S2S-request(HindcastDatehindcastDate)

A  simple web API example, requesting Control forecast, sfc for one hindcast date for model version 2014-05-01 

Code Block
languagepy
#!/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",
})

(lightbulb) If the request is "small" you may request more HindcastDates hindcastDates in one go.

 (info) Do you need more CMA re-forecast examples before you continue below?

...

(grey lightbulb) By setting the variable "target" accordingly you can have each hindcastDate hindcastDate to be written on a separate file .

...