...
Info | ||
---|---|---|
| ||
To help users to improve S2S CMA MARS requests performance via the WebAPI. A good understanding of the MARS efficiency issues is essential especially for users that are interested in downloading large amounts of data. |
How is the S2S reforecast data organised in MARS?
Info |
---|
In general it is organised, as a huge tree, with the indentation below, showing different levels down that tree:
|
What would be the natural way to group requests?
Info |
---|
The idea is to request as much data as possible from the same tape file, all time-steps, all members, all parameters for a type of level, a type, a hindcast date |
...
. The natural way to group requests |
...
Info |
---|
Following the previous paragraph, the natural way to group requests would be: Note the following:
|
Best
...
To iterate over several hindcastDates for a CMA request
...
title | The main idea in brief: |
---|
...
practise to iterate over all hindcastDates of
...
several hindcastYears
...
for
...
CMA
...
Info | title | The main idea in brief:
---|
The best approach is to iterate over the hindcastYears. For each hindcastYear iterate over all the available hindcastMonths and for each hindcastMonth iterate over all the available hindcastDays. At this point you may wish to check CMA availability and to view a CMA request |
Info | title | The main idea in brief:
---|
for hindcastYear in hindcastYears |
...
Code Block | ||
---|---|---|
| ||
#!/usr/bin/env python from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() def retrieve_data(hindcastDate): target = "target_s2s_%s.grb" % hindcastDate server.retrieve({ "class": "s2", "dataset": "s2s", "date": "2014-05-01", "expver": "prod", "hdate": hindcastDate, "levtype": "sfc", "origin": "babj", "param": "165", "step": "0", "stream": "enfh", "target": target, "time": "00", "type": "cf", }) for hindcastYear in ["2012", "2013"]: for hindcastMonth in ["08", "09"]: for hindcastDay in ["01", "02"]: hindcastDate = hindcastYear+hindcastMonth+hindcastDay retrieve_data(hindcastDate) |
Useful links