Is there a way to get the mean annual maximum of monthly data with an xarray function? #5854
-
Is it possible in xarray to get the mean annual maximum of monthly data? I tried get the maxima per year via a loop, but I was wondering if there is another way do it just through xarray? Example code below:
|
Beta Was this translation helpful? Give feedback.
Answered by
TomNicholas
Oct 12, 2021
Replies: 1 comment 2 replies
-
Have you seen the GroupBy functionality? If you added a year coordinate to your data then you could do something like |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
pecos27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you seen the GroupBy functionality? If you added a year coordinate to your data then you could do something like
da.groupby("year").max()
.