Commit be940292 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added timstatAddOperators().

parent 3626b6e8
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment