@BeginModule
@NewPage
@Name      = Timstat
@Title     = Statistical values over all timesteps
@Section   = Statistical values
@Class     = Statistic
@Arguments = ifile ofile
@Operators = timmin timmax timsum timmean timavg timstd timstd1 timvar timvar1

@BeginDescription
This module computes statistical  values over all timesteps in @file{ifile}. Depending on 
the chosen operator the minimum, maximum, sum, average, variance or standard deviation of 
all timesteps read from @file{ifile} is written to @file{ofile}.
The time stamp in @file{ofile} is from the middle contributing timestep of @file{ifile}.
@EndDescription
@EndModule


@BeginOperator_timmin
@Title     = Time minimum

@BeginDescription
@IfMan
o(1,x) = min{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf min}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timmax
@Title     = Time maximum

@BeginDescription
@IfMan
o(1,x) = max{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf max}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timsum
@Title     = Time sum

@BeginDescription
@IfMan
o(1,x) = sum{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf sum}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timmean
@Title     = Time mean

@BeginDescription
@IfMan
o(1,x) = mean{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf mean}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timavg
@Title     = Time average

@BeginDescription
@IfMan
o(1,x) = avg{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf avg}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timvar
@Title     = Time variance

@BeginDescription
Divisor is n. 

@IfMan
o(1,x) = var{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf var}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timvar1
@Title     = Time variance (n-1)

@BeginDescription
Divisor is (n-1). 

@IfMan
o(1,x) = var1{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf var1}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timstd
@Title     = Time standard deviation

@BeginDescription
Divisor is n. 

@IfMan
o(1,x) = std{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf std}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_timstd1
@Title     = Time standard deviation (n-1)

@BeginDescription
Divisor is (n-1). 

@IfMan
o(1,x) = std1{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
@BeginMath
o(1,x) = \mbox{\bf std1}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginExample
To compute the mean over all input timesteps use:
@BeginVerbatim
   cdo timmean ifile ofile
@EndVerbatim
@EndExample
