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
a918b7d9
Commit
a918b7d9
authored
Apr 16, 2017
by
Uwe Schulzweida
Browse files
Rename func_meanw to func_mean.
parent
484e5e75
Changes
16
Hide whitespace changes
Inline
Side-by-side
src/Gridboxstat.c
View file @
a918b7d9
...
...
@@ -447,13 +447,12 @@ int genBoxGrid(int gridID1, int xinc, int yinc)
static
void
gridboxstat
(
field_type
*
field1
,
field_type
*
field2
,
int
xinc
,
int
yinc
,
int
statfunc
)
{
bool
useWeight
=
false
;
bool
useWeight
=
(
field1
->
weight
!=
NULL
)
;
/*
double findex = 0;
progressInit();
*/
if
(
field1
->
weight
)
useWeight
=
true
;
int
gridsize
=
xinc
*
yinc
;
field_type
*
field
=
(
field_type
*
)
Malloc
(
ompNumThreads
*
sizeof
(
field_type
));
...
...
@@ -461,17 +460,15 @@ void gridboxstat(field_type *field1, field_type *field2, int xinc, int yinc, int
{
field
[
i
].
size
=
gridsize
;
field
[
i
].
ptr
=
(
double
*
)
Malloc
(
gridsize
*
sizeof
(
double
));
field
[
i
].
weight
=
NULL
;
if
(
useWeight
)
field
[
i
].
weight
=
(
double
*
)
Malloc
(
gridsize
*
sizeof
(
double
));
field
[
i
].
weight
=
(
useWeight
)
?
(
double
*
)
Malloc
(
gridsize
*
sizeof
(
double
))
:
NULL
;
field
[
i
].
missval
=
field1
->
missval
;
field
[
i
].
nmiss
=
0
;
}
int
gridID1
=
field1
->
grid
;
int
gridID2
=
field2
->
grid
;
double
*
array1
=
field1
->
ptr
;
double
*
array2
=
field2
->
ptr
;
double
*
array1
=
field1
->
ptr
;
double
*
array2
=
field2
->
ptr
;
double
missval
=
field1
->
missval
;
int
nlon1
=
gridInqXsize
(
gridID1
);
...
...
@@ -601,9 +598,7 @@ void *Gridboxstat(void *argument)
int
gridsize1
=
gridInqSize
(
gridID1
);
field1
.
ptr
=
(
double
*
)
Malloc
(
gridsize1
*
sizeof
(
double
));
field1
.
weight
=
NULL
;
if
(
needWeights
)
field1
.
weight
=
(
double
*
)
Malloc
(
gridsize1
*
sizeof
(
double
));
field1
.
weight
=
needWeights
?
(
double
*
)
Malloc
(
gridsize1
*
sizeof
(
double
))
:
NULL
;
int
gridsize2
=
gridInqSize
(
gridID2
);
field2
.
ptr
=
(
double
*
)
Malloc
(
gridsize2
*
sizeof
(
double
));
...
...
src/Runstat.c
View file @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"runmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
int
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"seasmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
int
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"timselmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
int
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmean"
,
func_mean
,
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
w
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"yearmean"
,
func_mean
,
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
w
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"monmean"
,
func_mean
,
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
w
,
DAY_LEN
,
NULL
);
cdoOperatorAdd
(
"daymean"
,
func_mean
,
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
w
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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
w
)
if
(
operfunc
==
func_mean
)
{
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
w
)
if
(
lvfrac
&&
operfunc
==
func_mean
)
for
(
int
recID
=
0
;
recID
<
maxrecs
;
recID
++
)
{
int
varID
=
recinfo
[
recID
].
varID
;
...
...
src/Vertstat.c
View file @
a918b7d9
...
...
@@ -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
w
,
1
,
NULL
);
cdoOperatorAdd
(
"vertmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimmean"
,
func_mean
,
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
w
,
YEAR_LEN
,
NULL
);
cdoOperatorAdd
(
"xyearmean"
,
func_mean
,
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
w
,
MON_LEN
,
NULL
);
cdoOperatorAdd
(
"xmonmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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
w
)
if
(
operfunc
==
func_mean
)
{
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
w
)
if
(
lvfrac
&&
operfunc
==
func_mean
)
for
(
int
recID
=
0
;
recID
<
maxrecs
;
recID
++
)
{
int
varID
=
recinfo
[
recID
].
varID
;
...
...
src/Ydaystat.c
View file @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaymean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunmean"
,
func_mean
,
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
w
:
case
func_mean
:
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
{
if
(
vlistInqVarTsteptype
(
stats
->
vlist
,
varID
)
==
TSTEP_CONSTANT
)
continue
;
...
...
src/Yearmonstat.c
View file @
a918b7d9
...
...
@@ -49,7 +49,7 @@ void *Yearmonstat(void *argument)
cdoInitialize
(
argument
);
cdoOperatorAdd
(
"yearmonmean"
,
func_mean
w
,
0
,
NULL
);
cdoOperatorAdd
(
"yearmonmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"yearmonavg"
,
func_avg
,
0
,
NULL
);
int
operatorID
=
cdoOperatorID
();
...
...
src/Yhourstat.c
View file @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"yseasmean"
,
func_mean
,
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
w
||
operfunc
==
func_avg
;
bool
lmean
=
operfunc
==
func_mean
||
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 @
a918b7d9
...
...
@@ -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
w
,
0
,
NULL
);
cdoOperatorAdd
(
"zonmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"zonavg"
,
func_avg
,
0
,
NULL
);
cdoOperatorAdd
(
"zonvar"
,
func_var
,
0
,
NULL
);
cdoOperatorAdd
(
"zonvar1"
,
func_var1
,
0
,
NULL
);
...
...
src/field2.c
View file @
a918b7d9
...
...
@@ -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
w
:
farsum
(
field1
,
field2
);
break
;
case
func_mean
:
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/fieldzon.c
View file @
a918b7d9
...
...
@@ -27,7 +27,7 @@ void zonfun(field_type field1, field_type *field2, int function)
else
if
(
function
==
func_max
)
zonmax
(
field1
,
field2
);
else
if
(
function
==
func_range
)
zonrange
(
field1
,
field2
);
else
if
(
function
==
func_sum
)
zonsum
(
field1
,
field2
);
else
if
(
function
==
func_mean
w
)
zonmean
(
field1
,
field2
);
else
if
(
function
==
func_mean
)
zonmean
(
field1
,
field2
);
else
if
(
function
==
func_avg
)
zonavg
(
field1
,
field2
);
else
if
(
function
==
func_std
)
zonstd
(
field1
,
field2
);
else
if
(
function
==
func_std1
)
zonstd1
(
field1
,
field2
);
...
...
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