[Bug]: (Un-weighted) temporal averaging probably doesn't need bounds #437
Labels
priority: now
Requires immediate attention
type: bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
work: obvious
Milestone
What happened?
I was looking at the PR that adds functionality to create accurate time bounds and came across some 3-hour datasets where the new functionality was doing something reasonable, but I didn't actually know what the bounds should be. I realized this doesn't actually matter for 3-hour bounds, because the upper and lower bound are always 3 hours apart (and so all time elements have equal weight). This is different from averaging across months, because different months have varying lengths (and receive slightly different weights).
Anyways, I passed my 3-hourly dataset into
group_average
withweighted=False
and got a KeyError because the time bounds were missing. But for an unweighted average we don't need the time bounds (I think).What did you expect to happen?
I thought xcdat would return a temporally averaged dataset.
Minimal Complete Verifiable Example
Relevant log output
Anything else we need to know?
I think the issue is here. We require bounds even if
weighted=False
(I think the bounds are only used to calculate weights...which we don't need). Although the time bounds are passed into the averaging functions, they aren't used!I think we could modify this code to:
Environment
Current-ish dev branch.
The text was updated successfully, but these errors were encountered: