Timselstat 6.36 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
@BeginModule
@NewPage
3
@Name      = Timselstat
Uwe Schulzweida's avatar
Uwe Schulzweida committed
4
5
6
@Title     = Time range statistical values
@Section   = Statistical values
@Class     = Statistic
Uwe Schulzweida's avatar
Uwe Schulzweida committed
7
@Arguments = infile outfile
Uwe Schulzweida's avatar
Uwe Schulzweida committed
8
@Operators = timselmin timselmax timselrange timselsum timselmean timselavg timselstd timselstd1 timselvar timselvar1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
9
10

@BeginDescription
Uwe Schulzweida's avatar
Uwe Schulzweida committed
11
This module computes statistical values for a selected number of timesteps. According to 
Uwe Schulzweida's avatar
Uwe Schulzweida committed
12
the chosen operator the minimum, maximum, range, sum, average, variance or standard deviation of 
Uwe Schulzweida's avatar
Uwe Schulzweida committed
13
14
the selected timesteps is written to @file{outfile}.
The time of @file{outfile} is determined by the time in the middle of all contributing timesteps of @file{infile}.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
15
16
17
18
@EndDescription
@EndModule


19
@BeginOperator_timselmin
Uwe Schulzweida's avatar
Uwe Schulzweida committed
20
@Title     = Time selection minimum
Uwe Schulzweida's avatar
Uwe Schulzweida committed
21
22
23
24
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
25
For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
26
27
28
29

