@BeginModule
@NewPage
@Name      = Consecstat
@Title     = Consecute timestep periods
@Section   = Statistical values
@Class     = Statistic
@Arguments = ifile ofile
@Operators = consecsum consects

@BeginDescription
This module computes periods over all timesteps in @file{ifile} where a
certain property is valid. The propery can be chosen by creating a mask from
the original data, which is the expected input format for operators of this
module. Depending on the operator full information about each period or
just its length and ending date are computed.
@EndDescription
@EndModule


@BeginOperator_consecsum
@Title     = Consecutive Sum

@BeginDescription
This operator computes periods of consecutive timesteps similar to a
@mod{runsum}, but periods are finished, when the mask value is 0. That way
multiple periods can be found. Timesteps from the input are preserved. Missing
values are handled like 0, i.e. finish periods of consecutive timesteps.
@EndDescription
@EndOperator


@BeginOperator_consects
@Title     = Consecutive Timesteps

@BeginDescription
In contrast to the operator above consects only computes the lenght of each
period together with its last timestep. To be able to perform statistical
analysis like min, max or mean, everything else is set to missing value.
@EndDescription
@EndOperator


@BeginExample
For a given time series of daily temperatures, the periods of summer days can be
calculated with inplace maskting the input field:
@BeginVerbatim
   cdo consects -gtc,20.0 ifile1 ofile
@EndVerbatim
@EndExample
