@BeginModule
@NewPage
@Name      = Yseasstat
@Title     = Multi-year seasonal statistical values
@Section   = Statistical values
@Class     = Statistic
@Arguments = ifile ofile
@Operators = yseasmin yseasmax yseassum yseasmean yseasavg yseasstd

@BeginDescription
This module writes to @file{ofile}, according to the actual operator,
the minimum, maximum, sum, average or standard deviation  of each 
season in @file{ifile}. The date information in an output field is the date
of the last contributing input field.
@EndDescription
@EndModule


@BeginOperator_yseasmin
@Title     = Multi-year seasonal minimum

@BeginDescription
@IfMan
o(1,x) = min{i(t,x), month(i(t)) = 12, 01, 02}
o(2,x) = min{i(t,x), month(i(t)) = 03, 04, 05}
o(3,x) = min{i(t,x), month(i(t)) = 06, 07, 08}
o(4,x) = min{i(t,x), month(i(t)) = 09, 10, 11}
@EndifMan
@IfDoc
@BeginMath
\begin{array}{c}
o(\mbox{1},x) = \mbox{\bf min}\{i(t,x), \mbox{month}(i(t)) = \mbox{12, 01, 02}\} \\
o(\mbox{2},x) = \mbox{\bf min}\{i(t,x), \mbox{month}(i(t)) = \mbox{03, 04, 05}\} \\
o(\mbox{3},x) = \mbox{\bf min}\{i(t,x), \mbox{month}(i(t)) = \mbox{06, 07, 08}\} \\
o(\mbox{4},x) = \mbox{\bf min}\{i(t,x), \mbox{month}(i(t)) = \mbox{09, 10, 11}\} \\
\end{array}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_yseasmax
@Title     = Multi-year seasonal maximum

@BeginDescription
@IfMan
o(1,x) = max{i(t,x), month(i(t)) = 12, 01, 02}
o(2,x) = max{i(t,x), month(i(t)) = 03, 04, 05}
o(3,x) = max{i(t,x), month(i(t)) = 06, 07, 08}
o(4,x) = max{i(t,x), month(i(t)) = 09, 10, 11}
@EndifMan
@IfDoc
@BeginMath
\begin{array}{c}
o(\mbox{1},x) = \mbox{\bf max}\{i(t,x), \mbox{month}(i(t)) = \mbox{12, 01, 02}\} \\
o(\mbox{2},x) = \mbox{\bf max}\{i(t,x), \mbox{month}(i(t)) = \mbox{03, 04, 05}\} \\
o(\mbox{3},x) = \mbox{\bf max}\{i(t,x), \mbox{month}(i(t)) = \mbox{06, 07, 08}\} \\
o(\mbox{4},x) = \mbox{\bf max}\{i(t,x), \mbox{month}(i(t)) = \mbox{09, 10, 11}\} \\
\end{array}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_yseassum
@Title     = Multi-year seasonal sum

@BeginDescription
@IfMan
o(1,x) = sum{i(t,x), month(i(t)) = 12, 01, 02}
o(2,x) = sum{i(t,x), month(i(t)) = 03, 04, 05}
o(3,x) = sum{i(t,x), month(i(t)) = 06, 07, 08}
o(4,x) = sum{i(t,x), month(i(t)) = 09, 10, 11}
@EndifMan
@IfDoc
@BeginMath
\begin{array}{c}
o(\mbox{1},x) = \mbox{\bf sum}\{i(t,x), \mbox{month}(i(t)) = \mbox{12, 01, 02}\} \\
o(\mbox{2},x) = \mbox{\bf sum}\{i(t,x), \mbox{month}(i(t)) = \mbox{03, 04, 05}\} \\
o(\mbox{3},x) = \mbox{\bf sum}\{i(t,x), \mbox{month}(i(t)) = \mbox{06, 07, 08}\} \\
o(\mbox{4},x) = \mbox{\bf sum}\{i(t,x), \mbox{month}(i(t)) = \mbox{09, 10, 11}\} \\
\end{array}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_yseasmean
@Title     = Multi-year seasonal mean

@BeginDescription
@IfMan
o(1,x) = mean{i(t,x), month(i(t)) = 12, 01, 02}
o(2,x) = mean{i(t,x), month(i(t)) = 03, 04, 05}
o(3,x) = mean{i(t,x), month(i(t)) = 06, 07, 08}
o(4,x) = mean{i(t,x), month(i(t)) = 09, 10, 11}
@EndifMan
@IfDoc
@BeginMath
\begin{array}{c}
o(\mbox{1},x) = \mbox{\bf mean}\{i(t,x), \mbox{month}(i(t)) = \mbox{12, 01, 02}\} \\
o(\mbox{2},x) = \mbox{\bf mean}\{i(t,x), \mbox{month}(i(t)) = \mbox{03, 04, 05}\} \\
o(\mbox{3},x) = \mbox{\bf mean}\{i(t,x), \mbox{month}(i(t)) = \mbox{06, 07, 08}\} \\
o(\mbox{4},x) = \mbox{\bf mean}\{i(t,x), \mbox{month}(i(t)) = \mbox{09, 10, 11}\} \\
\end{array}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_yseasavg
@Title     = Multi-year seasonal average

@BeginDescription
@IfMan
o(1,x) = avg{i(t,x), month(i(t)) = 12, 01, 02}
o(2,x) = avg{i(t,x), month(i(t)) = 03, 04, 05}
o(3,x) = avg{i(t,x), month(i(t)) = 06, 07, 08}
o(4,x) = avg{i(t,x), month(i(t)) = 09, 10, 11}
@EndifMan
@IfDoc
@BeginMath
\begin{array}{c}
o(\mbox{1},x) = \mbox{\bf avg}\{i(t,x), \mbox{month}(i(t)) = \mbox{12, 01, 02}\} \\
o(\mbox{2},x) = \mbox{\bf avg}\{i(t,x), \mbox{month}(i(t)) = \mbox{03, 04, 05}\} \\
o(\mbox{3},x) = \mbox{\bf avg}\{i(t,x), \mbox{month}(i(t)) = \mbox{06, 07, 08}\} \\
o(\mbox{4},x) = \mbox{\bf avg}\{i(t,x), \mbox{month}(i(t)) = \mbox{09, 10, 11}\} \\
\end{array}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginOperator_yseasstd
@Title     = Multi-year seasonal standard deviation

@BeginDescription
@IfMan
o(1,x) = std{i(t,x), month(i(t)) = 12, 01, 02}
o(2,x) = std{i(t,x), month(i(t)) = 03, 04, 05}
o(3,x) = std{i(t,x), month(i(t)) = 06, 07, 08}
o(4,x) = std{i(t,x), month(i(t)) = 09, 10, 11}
@EndifMan
@IfDoc
@BeginMath
\begin{array}{c}
o(\mbox{1},x) = \mbox{\bf std}\{i(t,x), \mbox{month}(i(t)) = \mbox{12, 01, 02}\} \\
o(\mbox{2},x) = \mbox{\bf std}\{i(t,x), \mbox{month}(i(t)) = \mbox{03, 04, 05}\} \\
o(\mbox{3},x) = \mbox{\bf std}\{i(t,x), \mbox{month}(i(t)) = \mbox{06, 07, 08}\} \\
o(\mbox{4},x) = \mbox{\bf std}\{i(t,x), \mbox{month}(i(t)) = \mbox{09, 10, 11}\} \\
\end{array}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginExample
To compute the seasonal mean over all input years, use:
@BeginVerbatim
   cdo yseasmean ifile ofile
@EndVerbatim
@EndExample
