nctoolkit.DataSet.rolling_var#
- DataSet.rolling_var(window=None, align='right')#
rolling_var: Calculate a rolling variance based on a window
- Parameters:
window (int) – The size of the window for the calculation of the rolling variance
align (str) – This determines whether the output time is at the left, centre or right hand side of the time window. Options are “left”, “centre” and “right”
Examples
If you wanted to calculate a rolling variance with the variance calculated over every 10 time steps, do the following:
>>> ds.rolling_var(10)