79611137

Date: 2025-05-07 17:41:49
Score: 1.5
Natty:
Report link

For more complex season definitions, use the new SeasonResampler object in Xarray>2025.04.0:

import xarray as xr
from xarray.groupers import SeasonResampler

ds = xr.tutorial.open_dataset("air_temperature")

ds.resample(time=SeasonResampler(["DJFM", "AMJ", "SON"])).mean()

https://docs.xarray.dev/en/latest/user-guide/time-series.html#handling-seasons

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: dcherian