Open bekozi opened 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.
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.
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.
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:
- The frequency of dry day (Similar to the number of wet days "RR1")
- 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")
- 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)
'icclim_custom'
'kwds'
function dictionary value will be the keyword arguments toicclim.indice
icclim
documentation for custom indices: http://icclim.readthedocs.io/en/latest/python_api.html#example-3-indice-tg90p-with-callbackPing @nilshempelmann, @pagecp