Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
be940292
Commit
be940292
authored
Jan 21, 2018
by
Uwe Schulzweida
Browse files
Added timstatAddOperators().
parent
3626b6e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Timstat.cc
View file @
be940292
...
...
@@ -77,23 +77,11 @@
#include "pstream.h"
void
*
Timstat
(
void
*
argument
)
{
enum
{
HOUR_LEN
=
4
,
DAY_LEN
=
6
,
MON_LEN
=
8
,
YEAR_LEN
=
10
};
int
timestat_date
=
TIMESTAT_MEAN
;
int
vdate0
=
0
,
vtime0
=
0
;
int
nrecs
;
int
varID
,
levelID
;
int
streamID3
=
-
1
;
int
vlistID3
,
taxisID3
=
-
1
;
size_t
nmiss
;
bool
lvfrac
=
false
;
int
nwpv
;
// number of words per value; real:1 complex:2
char
indate1
[
DATE_LEN
+
1
],
indate2
[
DATE_LEN
+
1
];
double
vfrac
=
1
;
cdoInitialize
(
argument
);
enum
{
HOUR_LEN
=
4
,
DAY_LEN
=
6
,
MON_LEN
=
8
,
YEAR_LEN
=
10
};
static
void
timstatAddOperators
(
void
)
{
// clang-format off
cdoOperatorAdd
(
"timrange"
,
func_range
,
DATE_LEN
,
NULL
);
cdoOperatorAdd
(
"timmin"
,
func_min
,
DATE_LEN
,
NULL
);
...
...
@@ -145,6 +133,26 @@ void *Timstat(void *argument)
cdoOperatorAdd
(
"hourvar1"
,
func_var1
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourstd"
,
func_std
,
HOUR_LEN
,
NULL
);
cdoOperatorAdd
(
"hourstd1"
,
func_std1
,
HOUR_LEN
,
NULL
);
}
void
*
Timstat
(
void
*
argument
)
{
int
timestat_date
=
TIMESTAT_MEAN
;
int
vdate0
=
0
,
vtime0
=
0
;
int
nrecs
;
int
varID
,
levelID
;
int
streamID3
=
-
1
;
int
vlistID3
,
taxisID3
=
-
1
;
size_t
nmiss
;
bool
lvfrac
=
false
;
int
nwpv
;
// number of words per value; real:1 complex:2
char
indate1
[
DATE_LEN
+
1
],
indate2
[
DATE_LEN
+
1
];
double
vfrac
=
1
;
cdoInitialize
(
argument
);
timstatAddOperators
();
int
operatorID
=
cdoOperatorID
();
int
operfunc
=
cdoOperatorF1
(
operatorID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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