o(t,x) = min{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
30
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
31
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
32
o(t,x) = \mbox{\textbf{min}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
33
34
35
36
37
38
@EndMath
@EndifDoc
@EndDescription
@EndOperator


39
@BeginOperator_timselmax
Uwe Schulzweida's avatar
Uwe Schulzweida committed
40
@Title     = Time selection maximum
Uwe Schulzweida's avatar
Uwe Schulzweida committed
41
42
43
44
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
45
For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
46
47
48
49

o(t,x) = max{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
50
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
51
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
52
o(t,x) = \mbox{\textbf{max}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
53
54
55
56
57
58
@EndMath
@EndifDoc
@EndDescription
@EndOperator


Uwe Schulzweida's avatar
Uwe Schulzweida committed
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@BeginOperator_timselrange
@Title     = Time selection range
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:

o(t,x) = range{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
@BeginMath
o(t,x) = \mbox{\textbf{range}}\{i(t',x), t_1 < t' \le t_n\}
@EndMath
@EndifDoc
@EndDescription
@EndOperator


79
@BeginOperator_timselsum
Uwe Schulzweida's avatar
Uwe Schulzweida committed
80
@Title     = Time selection sum
Uwe Schulzweida's avatar
Uwe Schulzweida committed
81
82
83
84
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
85
For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
86
87
88
89

o(t,x) = sum{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
91
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
92
o(t,x) = \mbox{\textbf{sum}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
93
94
95
96
97
98
@EndMath
@EndifDoc
@EndDescription
@EndOperator


99
@BeginOperator_timselmean
Uwe Schulzweida's avatar
Uwe Schulzweida committed
100
@Title     = Time selection mean
Uwe Schulzweida's avatar
Uwe Schulzweida committed
101
102
103
104
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
105
For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
106
107
108
109

o(t,x) = mean{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
110
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
111
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
112
o(t,x) = \mbox{\textbf{mean}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
113
114
115
116
117
118
@EndMath
@EndifDoc
@EndDescription
@EndOperator


119
@BeginOperator_timselavg
Uwe Schulzweida's avatar
Uwe Schulzweida committed
120
@Title     = Time selection average
Uwe Schulzweida's avatar
Uwe Schulzweida committed
121
122
123
124
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
125
For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
126
127
128
129

o(t,x) = avg{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
130
For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
131
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
132
o(t,x) = \mbox{\textbf{avg}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
133
134
135
136
137
138
@EndMath
@EndifDoc
@EndDescription
@EndOperator


139
@BeginOperator_timselvar
Uwe Schulzweida's avatar
Uwe Schulzweida committed
140
@Title     = Time selection variance
Uwe Schulzweida's avatar
Uwe Schulzweida committed
141
142
143
144
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
145
Normalize by n. For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
146
147
148
149

o(t,x) = var{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
150
Normalize by n. For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
151
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
152
o(t,x) = \mbox{\textbf{var}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
153
154
155
156
157
158
@EndMath
@EndifDoc
@EndDescription
@EndOperator


Uwe Schulzweida's avatar
Uwe Schulzweida committed
159
@BeginOperator_timselvar1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
160
@Title     = Time selection variance (n-1)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
161
162
163
164
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
165
Normalize by (n-1). For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
166
167
168
169

o(t,x) = var1{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
170
Normalize by (n-1). For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
171
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
172
o(t,x) = \mbox{\textbf{var1}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
173
174
175
176
177
178
@EndMath
@EndifDoc
@EndDescription
@EndOperator


179
@BeginOperator_timselstd
Uwe Schulzweida's avatar
Uwe Schulzweida committed
180
@Title     = Time selection standard deviation
Uwe Schulzweida's avatar
Uwe Schulzweida committed
181
182
183
184
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
185
Normalize by n. For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
186

Uwe Schulzweida's avatar
Uwe Schulzweida committed
187
o(t,x) = std{i(t',x), t1 < t' <= tn}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
188
189
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
190
Normalize by n. For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
191
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
192
o(t,x) = \mbox{\textbf{std}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
193
194
195
196
197
198
@EndMath
@EndifDoc
@EndDescription
@EndOperator


Uwe Schulzweida's avatar
Uwe Schulzweida committed
199
@BeginOperator_timselstd1
Uwe Schulzweida's avatar
Uwe Schulzweida committed
200
@Title     = Time selection standard deviation (n-1)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
201
202
203
204
@Parameter = nsets [noffset] [nskip]

@BeginDescription
@IfMan
Uwe Schulzweida's avatar
Uwe Schulzweida committed
205
Normalize by (n-1). For every adjacent sequence t1, ...., tn of timesteps of the same selected time range it is:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
206
207
208
209

o(t,x) = std1{i(t',x), t1 < t' <= tn}
@EndifMan
@IfDoc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
210
Normalize by (n-1). For every adjacent sequence \begin{math}t_1, ...,t_n\end{math} of timesteps of the same selected time range it is: \\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
211
@BeginMath
Uwe Schulzweida's avatar
Uwe Schulzweida committed
212
o(t,x) = \mbox{\textbf{std1}}\{i(t',x), t_1 < t' \le t_n\}
Uwe Schulzweida's avatar
Uwe Schulzweida committed
213
214
215
216
217
218
@EndMath
@EndifDoc
@EndDescription
@EndOperator


Uwe Schulzweida's avatar
Uwe Schulzweida committed
219
220
@BeginParameter noffset
@Item = nsets
Uwe Schulzweida's avatar
Uwe Schulzweida committed
221
INTEGER  Number of input timesteps for each output timestep 
Uwe Schulzweida's avatar
Uwe Schulzweida committed
222
@Item = noffset
Uwe Schulzweida's avatar
Uwe Schulzweida committed
223
INTEGER  Number of input timesteps skipped before the first timestep range (optional)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
224
@Item = nskip
Uwe Schulzweida's avatar
Uwe Schulzweida committed
225
INTEGER  Number of input timesteps skipped between timestep ranges (optional)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
226
227
228
229
@EndParameter


@BeginExample
Uwe Schulzweida's avatar
Uwe Schulzweida committed
230
Assume an input dataset has monthly means over several years.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
231
To compute seasonal means from monthly means the first two
Uwe Schulzweida's avatar
Uwe Schulzweida committed
232
month have to be skipped:
Uwe Schulzweida's avatar
Uwe Schulzweida committed
233
@BeginVerbatim
Uwe Schulzweida's avatar
Uwe Schulzweida committed
234
   cdo timselmean,3,2 infile outfile
Uwe Schulzweida's avatar
Uwe Schulzweida committed
235
236
@EndVerbatim
@EndExample