Commit 5be622f9 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Timstat2: init work with 0.0.

parent 58692f54
......@@ -141,6 +141,7 @@ Timstat2(void *process)
// clang-format off
cdoOperatorAdd("timcor", func_cor, 5, nullptr);
cdoOperatorAdd("timcovar", func_covar, 3, nullptr);
cdoOperatorAdd("timrms", func_rms, 1, nullptr);
// clang-format on
const auto operatorID = cdoOperatorID();
......@@ -193,7 +194,7 @@ Timstat2(void *process)
{
nofvals[varID][levelID].resize(gridsize, 0);
work[varID][levelID].resize(nwork);
for (int i = 0; i < nwork; i++) work[varID][levelID][i].resize(gridsize);
for (int i = 0; i < nwork; i++) work[varID][levelID][i].resize(gridsize, 0.0);
}
}
......
......@@ -49,6 +49,8 @@
#define func_minidx 34
#define func_maxidx 35
#define func_rms 36
#define func_add 41
#define func_sub 42
#define func_mul 43
......
......@@ -541,6 +541,8 @@ void *Timstat(void *argument);
void *Timstat2(void *argument);
#define TimcorOperators {"timcor"}
#define TimcovarOperators {"timcovar"}
#define TimrmsOperators {"timrms"}
void *Timstat3(void *argument);
#define Timstat3Operators {"meandiff2test", "varquot2test"}
......
......@@ -207,6 +207,7 @@ static const module_t module_Daystat = {Timstat , DaystatHelp
static const module_t module_Hourstat = {Timstat , HourstatHelp , HourstatOperators , EXPOSED , CDI_BOTH , 1 , 1 , NoRestriction };
static const module_t module_Timcor = {Timstat2 , TimcorHelp , TimcorOperators , EXPOSED , CDI_REAL , 2 , 1 , NoRestriction };
static const module_t module_Timscorvar = {Timstat2 , TimcovarHelp , TimcovarOperators , EXPOSED , CDI_REAL , 2 , 1 , NoRestriction };
static const module_t module_Timrms = {Timstat2 , {} , TimrmsOperators , EXPOSED , CDI_REAL , 2 , 1 , NoRestriction };
static const module_t module_Timstat3 = {Timstat3 , {} , Timstat3Operators , EXPOSED , CDI_REAL , 2 , 1 , NoRestriction };
static const module_t module_Tinfo = {Tinfo , {} , TinfoOperators , EXPOSED , CDI_BOTH , 1 , 0 , NoRestriction };
static const module_t module_Tocomplex = {Tocomplex , {} , TocomplexOperators , EXPOSED , CDI_REAL , 1 , 1 , NoRestriction };
......
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