xarray.core.rolling.DatasetRolling.construct

xarray.core.rolling.DatasetRolling.construct#

DatasetRolling.construct(window_dim=None, stride=1, fill_value=<NA>, keep_attrs=None, **window_dim_kwargs)[source]#

Convert this rolling object to xr.Dataset, where the window dimension is stacked as a new dimension

Parameters:
  • window_dim (str or mapping, optional) – A mapping from dimension name to the new window dimension names. Just a string can be used for 1d-rolling.

  • stride (int, optional) – size of stride for the rolling window.

  • fill_value (Any, default: dtypes.NA) – Filling value to match the dimension size.

  • **window_dim_kwargs ({dim: new_name, ...}, optional) – The keyword arguments form of window_dim.

Returns:

Dataset with variables converted from rolling object.