Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
636349dd
Commit
636349dd
authored
Jan 23, 2013
by
Uwe Schulzweida
Browse files
added operator fldstd1 and fldvar1
parent
5294f739
Changes
6
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
636349dd
...
...
@@ -7,6 +7,8 @@
* New operator: ensstd1 - Ensemble standard deviation [Divisor is (n-1)]
* New operator: ensvar1 - Ensemble variance [Divisor is (n-1)]
* New operator: fldstd1 - Field standard deviation [Divisor is (n-1)]
* New operator: fldvar1 - Field variance [Divisor is (n-1)]
2013-01-22 Helmut Haak <Helmut.Haak@zmaw.de>
...
...
OPERATORS
View file @
636349dd
...
...
@@ -231,8 +231,10 @@ Operator catalog:
Fldstat fldsum Field sum
Fldstat fldmean Field mean
Fldstat fldavg Field average
Fldstat fldvar Field variance
Fldstat fldstd Field standard deviation
Fldstat fldstd1 Field standard deviation
Fldstat fldvar Field variance
Fldstat fldvar1 Field variance
Fldstat fldpctl Field percentiles
Zonstat zonmin Zonal minimum
Zonstat zonmax Zonal maximum
...
...
doc/tex/mod/Fldstat
View file @
636349dd
...
...
@@ -5,13 +5,12 @@
@Section = Statistical values
@Class = Statistic
@Arguments = ifile ofile
@Operators = fldmin fldmax fldsum fldmean fldavg fld
var
fldstd fldpctl
@Operators = fldmin fldmax fldsum fldmean fldavg fld
std
fldstd
1 fldvar fldvar1
fldpctl
@BeginDescription
This module computes statistical values of the input fields.
According to the chosen operator the field minimum, maximum,
sum, average, variance, standard deviation or a certain percentile
is written to @file{ofile}.
This module computes statistical values of the input fields. According to the chosen
operator the field minimum, maximum, sum, average, variance, standard deviation or
a certain percentile is written to @file{ofile}.
@EndDescription
@EndModule
...
...
@@ -118,12 +117,12 @@ weighted by area weights obtained by the input field.
@BeginDescription
@IfMan
For every gridpoint x_1, ..., x_n of the same field it is:
Divisor is n.
For every gridpoint x_1, ..., x_n of the same field it is:
o(t,1) = var{i(t,x'), x_1<x'<=x_n}
@EndifMan
@IfDoc
For every gridpoint \begin{math}x_1, ..., x_n\end{math} of the same field it is: \\
Divisor is n.
For every gridpoint \begin{math}x_1, ..., x_n\end{math} of the same field it is: \\
@BeginMath
o(t,1) = \mbox{\bf var}\{i(t,x'), x_1 < x' \leq x_n\}
@EndMath
...
...
@@ -133,17 +132,37 @@ weighted by area weights obtained by the input field.
@EndOperator
@BeginOperator_fldvar1
@Title = Field variance
@BeginDescription
@IfMan
Divisor is (n-1). For every gridpoint x_1, ..., x_n of the same field it is:
o(t,1) = var1{i(t,x'), x_1<x'<=x_n}
@EndifMan
@IfDoc
Divisor is (n-1). For every gridpoint \begin{math}x_1, ..., x_n\end{math} of the same field it is: \\
@BeginMath
o(t,1) = \mbox{\bf var1}\{i(t,x'), x_1 < x' \leq x_n\}
@EndMath
@EndifDoc
weighted by area weights obtained by the input field.
@EndDescription
@EndOperator
@BeginOperator_fldstd
@Title = Field standard deviation
@BeginDescription
@IfMan
For every gridpoint x_1, ..., x_n of the same field it is:
Divisor is n.
For every gridpoint x_1, ..., x_n of the same field it is:
o(t,1) = std{i(t,x'), x_1<x'<=x_n}
@EndifMan
@IfDoc
For every gridpoint \begin{math}x_1, ..., x_n\end{math} of the same field it is: \\
Divisor is n.
For every gridpoint \begin{math}x_1, ..., x_n\end{math} of the same field it is: \\
@BeginMath
o(t,1) = \mbox{\bf std}\{i(t,x'), x_1 < x' \leq x_n\}
@EndMath
...
...
@@ -153,6 +172,26 @@ weighted by area weights obtained by the input field.
@EndOperator
@BeginOperator_fldstd1
@Title = Field standard deviation
@BeginDescription
@IfMan
Divisor is (n-1). For every gridpoint x_1, ..., x_n of the same field it is:
o(t,1) = std1{i(t,x'), x_1<x'<=x_n}
@EndifMan
@IfDoc
Divisor is (n-1). For every gridpoint \begin{math}x_1, ..., x_n\end{math} of the same field it is: \\
@BeginMath
o(t,1) = \mbox{\bf std1}\{i(t,x'), x_1 < x' \leq x_n\}
@EndMath
@EndifDoc
weighted by area weights obtained by the input field.
@EndDescription
@EndOperator
@BeginOperator_fldpctl
@Title = Field percentiles
@Parameter = p
...
...
src/Fldstat.c
View file @
636349dd
...
...
@@ -24,7 +24,9 @@
Fldstat fldmean Field mean
Fldstat fldavg Field average
Fldstat fldstd Field standard deviation
Fldstat fldstd1 Field standard deviation
Fldstat fldvar Field variance
Fldstat fldvar1 Field variance
Fldstat fldpctl Field percentiles
*/
...
...
@@ -101,9 +103,7 @@ void *Fldstat(void *argument)
double
sglval
;
field_t
field
;
int
taxisID1
,
taxisID2
;
/* RQ */
int
pn
=
0
;
/* QR */
cdoInitialize
(
argument
);
...
...
@@ -112,16 +112,15 @@ void *Fldstat(void *argument)
cdoOperatorAdd
(
"fldsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"fldmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"fldavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"fldvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"fldstd"
,
func_std
,
0
,
NULL
);
/* RQ */
cdoOperatorAdd
(
"fldstd1"
,
func_std1
,
0
,
NULL
);
cdoOperatorAdd
(
"fldvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"fldvar1"
,
func_var1
,
0
,
NULL
);
cdoOperatorAdd
(
"fldpctl"
,
func_pctl
,
0
,
NULL
);
/* QR */
operatorID
=
cdoOperatorID
();
operfunc
=
cdoOperatorF1
(
operatorID
);
/* RQ */
if
(
operfunc
==
func_pctl
)
{
operatorInputArg
(
"percentile number"
);
...
...
@@ -130,7 +129,6 @@ void *Fldstat(void *argument)
if
(
pn
<
1
||
pn
>
99
)
cdoAbort
(
"Illegal argument: percentile number %d is not in the range 1..99!"
,
pn
);
}
/* QR */
if
(
operfunc
==
func_mean
||
operfunc
==
func_avg
||
operfunc
==
func_var
||
operfunc
==
func_std
)
...
...
src/modules.c
View file @
636349dd
...
...
@@ -313,7 +313,7 @@ void *Maggraph(void *argument);
#define FillmissOperators {"fillmiss"}
#define FilterOperators {"bandpass", "highpass", "lowpass"}
#define FldrmsOperators {"fldrms"}
#define FldstatOperators {"fldmin", "fldmax", "fldsum", "fldmean", "fldavg", "fld
var
", "fldstd", "fldpctl"}
#define FldstatOperators {"fldmin", "fldmax", "fldsum", "fldmean", "fldavg", "fld
std
", "fldstd
1", "fldvar", "fldvar1
", "fldpctl"}
#define FldcorOperators {"fldcor"}
#define FldcovarOperators {"fldcovar"}
#define FourierOperators {"fourier"}
...
...
src/operator_help.h
View file @
636349dd
...
...
@@ -1611,8 +1611,8 @@ static char *EnsvalHelp[] = {
static
char
*
FldstatHelp
[]
=
{
"NAME"
,
" fldmin, fldmax, fldsum, fldmean, fldavg, fld
var
, fldstd, fld
pctl -
"
,
" Statistical values over a field"
,
" fldmin, fldmax, fldsum, fldmean, fldavg, fld
std
, fldstd
1
, fld
var, fldvar1,
"
,
"
fldpctl -
Statistical values over a field"
,
""
,
"SYNOPSIS"
,
" fldmin ifile ofile"
,
...
...
@@ -1620,15 +1620,16 @@ static char *FldstatHelp[] = {
" fldsum ifile ofile"
,
" fldmean ifile ofile"
,
" fldavg ifile ofile"
,
" fldvar ifile ofile"
,
" fldstd ifile ofile"
,
" fldstd1 ifile ofile"
,
" fldvar ifile ofile"
,
" fldvar1 ifile ofile"
,
" fldpctl,p ifile ofile"
,
""
,
"DESCRIPTION"
,
" This module computes statistical values of the input fields."
,
" According to the chosen operator the field minimum, maximum,"
,
" sum, average, variance, standard deviation or a certain percentile"
,
" is written to ofile."
,
" This module computes statistical values of the input fields. According to the chosen "
,
" operator the field minimum, maximum, sum, average, variance, standard deviation or "
,
" a certain percentile is written to ofile."
,
""
,
"OPERATORS"
,
" fldmin Field minimum"
,
...
...
@@ -1653,15 +1654,25 @@ static char *FldstatHelp[] = {
" "
,
" o(t,1) = avg{i(t,x'), x_1<x'<=x_n}"
,
" weighted by area weights obtained by the input field."
,
" fldstd Field standard deviation"
,
" Divisor is n. For every gridpoint x_1, ..., x_n of the same field it is:"
,
" "
,
" o(t,1) = std{i(t,x'), x_1<x'<=x_n}"
,
" weighted by area weights obtained by the input field."
,
" fldstd1 Field standard deviation"
,
" Divisor is (n-1). For every gridpoint x_1, ..., x_n of the same field it is:"
,
" "
,
" o(t,1) = std1{i(t,x'), x_1<x'<=x_n}"
,
" weighted by area weights obtained by the input field."
,
" fldvar Field variance"
,
" For every gridpoint x_1, ..., x_n of the same field it is:"
,
"
Divisor is n.
For every gridpoint x_1, ..., x_n of the same field it is:"
,
" "
,
" o(t,1) = var{i(t,x'), x_1<x'<=x_n}"
,
" weighted by area weights obtained by the input field."
,
" fld
std
Field
standard deviation
"
,
" For every gridpoint x_1, ..., x_n of the same field it is:"
,
" fld
var1
Field
variance
"
,
"
Divisor is (n-1).
For every gridpoint x_1, ..., x_n of the same field it is:"
,
" "
,
" o(t,1) =
std
{i(t,x'), x_1<x'<=x_n}"
,
" o(t,1) =
var1
{i(t,x'), x_1<x'<=x_n}"
,
" weighted by area weights obtained by the input field."
,
" fldpctl Field percentiles"
,
" For every gridpoint x_1, ..., x_n of the same field it is:"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment