temporal group average: custom frequencies #413
-
Hi all, I was wondering if it is possible to create temporal group averages with custom daily or monthly frequencies -- for example, binned 5-day (pentad) or 5-month averages? Thanks much, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It is possible to create custom seasons, which I think could handle your 5-month average example. I don't think there is any built-in functionality to create pentads – I'm not sure how hard this would be to implement. It could be a candidate for a feature request or a pull request. |
Beta Was this translation helpful? Give feedback.
-
@arfriedman thank you for your interest in using xCDAT!
I agree to @pochedls that we don't have a built-in function for above 2 and 3 cases. |
Beta Was this translation helpful? Give feedback.
-
Thank you @lee1043 and @pochedls (I trid to accept both of your answers but it appears I can only select one). |
Beta Was this translation helpful? Give feedback.
@arfriedman thank you for your interest in using xCDAT!
If your input is daily time series and you are getting 5-day running average, I think xarray's
rolling
could be used (example).However, when your input is monthly and you take 5-month average by using the xarray's
rolling
, I guess the 5-month average is mean of 5 monthly time steps without considering weighting for different length of included months.When your input is daily and you are getting 5 month running average, I think separated steps are needed for 1) getting monthly average from daily, 2) getting 5 month running average from monthly mean.
I agree to @pochedls that we don't have a built-in function for above 2 and …