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
21065eea
Commit
21065eea
authored
Jun 14, 2017
by
Oliver Heidmann
Browse files
Merge branch 'develop' of git.mpimet.mpg.de:cdo into develop
parents
ff3ca441
7a2c0dab
Changes
42
Hide whitespace changes
Inline
Side-by-side
src/Tests.cc
View file @
21065eea
...
...
@@ -32,11 +32,13 @@ void *Tests(void *argument)
cdoInitialize
(
argument
);
// clang-format off
int
NORMAL
=
cdoOperatorAdd
(
"normal"
,
0
,
0
,
NULL
);
int
STUDENTT
=
cdoOperatorAdd
(
"studentt"
,
0
,
0
,
"degree of freedom"
);
int
CHISQUARE
=
cdoOperatorAdd
(
"chisquare"
,
0
,
0
,
"degree of freedom"
);
int
BETA
=
cdoOperatorAdd
(
"beta"
,
0
,
0
,
"p and q"
);
int
FISHER
=
cdoOperatorAdd
(
"fisher"
,
0
,
0
,
"degree of freedom of nominator and of denominator"
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/Timcount.cc
View file @
21065eea
...
...
@@ -43,11 +43,13 @@ void *Timcount(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"timcount"
,
0
,
31
,
NULL
);
cdoOperatorAdd
(
"yearcount"
,
0
,
10
,
NULL
);
cdoOperatorAdd
(
"moncount"
,
0
,
8
,
NULL
);
cdoOperatorAdd
(
"daycount"
,
0
,
6
,
NULL
);
cdoOperatorAdd
(
"hourcount"
,
0
,
4
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/Timpctl.cc
View file @
21065eea
...
...
@@ -215,11 +215,13 @@ void *Timpctl(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"timpctl"
,
func_pctl
,
31
,
NULL
);
cdoOperatorAdd
(
"yearpctl"
,
func_pctl
,
10
,
NULL
);
cdoOperatorAdd
(
"monpctl"
,
func_pctl
,
8
,
NULL
);
cdoOperatorAdd
(
"daypctl"
,
func_pctl
,
6
,
NULL
);
cdoOperatorAdd
(
"hourpctl"
,
func_pctl
,
4
,
NULL
);
// clang-format on
operatorID
=
cdoOperatorID
();
...
...
src/Timselstat.cc
View file @
21065eea
...
...
@@ -54,6 +54,7 @@ void *Timselstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"timselrange"
,
func_range
,
0
,
NULL
);
cdoOperatorAdd
(
"timselmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"timselmax"
,
func_max
,
0
,
NULL
);
...
...
@@ -68,21 +69,22 @@ void *Timselstat(void *argument)
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
bool
lrange
=
operfunc
==
func_range
;
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
;
operatorInputArg
(
"nsets <noffset <nskip>>"
);
int
nargc
=
operatorArgc
();
int
ndates
=
parameter2int
(
operatorArgv
()[
0
]);
int
noffset
=
(
nargc
>
1
)
?
parameter2int
(
operatorArgv
()[
1
])
:
0
;
int
nskip
=
(
nargc
>
2
)
?
parameter2int
(
operatorArgv
()[
2
])
:
0
;
// clang-format on
if
(
cdoVerbose
)
cdoPrint
(
"nsets = %d, noffset = %d, nskip = %d"
,
ndates
,
noffset
,
nskip
);
bool
lrange
=
operfunc
==
func_range
;
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
;
int
streamID1
=
pstreamOpenRead
(
cdoStreamName
(
0
));
int
vlistID1
=
pstreamInqVlist
(
streamID1
);
...
...
src/Timstat.cc
View file @
21065eea
...
...
@@ -100,6 +100,7 @@ void *Timstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"timrange"
,
func_range
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmin"
,
func_min
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmax"
,
func_max
,
DATE_LEN
,
NULL
);
...
...
@@ -160,6 +161,7 @@ void *Timstat(void *argument)
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
;
// clang-format on
if
(
operfunc
==
func_mean
)
{
...
...
src/Timstat2.cc
View file @
21065eea
...
...
@@ -115,8 +115,10 @@ void *Timstat2(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"timcor"
,
func_cor
,
0
,
NULL
);
cdoOperatorAdd
(
"timcovar"
,
func_covar
,
0
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
...
...
src/Timstat3.cc
View file @
21065eea
...
...
@@ -51,11 +51,12 @@ void *Timstat3(void *argument)
int
reached_eof
[
NIN
];
int
n_in
=
NIN
;
cdoInitialize
(
argument
);
// clang-format off
int
VARQUOT2TEST
=
cdoOperatorAdd
(
"varquot2test"
,
0
,
0
,
NULL
);
int
MEANDIFF2TEST
=
cdoOperatorAdd
(
"meandiff2test"
,
0
,
0
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/Vargen.cc
View file @
21065eea
...
...
@@ -244,6 +244,7 @@ void *Vargen(void *argument)
cdoInitialize
(
argument
);
// clang-format off
int
RANDOM
=
cdoOperatorAdd
(
"random"
,
0
,
0
,
"grid description file or name, <seed>"
);
int
SINCOS
=
cdoOperatorAdd
(
"sincos"
,
0
,
0
,
"grid description file or name"
);
int
COSHILL
=
cdoOperatorAdd
(
"coshill"
,
0
,
0
,
"grid description file or name"
);
...
...
@@ -253,6 +254,7 @@ void *Vargen(void *argument)
int
TEMP
=
cdoOperatorAdd
(
"temp"
,
0
,
0
,
NULL
);
int
MASK
=
cdoOperatorAdd
(
"mask"
,
0
,
0
,
NULL
);
int
STDATM
=
cdoOperatorAdd
(
"stdatm"
,
0
,
0
,
"height levels [m]"
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/Vertcum.cc
View file @
21065eea
...
...
@@ -64,8 +64,10 @@ void *Vertcum(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"vertcum"
,
0
,
0
,
NULL
);
int
VERTCUMHL
=
cdoOperatorAdd
(
"vertcumhl"
,
0
,
0
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/Vertintap.cc
View file @
21065eea
...
...
@@ -85,12 +85,14 @@ void *Vertintap(void *argument)
cdoInitialize
(
argument
);
// clang-format off
int
AP2PL
=
cdoOperatorAdd
(
"ap2pl"
,
func_pl
,
type_lin
,
"pressure levels in pascal"
);
int
AP2PLX
=
cdoOperatorAdd
(
"ap2plx"
,
func_pl
,
type_lin
,
"pressure levels in pascal"
);
int
AP2HL
=
cdoOperatorAdd
(
"ap2hl"
,
func_hl
,
type_lin
,
"height levels in meter"
);
int
AP2HLX
=
cdoOperatorAdd
(
"ap2hlx"
,
func_hl
,
type_lin
,
"height levels in meter"
);
int
AP2PL_LP
=
cdoOperatorAdd
(
"ap2pl_lp"
,
func_pl
,
type_log
,
"pressure levels in pascal"
);
int
AP2PLX_LP
=
cdoOperatorAdd
(
"ap2plx_lp"
,
func_pl
,
type_log
,
"pressure levels in pascal"
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
...
...
src/Vertstat.cc
View file @
21065eea
...
...
@@ -170,6 +170,7 @@ void *Vertstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"vertrange"
,
func_range
,
0
,
NULL
);
cdoOperatorAdd
(
"vertmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"vertmax"
,
func_max
,
0
,
NULL
);
...
...
@@ -191,6 +192,7 @@ void *Vertstat(void *argument)
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
;
// clang-format on
//int applyWeights = lmean;
...
...
src/Wind.cc
View file @
21065eea
...
...
@@ -57,11 +57,13 @@ void *Wind(void *argument)
bool
lcopy
=
UNCHANGED_RECORD
;
// clang-format off
int
UV2DV
=
cdoOperatorAdd
(
"uv2dv"
,
0
,
0
,
NULL
);
int
UV2DVL
=
cdoOperatorAdd
(
"uv2dvl"
,
0
,
0
,
NULL
);
int
DV2UV
=
cdoOperatorAdd
(
"dv2uv"
,
0
,
0
,
NULL
);
int
DV2UVL
=
cdoOperatorAdd
(
"dv2uvl"
,
0
,
0
,
NULL
);
int
DV2PS
=
cdoOperatorAdd
(
"dv2ps"
,
0
,
0
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/WindTrans.cc
View file @
21065eea
...
...
@@ -1446,10 +1446,12 @@ void *WindTrans(void *argument)
{
cdoInitialize
(
argument
);
UVDESTAG
=
cdoOperatorAdd
(
"uvDestag"
,
0
,
0
,
NULL
);
ROTUVNORTH
=
cdoOperatorAdd
(
"rotuvNorth"
,
0
,
0
,
NULL
);
ROTUVN
=
cdoOperatorAdd
(
"rotuvN"
,
0
,
0
,
NULL
);
PROJUVLATLON
=
cdoOperatorAdd
(
"projuvLatLon"
,
0
,
0
,
NULL
);
// Cylindrical Equidistant projection
// clang-format off
UVDESTAG
=
cdoOperatorAdd
(
"uvDestag"
,
0
,
0
,
NULL
);
ROTUVNORTH
=
cdoOperatorAdd
(
"rotuvNorth"
,
0
,
0
,
NULL
);
ROTUVN
=
cdoOperatorAdd
(
"rotuvN"
,
0
,
0
,
NULL
);
PROJUVLATLON
=
cdoOperatorAdd
(
"projuvLatLon"
,
0
,
0
,
NULL
);
// Cylindrical Equidistant projection
// clang-format on
int
operatorID
=
cdoOperatorID
();
...
...
src/XTimstat.cc
View file @
21065eea
...
...
@@ -171,6 +171,7 @@ void *XTimstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"xtimmin"
,
func_min
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimmax"
,
func_max
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"xtimsum"
,
func_sum
,
DATE_LEN
,
NULL
);
...
...
@@ -207,6 +208,7 @@ void *XTimstat(void *argument)
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
;
// clang-format on
if
(
operfunc
==
func_mean
)
{
...
...
src/Ydaystat.cc
View file @
21065eea
...
...
@@ -56,6 +56,7 @@ void *Ydaystat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"ydayrange"
,
func_range
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaymin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ydaymax"
,
func_max
,
0
,
NULL
);
...
...
@@ -75,6 +76,7 @@ void *Ydaystat(void *argument)
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
;
// clang-format on
for
(
int
dayoy
=
0
;
dayoy
<
MAX_DOY
;
dayoy
++
)
{
...
...
src/Ydrunstat.cc
View file @
21065eea
...
...
@@ -73,6 +73,7 @@ void *Ydrunstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"ydrunmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunmax"
,
func_max
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunsum"
,
func_sum
,
0
,
NULL
);
...
...
@@ -82,6 +83,7 @@ void *Ydrunstat(void *argument)
cdoOperatorAdd
(
"ydrunvar1"
,
func_var1
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunstd"
,
func_std
,
0
,
NULL
);
cdoOperatorAdd
(
"ydrunstd1"
,
func_std1
,
0
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
...
...
src/Yearmonstat.cc
View file @
21065eea
...
...
@@ -49,8 +49,10 @@ void *Yearmonstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"yearmonmean"
,
func_mean
,
0
,
NULL
);
cdoOperatorAdd
(
"yearmonavg"
,
func_avg
,
0
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
...
...
src/Yhourstat.cc
View file @
21065eea
...
...
@@ -82,6 +82,7 @@ void *Yhourstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"yhourrange"
,
func_range
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"yhourmax"
,
func_max
,
0
,
NULL
);
...
...
@@ -101,6 +102,7 @@ void *Yhourstat(void *argument)
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
;
// clang-format on
for
(
int
houroy
=
0
;
houroy
<
MAX_HOUR
;
++
houroy
)
{
...
...
src/Ymonarith.cc
View file @
21065eea
...
...
@@ -51,6 +51,7 @@ void *Ymonarith(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"ymonadd"
,
func_add
,
MONTHLY
,
NULL
);
cdoOperatorAdd
(
"ymonsub"
,
func_sub
,
MONTHLY
,
NULL
);
cdoOperatorAdd
(
"ymonmul"
,
func_mul
,
MONTHLY
,
NULL
);
...
...
@@ -59,6 +60,7 @@ void *Ymonarith(void *argument)
cdoOperatorAdd
(
"yseassub"
,
func_sub
,
SEASONAL
,
NULL
);
cdoOperatorAdd
(
"yseasmul"
,
func_mul
,
SEASONAL
,
NULL
);
cdoOperatorAdd
(
"yseasdiv"
,
func_div
,
SEASONAL
,
NULL
);
// clang-format on
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
...
...
src/Ymonstat.cc
View file @
21065eea
...
...
@@ -76,6 +76,7 @@ void *Ymonstat(void *argument)
cdoInitialize
(
argument
);
// clang-format off
cdoOperatorAdd
(
"ymonrange"
,
func_range
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonmin"
,
func_min
,
0
,
NULL
);
cdoOperatorAdd
(
"ymonmax"
,
func_max
,
0
,
NULL
);
...
...
@@ -95,6 +96,7 @@ void *Ymonstat(void *argument)
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
;
// clang-format on
for
(
month
=
0
;
month
<
NMONTH
;
month
++
)
{
...
...
Prev
1
2
3
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