Commit 21065eea authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

Merge branch 'develop' of git.mpimet.mpg.de:cdo into develop

parents ff3ca441 7a2c0dab
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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);
......
......@@ -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 )
{
......
......@@ -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);
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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);
......
......@@ -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;
......
......@@ -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();
......
......@@ -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();
......
......@@ -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 )
{
......
......@@ -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++ )
{
......
......@@ -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);
......
......@@ -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);
......
......@@ -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 )
{
......
......@@ -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);
......
......@@ -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++ )
{
......
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