NCPP / ocgis

OpenClimateGIS is a set of geoprocessing and calculation tools for CF-compliant climate datasets.
Other
70 stars 19 forks source link

Add support for ICCLIM custom indices #450

Open bekozi opened 7 years ago

bekozi commented 7 years ago

Ping @nilshempelmann, @pagecp

huard commented 7 years ago

Well, that's a lot more complicated than I anticipated. The custom user indices computation is deeply buried in icclim and there seems to be a lot of data preparation before it's called, which as I understand would have to be replicated within ocgis. Christian, suggestions ?

Also, is it possible that currently ocgis does not support passing some icclim function parameters. For example RR1 has a parameter called "threshold" and it doesn't seem possible at the moment to assign any value to it from ocgis.

bekozi commented 7 years ago

Well, that's a lot more complicated than I anticipated. The custom user indices computation is deeply buried in icclim and there seems to be a lot of data preparation before it's called, which as I understand would have to be replicated within ocgis.

When I looked at it awhile ago, my thought would be to have ocgis as a very thin layer that mostly just passes through to icclim. It may not be worth it though unless there is a big advantage to using ocgis in all cases.

Also, is it possible that currently ocgis does not support passing some icclim function parameters. For example RR1 has a parameter called "threshold" and it doesn't seem possible at the moment to assign any value to it from ocgis.

It would be nice to modify the ocgis-icclim interface to allow arbitrary keyword arguments allowing icclim to evolve without much change to ocgis. That interfaces needs some TLC.

pagecp commented 7 years ago

I agree with Ben's comment. Just having ocgis to act as a thin layer on top of icclim probably the way to go.

For icclim parameter passing, I agree that having an interface to pass arbitrary arguments would be the best. It could be gcc-like for example.

bekozi commented 6 years ago

Received a request from another user to implement these. It would be good to identify a path forward for integrating custom indices. Here is the request:

  1. The frequency of dry day (Similar to the number of wet days "RR1")
  2. Precipitation intensity but only for days exceeding the specific percentile (similar to SDII but only for the days exceeding the specific percentile "e.g. pr > 99th percentile")
  3. Modified indices for the frequency of day exceeding percentile thresholds, instated of fixed percentile thresholds ("R99p") externally specifiable thresholds (e.g. 10, 20, ... 75, 90, 95, 99)