bluegreen-labs / ecmwfr

Interface to the public ECMWF API Web Services
https://bluegreen-labs.github.io/ecmwfr/
Other
106 stars 30 forks source link

Request time-series of a point or serveral points #68

Closed JVAQUEROM closed 9 months ago

JVAQUEROM commented 4 years ago

Hi,

First thing I would like to congratulate you for this wonderfull package that bring a way to download ECMWF data from R.

I would like to know if there is a way to get time-series of data like in this example/tutorial from CDS: https://cds.climate.copernicus.eu/toolbox/doc/how-to/2_how_to_retrieve_time_series_and_extract_point_information/2_how_to_retrieve_time_series_and_extract_point_information.html

If not, I wonder if this functionality will be added at some point.

Thank you and congratulations!

khufkens commented 4 years ago

I've been looking into this myself for some of my phenology modelling work (which uses tons of single sites rather than wall to wall data).

Sadly, this has had little success. Although it is possible to query a single pixel by setting the "area" parameter to an extent which is smaller than the pixel dimension (i.e. you use the same bounding box values for lat / lon), the queries take ages.

I had good success with querying small subsets (3x3 pixels) of single level data really quickly (so this is one particular time "layer" if you will). It seems to me the bottleneck is rapidly providing data along the time dimension which seems tricky.

How fast are the queries on the toolbox platform, if you have any experience?

I've looked at their remote code (for local script execution) and this happens through the same backend as I use to query the data. Sadly, the API is opaque (you have to use python wrapper, the rest isn't officially documented). So I might be able to speed up things using some calls I'm not aware of.

Screenshot from 2020-07-22 14-05-11

Anyway, I'll poke around but don't expect miracles any time soon.

khufkens commented 4 years ago

From the CDSAPI I can infer there is a workflow routine to submit python toolbox code, including all requests as specified in your example. A remote example for python is given here:

https://pypi.org/project/cdstoolbox-remote/

So this should work through R, but with python code as a toolbox query language (not native).

Screenshot from 2020-07-22 15-17-03