nctoolkit.DataSet.tcumsum

DataSet.tcumsum(align='right')

tcumsum: Calculate the temporal cumulative sum of all variables

Parameters:

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 want to calculate the cumulative sum for all variables over all timesteps, do this:

>>> ds.tcumsum()