On the generic aggregate transform, we return a result with the units of the data that was passed in but this is not correct. For example, as I run count_wet_days the data is returned to me in mm d-1 when it should be d. I believe that this is the offending line.
This is not so simple to fix. I think that the correct unit should be the time frequency of the dataset that is passed in to the __call__. That is, if I pass daily data into the transform, it should group by months and then compute a sum per each month. That sum is the count of when the condition is true which is of size of the time frequency of the input dataset. However, if I am passing monthly data in (to agg on say a yearly time scale), you cannot use month as a unit.
In the Daymet-related work, I have hard-coded this as 'day' for now but that is wrong.
On the generic aggregate transform, we return a result with the units of the data that was passed in but this is not correct. For example, as I run
count_wet_daysthe data is returned to me inmm d-1when it should bed. I believe that this is the offending line.This is not so simple to fix. I think that the correct unit should be the time frequency of the dataset that is passed in to the
__call__. That is, if I pass daily data into the transform, it should group by months and then compute a sum per each month. That sum is the count of when the condition is true which is of size of the time frequency of the input dataset. However, if I am passing monthly data in (to agg on say a yearly time scale), you cannot usemonthas a unit.In the Daymet-related work, I have hard-coded this as 'day' for now but that is wrong.