Monpctl 1.85 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
5
@BeginModule
@Name      = Monpctl
@Title     = Monthly percentile values
@Section   = Statistical values
@Class     = Statistic
Uwe Schulzweida's avatar
Uwe Schulzweida committed
6
@Arguments = infile1 infile2 infile3 outfile
Uwe Schulzweida's avatar
Uwe Schulzweida committed
7
8
9
@Operators = monpctl

@BeginDescription
Uwe Schulzweida's avatar
Uwe Schulzweida committed
10
11
12
This operator computes percentiles over all timesteps of the same month in @file{infile1}.
The algorithm uses histograms with minimum and maximum bounds given in @file{infile2} and
@file{infile3}, respectively. The default number of histogram bins is 101.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
13
The default can be overridden by defining the environment variable @env{CDO_PCTL_NBINS}.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
14
The files @file{infile2} and @file{infile3} should be the result of corresponding @mod{monmin}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
15
and @mod{monmax} operations, respectively.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
16
The time of @file{outfile} is determined by the time in the middle of all contributing timesteps of @file{infile1}.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
17
18
19
20
21
22
23
24
25
26
@EndDescription
@EndModule


@BeginOperator_monpctl
@Title     = Monthly percentiles
@Parameter = p

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
For every adjacent sequence t_1, ...,t_n of timesteps of the same month it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
29
30
31

o(t,x) = pth percentile {i(t',x), t_1<t'<=t_n}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
32
\vspace*{1mm}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
33
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same month it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
34
35
\vspace*{1mm}

Uwe Schulzweida's avatar
Uwe Schulzweida committed
36
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
37
o(t,x) = \mbox{\textbf{pth percentile}} \{i(t',x), t_1 < t' \leq t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
38
39
40
41
42
43
44
45
@EndMath
@EndifDoc
@EndDescription
@EndOperator


@BeginParameter
@Item = p
46
FLOAT  Percentile number in {0, ..., 100}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
47
48
49
@EndParameter


Uwe Schulzweida's avatar
Uwe Schulzweida committed
50
51
@BeginEnvironment
@Item = CDO_PCTL_NBINS
52
Sets the number of histogram bins. The default number is 101.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
53
54
55
@EndEnvironment


Uwe Schulzweida's avatar
Uwe Schulzweida committed
56
@BeginExample
Uwe Schulzweida's avatar
Uwe Schulzweida committed
57
To compute the monthly 90th percentile of a time series use:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
58
@BeginVerbatim
Uwe Schulzweida's avatar
Uwe Schulzweida committed
59
60
61
   cdo monmin infile minfile
   cdo monmax infile maxfile
   cdo monpctl,90 infile minfile maxfile outfile
Uwe Schulzweida's avatar
Uwe Schulzweida committed
62
63
64
@EndVerbatim
Or shorter using operator piping:
@BeginVerbatim
Uwe Schulzweida's avatar
Uwe Schulzweida committed
65
   cdo monpctl,90 infile -monmin infile -monmax infile outfile
Uwe Schulzweida's avatar
Uwe Schulzweida committed
66
67
@EndVerbatim
@EndExample