@BeginModule
@NewPage
@Name      = Hourstat
@Title     = Hourly statistical values
@Section   = Statistical values
@Class     = Statistic
@Arguments = ifile ofile
@Operators = hourmin hourmax hoursum hourmean houravg hourstd hourstd1 hourvar hourvar1

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


@BeginOperator_hourmin
@Title     = Hourly minimum

@BeginDescription
@IfMan
For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = min{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf min}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hourmax
@Title     = Hourly maximum

@BeginDescription
@IfMan
For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = max{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf max}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hoursum
@Title     = Hourly sum

@BeginDescription
@IfMan
For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = sum{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf sum}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hourmean
@Title     = Hourly mean

@BeginDescription
@IfMan
For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = mean{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf mean}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_houravg
@Title     = Hourly average

@BeginDescription
@IfMan
For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = avg{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf avg}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hourvar
@Title     = Hourly variance

@BeginDescription
@IfMan
Divisor is n. For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = var{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
Divisor is n. For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf var}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hourvar1
@Title     = Hourly variance (n-1)

@BeginDescription
@IfMan
Divisor is (n-1). For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = var1{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
Divisor is (n-1). For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf var1}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hourstd
@Title     = Hourly standard deviation

@BeginDescription
@IfMan
Divisor is n. For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = std{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
Divisor is n. For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf std}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_hourstd1
@Title     = Hourly standard deviation (n-1)

@BeginDescription
@IfMan
Divisor is (n-1). For every adjacent sequence t_1, ...,t_n of timesteps of the same hour it is:

o(t,x) = std1{i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
Divisor is (n-1). For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same hour it is: \\
@BeginMath
o(t,x) = \mbox{\bf std1}\{i(t',x), t_1 < t' \leq t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginExample
To compute the hourly mean of a time series use:
@BeginVerbatim
   cdo hourmean ifile ofile
@EndVerbatim
@EndExample
