For users
apply_ufunc
For developers/contributors
Community
DataArray.dt.
weekofyear
The week ordinal of the year
previous
xarray.core.groupby.DatasetGroupBy.apply
next
xarray.DataArray.dt.week