Commit 741e70ab authored by BorjaEst's avatar BorjaEst
Browse files

Add comment info to groupby_decade

parent f688f0f2
......@@ -36,6 +36,7 @@ class ModelAccessor:
return self._model.groupby(xr.DataArray(years))
def groupby_decade(self):
"""Returns a grouped dataset by decade"""
def delta_map(x): return x.year // 10 * 10
years = self._model.indexes['time'].map(delta_map)
return self._model.groupby(xr.DataArray(years))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment