@BeginModule
@NewPage
@Name      = Ensstat2
@Title     = Statistical values over an ensemble
@Section   = Statistical values
@Class     = Statistic
@Arguments = obsfile ensfiles ofile
@Operators = ensrkhistspace ensrkhisttime ensroc

@BeginDescription
This module computes statistical values over the ensemble of @file{ensfiles} using
@file{obsfile} as a reference. Depending on the operator a ranked Histogram or 
a roc-curve over all Ensembles @file{ensfiles}
with reference to @file{obsfile} is written to @file{ofile}. 
The date and grid information of a timestep in @file{ofile} is the date of the 
first input file. Thus all input files are required to have the same structure in 
terms of the gridsize, variable definitions and number of timesteps. 

All Operators in this module use @file{obsfile} as the reference (for instance 
an observation) whereas @file{ensfiles} are understood as an ensemble consisting 
of n (where n is the number of @file{ensfiles}) members. 

The operators ensrkhistspace and ensrkhisttime compute Ranked Histograms. 
Therefor the vertical axis is utilized as the Histogram axis, which prohibits
the use of files containing more than one level. The histogram axis has 
nensfiles+1 bins with level 0 containing for each grid point the number of 
observations being smaller as all ensembles and level nensfiles+1 indicating
the number of observations being larger than all ensembles. 

ensrkhistspace computes a ranked histogram at each timestep reducing each 
horizontal grid to a 1x1 grid and keeping the time axis as in @file{obsfile}. 
Contrary ensrkhistspace  computes a histogram at each grid point keeping the 
horizontal grid for each variable and reducing the time-axis. The time infor-
mation is that from the last timestep in @file{obsfile}. 
@EndDescription
@EndModule


@BeginOperator_ensrkhistspace
@Title      = Ranked Histogram averaged over time
@EndOperator

@BeginOperator_ensrkhisttime
@Title      = Ranked Histogram averaged over space 
@EndOperator

@BeginOperator_ensroc
@Title      = Ensemble Receiver Operating characteristics
@EndOperator

@BeginExample
To compute a rank histogram over 5 input files @file{ensfile1}-@file{ensfile5}
given an observation in @file{obsfile} use:
@BeginVerbatim
   cdo ensrkhisttime obsfile ensfile1 ensfile2 ensfile3 ensfile4 ensfile5 ofile
@EndVerbatim
Or shorter with filename substitution:
@BeginVerbatim
   cdo ensrkhisttime obsfile ensfile[1-5] ofile
@EndVerbatim
@EndExample
