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
1fff771f
Commit
1fff771f
authored
Apr 15, 2017
by
Uwe Schulzweida
Browse files
Renamed func_mean to func_meanw.
parent
f55e137b
Changes
22
Hide whitespace changes
Inline
Side-by-side
src/Ensstat.c
View file @
1fff771f
...
...
@@ -53,7 +53,7 @@ void *Ensstat(void *argument)
cdoOperatorAdd
(
"ensmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ensmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"enssum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"ensmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"ensmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ensavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"ensstd"
,
func_std
,
0
,
NULL
);
cdoOperatorAdd
(
"ensstd1"
,
func_std1
,
0
,
NULL
);
...
...
src/Fldstat.c
View file @
1fff771f
...
...
@@ -98,7 +98,7 @@ void *Fldstat(void *argument)
cdoOperatorAdd
(
"fldmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"fldmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"fldsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"fldmean"
,
func_mean
,
1
,
NULL
);
cdoOperatorAdd
(
"fldmean"
,
func_mean
w
,
1
,
NULL
);
cdoOperatorAdd
(
"fldavg"
,
func_avg
,
1
,
NULL
);
cdoOperatorAdd
(
"fldstd"
,
func_std
,
1
,
NULL
);
cdoOperatorAdd
(
"fldstd1"
,
func_std1
,
1
,
NULL
);
...
...
src/Gridboxstat.c
View file @
1fff771f
...
...
@@ -557,7 +557,7 @@ void *Gridboxstat(void *argument)
cdoOperatorAdd
(
"gridboxmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"gridboxvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -567,7 +567,7 @@ void *Gridboxstat(void *argument)
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
bool
needWeights
=
(
operfunc
==
func_mean
||
operfunc
==
func_avg
||
bool
needWeights
=
(
operfunc
==
func_mean
w
||
operfunc
==
func_avg
||
operfunc
==
func_var
||
operfunc
==
func_std
||
operfunc
==
func_var1
||
operfunc
==
func_std1
);
...
...
src/Merstat.c
View file @
1fff771f
...
...
@@ -54,7 +54,7 @@ void *Merstat(void *argument)
cdoOperatorAdd
(
"mermin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"mermax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"mersum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"mermean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"mermean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"meravg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"mervar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"mervar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -73,7 +73,7 @@ void *Merstat(void *argument)
percentile_check_number
(
pn
);
}
if
(
operfunc
==
func_mean
||
operfunc
==
func_avg
||
if
(
operfunc
==
func_mean
w
||
operfunc
==
func_avg
||
operfunc
==
func_var
||
operfunc
==
func_std
||
operfunc
==
func_var1
||
operfunc
==
func_std1
)
needWeights
=
true
;
...
...
src/Runstat.c
View file @
1fff771f
...
...
@@ -55,7 +55,7 @@ void *Runstat(void *argument)
cdoOperatorAdd
(
"runmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"runmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"runsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"runmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"runmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"runavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"runvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"runvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -68,7 +68,7 @@ void *Runstat(void *argument)
operatorInputArg
(
"number of timesteps"
);
int
ndates
=
parameter2int
(
operatorArgv
()[
0
]);
int
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
int
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
int
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
int
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Seasstat.c
View file @
1fff771f
...
...
@@ -56,7 +56,7 @@ void *Seasstat(void *argument)
cdoOperatorAdd
(
"seasmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"seasmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"seassum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"seasmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"seasmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"seasavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"seasvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"seasvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -69,7 +69,7 @@ void *Seasstat(void *argument)
int
season_start
=
get_season_start
();
get_season_name
(
seas_name
);
int
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
int
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
int
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
int
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Timselstat.c
View file @
1fff771f
...
...
@@ -51,7 +51,7 @@ void *Timselstat(void *argument)
cdoOperatorAdd
(
"timselmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"timselmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"timselsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"timselmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"timselmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"timselavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"timselvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"timselvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -71,7 +71,7 @@ void *Timselstat(void *argument)
if
(
cdoVerbose
)
cdoPrint
(
"nsets = %d, noffset = %d, nskip = %d"
,
ndates
,
noffset
,
nskip
);
int
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
int
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
int
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
int
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Timstat.c
View file @
1fff771f
...
...
@@ -105,7 +105,7 @@ void *Timstat(void *argument)
cdoOperatorAdd
(
"timmin"
,
func_min
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmax"
,
func_max
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timsum"
,
func_sum
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmean"
,
func_mean
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmean"
,
func_mean
w
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timavg"
,
func_avg
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timvar"
,
func_var
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timvar1"
,
func_var1
,
DATE_LEN
,
NULL
);
...
...
@@ -115,7 +115,7 @@ void *Timstat(void *argument)
cdoOperatorAdd
(
"yearmin"
,
func_min
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearmax"
,
func_max
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearsum"
,
func_sum
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearmean"
,
func_mean
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearmean"
,
func_mean
w
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearavg"
,
func_avg
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearvar"
,
func_var
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearvar1"
,
func_var1
,
YEAR_LEN
,
NULL
);
...
...
@@ -125,7 +125,7 @@ void *Timstat(void *argument)
cdoOperatorAdd
(
"monmin"
,
func_min
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monmax"
,
func_max
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monsum"
,
func_sum
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monmean"
,
func_mean
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monmean"
,
func_mean
w
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monavg"
,
func_avg
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monvar"
,
func_var
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monvar1"
,
func_var1
,
MON_LEN
,
NULL
);
...
...
@@ -135,7 +135,7 @@ void *Timstat(void *argument)
cdoOperatorAdd
(
"daymin"
,
func_min
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"daymax"
,
func_max
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"daysum"
,
func_sum
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"daymean"
,
func_mean
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"daymean"
,
func_mean
w
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"dayavg"
,
func_avg
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"dayvar"
,
func_var
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"dayvar1"
,
func_var1
,
DAY_LEN
,
NULL
);
...
...
@@ -145,7 +145,7 @@ void *Timstat(void *argument)
cdoOperatorAdd
(
"hourmin"
,
func_min
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourmax"
,
func_max
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hoursum"
,
func_sum
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourmean"
,
func_mean
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourmean"
,
func_mean
w
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"houravg"
,
func_avg
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourvar"
,
func_var
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourvar1"
,
func_var1
,
HOUR_LEN
,
NULL
);
...
...
@@ -157,12 +157,12 @@ void *Timstat(void *argument)
int
comparelen
=
cdoOperatorF2
(
operatorID
);
bool
lrange
=
operfunc
==
func_range
;
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
if
(
operfunc
==
func_mean
)
if
(
operfunc
==
func_mean
w
)
{
int
oargc
=
operatorArgc
();
char
**
oargv
=
operatorArgv
();
...
...
@@ -437,7 +437,7 @@ void *Timstat(void *argument)
cdoPrint
(
"%s %s vfrac = %g, nsets = %d"
,
vdatestr
,
vtimestr
,
vfrac
,
nsets
);
}
if
(
lvfrac
&&
operfunc
==
func_mean
)
if
(
lvfrac
&&
operfunc
==
func_mean
w
)
for
(
int
recID
=
0
;
recID
<
maxrecs
;
recID
++
)
{
int
varID
=
recinfo
[
recID
].
varID
;
...
...
src/Vertstat.c
View file @
1fff771f
...
...
@@ -173,7 +173,7 @@ void *Vertstat(void *argument)
cdoOperatorAdd
(
"vertmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"vertsum"
,
func_sum
,
0
,
NULL
);
int
VERTINT
=
cdoOperatorAdd
(
"vertint"
,
func_sum
,
1
,
NULL
);
cdoOperatorAdd
(
"vertmean"
,
func_mean
,
1
,
NULL
);
cdoOperatorAdd
(
"vertmean"
,
func_mean
w
,
1
,
NULL
);
cdoOperatorAdd
(
"vertavg"
,
func_avg
,
1
,
NULL
);
cdoOperatorAdd
(
"vertvar"
,
func_var
,
1
,
NULL
);
cdoOperatorAdd
(
"vertvar1"
,
func_var1
,
1
,
NULL
);
...
...
@@ -184,7 +184,7 @@ void *Vertstat(void *argument)
int
operfunc
=
cdoOperatorF1
(
operatorID
);
bool
needWeights
=
cdoOperatorF2
(
operatorID
);
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/XTimstat.c
View file @
1fff771f
...
...
@@ -176,7 +176,7 @@ void *XTimstat(void *argument)
cdoOperatorAdd
(
"xtimmin"
,
func_min
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimmax"
,
func_max
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimsum"
,
func_sum
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimmean"
,
func_mean
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimmean"
,
func_mean
w
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimavg"
,
func_avg
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimvar"
,
func_var
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimvar1"
,
func_var1
,
DATE_LEN
,
NULL
);
...
...
@@ -185,7 +185,7 @@ void *XTimstat(void *argument)
cdoOperatorAdd
(
"xyearmin"
,
func_min
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearmax"
,
func_max
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearsum"
,
func_sum
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearmean"
,
func_mean
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearmean"
,
func_mean
w
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearavg"
,
func_avg
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearvar"
,
func_var
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearvar1"
,
func_var1
,
YEAR_LEN
,
NULL
);
...
...
@@ -194,7 +194,7 @@ void *XTimstat(void *argument)
cdoOperatorAdd
(
"xmonmin"
,
func_min
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonmax"
,
func_max
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonsum"
,
func_sum
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonmean"
,
func_mean
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonmean"
,
func_mean
w
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonavg"
,
func_avg
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonvar"
,
func_var
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonvar1"
,
func_var1
,
MON_LEN
,
NULL
);
...
...
@@ -205,12 +205,12 @@ void *XTimstat(void *argument)
int
operfunc
=
cdoOperatorF1
(
operatorID
);
int
comparelen
=
cdoOperatorF2
(
operatorID
);
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
if
(
operfunc
==
func_mean
)
if
(
operfunc
==
func_mean
w
)
{
int
oargc
=
operatorArgc
();
char
**
oargv
=
operatorArgv
();
...
...
@@ -511,7 +511,7 @@ void *XTimstat(void *argument)
cdoPrint
(
"%s %s vfrac = %g, nsets = %d"
,
vdatestr
,
vtimestr
,
vfrac
,
nsets
);
}
if
(
lvfrac
&&
operfunc
==
func_mean
)
if
(
lvfrac
&&
operfunc
==
func_mean
w
)
for
(
int
recID
=
0
;
recID
<
maxrecs
;
recID
++
)
{
int
varID
=
recinfo
[
recID
].
varID
;
...
...
src/Ydaystat.c
View file @
1fff771f
...
...
@@ -54,7 +54,7 @@ void *Ydaystat(void *argument)
cdoOperatorAdd
(
"ydaymin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaymax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaysum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaymean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaymean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ydayavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"ydayvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"ydayvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -64,7 +64,7 @@ void *Ydaystat(void *argument)
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Ydrunstat.c
View file @
1fff771f
...
...
@@ -73,7 +73,7 @@ void *Ydrunstat(void *argument)
cdoOperatorAdd
(
"ydrunmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -436,7 +436,7 @@ void ydstatFinalize(YDAY_STATS *stats, int operfunc)
switch
(
operfunc
)
{
case
func_avg
:
case
func_mean
:
case
func_mean
w
:
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
if
(
vlistInqVarTsteptype
(
stats
->
vlist
,
varID
)
==
TSTEP_CONSTANT
)
continue
;
...
...
src/Yearmonstat.c
View file @
1fff771f
...
...
@@ -49,7 +49,7 @@ void *Yearmonstat(void *argument)
cdoInitialize
(
argument
);
cdoOperatorAdd
(
"yearmonmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"yearmonmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"yearmonavg"
,
func_avg
,
0
,
NULL
);
int
operatorID
=
cdoOperatorID
();
...
...
src/Yhourstat.c
View file @
1fff771f
...
...
@@ -82,7 +82,7 @@ void *Yhourstat(void *argument)
cdoOperatorAdd
(
"yhourmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"yhoursum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"yhouravg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -92,7 +92,7 @@ void *Yhourstat(void *argument)
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Ymonstat.c
View file @
1fff771f
...
...
@@ -75,7 +75,7 @@ void *Ymonstat(void *argument)
cdoOperatorAdd
(
"ymonmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -85,7 +85,7 @@ void *Ymonstat(void *argument)
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Yseasstat.c
View file @
1fff771f
...
...
@@ -77,7 +77,7 @@ void *Yseasstat(void *argument)
cdoOperatorAdd
(
"yseasmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"yseassum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasvar1"
,
func_var1
,
0
,
NULL
);
...
...
@@ -97,7 +97,7 @@ void *Yseasstat(void *argument)
datetime
[
seas
].
vtime
=
0
;
}
bool
lmean
=
operfunc
==
func_mean
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
w
||
operfunc
==
func_avg
;
bool
lstd
=
operfunc
==
func_std
||
operfunc
==
func_std1
;
bool
lvarstd
=
operfunc
==
func_std
||
operfunc
==
func_var
||
operfunc
==
func_std1
||
operfunc
==
func_var1
;
int
divisor
=
operfunc
==
func_std1
||
operfunc
==
func_var1
;
...
...
src/Zonstat.c
View file @
1fff771f
...
...
@@ -54,7 +54,7 @@ void *Zonstat(void *argument)
cdoOperatorAdd
(
"zonmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"zonrange"
,
func_range
,
0
,
NULL
);
cdoOperatorAdd
(
"zonsum"
,
func_sum
,
0
,
NULL
);
cdoOperatorAdd
(
"zonmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"zonmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"zonavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"zonvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"zonvar1"
,
func_var1
,
0
,
NULL
);
...
...
src/field.c
View file @
1fff771f
...
...
@@ -33,7 +33,7 @@ double fldfun(field_type field, int function)
case
func_min
:
rval
=
fldmin
(
field
);
break
;
case
func_max
:
rval
=
fldmax
(
field
);
break
;
case
func_sum
:
rval
=
fldsum
(
field
);
break
;
case
func_mean
:
rval
=
fldmean
(
field
);
break
;
case
func_mean
w
:
rval
=
fldmean
(
field
);
break
;
case
func_avg
:
rval
=
fldavg
(
field
);
break
;
case
func_std
:
rval
=
fldstd
(
field
);
break
;
case
func_std1
:
rval
=
fldstd1
(
field
);
break
;
...
...
src/field2.c
View file @
1fff771f
...
...
@@ -28,7 +28,7 @@ void farfun(field_type *field1, field_type field2, int function)
case
func_min
:
farmin
(
field1
,
field2
);
break
;
case
func_max
:
farmax
(
field1
,
field2
);
break
;
case
func_sum
:
farsum
(
field1
,
field2
);
break
;
case
func_mean
:
farsum
(
field1
,
field2
);
break
;
case
func_mean
w
:
farsum
(
field1
,
field2
);
break
;
case
func_avg
:
faradd
(
field1
,
field2
);
break
;
case
func_sub
:
farsub
(
field1
,
field2
);
break
;
case
func_mul
:
farmul
(
field1
,
field2
);
break
;
...
...
src/fieldmer.c
View file @
1fff771f
...
...
@@ -26,7 +26,7 @@ void merfun(field_type field1, field_type *field2, int function)
if
(
function
==
func_min
)
mermin
(
field1
,
field2
);
else
if
(
function
==
func_max
)
mermax
(
field1
,
field2
);
else
if
(
function
==
func_sum
)
mersum
(
field1
,
field2
);
else
if
(
function
==
func_mean
)
mermean
(
field1
,
field2
);
else
if
(
function
==
func_mean
w
)
mermean
(
field1
,
field2
);
else
if
(
function
==
func_avg
)
meravg
(
field1
,
field2
);
else
if
(
function
==
func_std
)
merstd
(
field1
,
field2
);
else
if
(
function
==
func_std1
)
merstd1
(
field1
,
field2
);
...
...
Prev
1
2
Next
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