bird-house / flyingpigeon

WPS processes for climate model data, indices and extreme events
http://flyingpigeon.readthedocs.io/en/latest/
Apache License 2.0
19 stars 15 forks source link

Average over polygon subset #314

Open huard opened 4 years ago

huard commented 4 years ago

Description

Instead of only subsetting, take the average over each polygon.

nilshempelmann commented 4 years ago

@huard you mean a fieldmean?

huard commented 4 years ago

I guess so, the average over all points included in the geometry. I realized that the function does already that, but it shouldn't. It's a subset process, it should return the full grid intersecting with the geometry. I think I mistakenly set aggregate to True, while it should be set to False.

nilshempelmann commented 4 years ago

I am not really following you. Country and continent subset returns a grid of the selected polygon. If you set mosaik to true than multiple polygons gets retuned as one multypolygon mosaik. The spaghetti/uncertainty plot calculates the spatial average. Is that what you want?

huard commented 4 years ago

Correct, but I think the wfs_subset did not return a grid on the selected polygon, but an average over each polygon.

What I want here is a single spatial average value for each time step over each polygon. I'm getting Internal Server Error (500) with the master, any idea ?

nilshempelmann commented 4 years ago

You want the single spatial average value as a netCDF output? I have planed to wrap up the fieldmean function next week. I could add a process for fieldmean calculation. Never had a server error 500.

nilshempelmann commented 4 years ago

The spaghetti plot can output the timeseries also as files.

huard commented 4 years ago

Correct, but I want the mean computed only over a polygon.

I think we should update pywps to at least 4.2.3. The 4.2.2 version is incompatible with recent owslib.