Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a more flexible wrapper to calculate metrics for temporal subsets, e.g to compute metrics using data for certain days of a year. We used this one e.g. in SMART-DRI to calculate correlation values for groups of 10-days (over 13 years) to estimate varying levels of subsurface scattering throughout the year (wet/dry season).
Before, this was only possible on a monthly basis: https://github.com/TUW-GEO/pytesmo/blob/master/src/pytesmo/validation_framework/metric_calculators_adapters.py#L43
Now there is a data distributor to extract certain dates, date_ranges for any year to apply the metrics calculator to.
However, this might be over-complicated, but I haven't found a way to only use e.g. pandas for this yet, but I'm pretty sure it is possible using groupby or so.
@pstradio @s-scherrer if you have any comments let me know. If we find no better solution I will probably add this class to cadati @sebhahn