Commit 58e9e22e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

ecacore: set default value of all pointers to nullptr.

parent 540da4a0
......@@ -374,7 +374,6 @@ void *EcaCfd(void *process)
request.var1.name = CFD_NAME;
request.var1.longname = CFD_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = nullptr;
request.var1.f1 = vfarselltc;
request.var1.f1arg = TO_KELVIN(0.0);
request.var1.f2 = vfarnum2;
......@@ -387,7 +386,6 @@ void *EcaCfd(void *process)
request.var2.units = CFD_UNITS2;
request.var2.h1 = vfarseleqc;
request.var2.h1arg = ndays+1;
request.var2.h2 = nullptr;
request.var2.h3 = vfarnum;
eca1(&request);
......@@ -431,7 +429,6 @@ void *EcaCsu(void *process)
request.var1.name = CSU_NAME;
request.var1.longname = CSU_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = nullptr;
request.var1.f1 = vfarselgtc;
request.var1.f1arg = TO_KELVIN(argT);
request.var1.f2 = vfarnum2;
......@@ -444,7 +441,6 @@ void *EcaCsu(void *process)
request.var2.units = CSU_UNITS2;
request.var2.h1 = vfarseleqc;
request.var2.h1arg = ndays+1;
request.var2.h2 = nullptr;
request.var2.h3 = vfarnum;
eca1(&request);
......@@ -486,7 +482,6 @@ void *EcaCwdi(void *process)
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.units = CWDI_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = vfarcsub;
request.var1.f2arg = argT;
request.var1.f3 = vfarsellt;
......@@ -551,8 +546,6 @@ void *EcaCwfi(void *process)
request.var1.refdate = 18500101;
}
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum2;
request.var1.f5 = vfarnum3;
......@@ -584,7 +577,6 @@ void *EcaEtr(void *process)
request.name = ETR_NAME;
request.longname = ETR_LONGNAME;
request.refdate = 19550101;
request.units = nullptr;
request.f1 = vfarmax;
request.f2 = vfarmin;
request.f3 = vfarsub;
......@@ -620,7 +612,6 @@ void *EcaFd(void *process)
request.var1.name = FD_NAME;
request.var1.longname = FD_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = nullptr;
}
else if (OPID_ETC == cdoOperatorID())
{
......@@ -633,12 +624,9 @@ void *EcaFd(void *process)
request.var1.f1 = vfarselltc;
request.var1.f1arg = TO_KELVIN(0.0);
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -723,12 +711,9 @@ void *EcaHd(void *process)
request.var1.f1 = vfarselltc;
request.var1.f1arg = TO_KELVIN(argA);
request.var1.f2 = vfarsum;
request.var1.f3 = nullptr;
request.var1.mulc = -1.0;
request.var1.addc = TO_KELVIN(argX);
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -769,7 +754,6 @@ void *EcaHwdi(void *process)
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.units = HWDI_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = vfarcadd;
request.var1.f2arg = argT;
request.var1.f3 = vfarselgt;
......@@ -834,8 +818,6 @@ void *EcaHwfi(void *process)
request.var1.units = HWFI_UNITS_ET;
}
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum2;
request.var1.f5 = vfarnum3;
......@@ -891,12 +873,9 @@ void *EcaId(void *process)
request.var1.f1 = vfarselltc;
request.var1.f1arg = TO_KELVIN(0.0);
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -937,7 +916,6 @@ void *EcaSu(void *process)
request.var1.name = SU_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.units = nullptr;
}
else if (OPID_ETC == cdoOperatorID())
{
......@@ -950,12 +928,9 @@ void *EcaSu(void *process)
request.var1.f1 = vfarselgtc;
request.var1.f1arg = TO_KELVIN(argT);
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -977,13 +952,9 @@ void *EcaTg10p(void *process)
request.var1.longname = TG10P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = TG10P_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1005,13 +976,9 @@ void *EcaTg90p(void *process)
request.var1.longname = TG90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = TG90P_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1033,13 +1000,9 @@ void *EcaTn10p(void *process)
request.var1.longname = TN10P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = TN10P_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1061,13 +1024,9 @@ void *EcaTn90p(void *process)
request.var1.longname = TN90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = TN90P_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1121,12 +1080,9 @@ void *EcaTr(void *process)
request.var1.f1 = vfarselgtc;
request.var1.f1arg = TO_KELVIN(argT);
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -1148,13 +1104,9 @@ void *EcaTx10p(void *process)
request.var1.longname = TX10P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = TX10P_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1185,13 +1137,9 @@ void *EcaTx90p(void *process)
request.var1.longname = TX90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = TX90P_UNITS;
request.var1.f1 = nullptr;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1269,7 +1217,6 @@ void *EcaCdd(void *process)
request.var2.units = CDD_UNITS2;
request.var2.h1 = vfarseleqc;
request.var2.h1arg = ndays+1;
request.var2.h2 = nullptr;
request.var2.h3 = vfarnum;
eca1(&request);
......@@ -1345,7 +1292,6 @@ void *EcaCwd(void *process)
request.var2.units = CWD_UNITS2;
request.var2.h1 = vfarseleqc;
request.var2.h1arg = ndays+1;
request.var2.h2 = nullptr;
request.var2.h3 = vfarnum;
eca1(&request);
......@@ -1463,12 +1409,9 @@ void *EcaPd(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = threshold;
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -1492,12 +1435,9 @@ EcaR75p(void *process)
request.var1.units = R75P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1521,12 +1461,9 @@ EcaR75ptot(void *process)
request.var1.units = R75PTOT_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarsum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TOTAL_AMOUNT;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1550,12 +1487,9 @@ EcaR90p(void *process)
request.var1.units = R90P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1579,12 +1513,9 @@ EcaR90ptot(void *process)
request.var1.units = R90PTOT_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarsum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TOTAL_AMOUNT;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1608,12 +1539,9 @@ EcaR95p(void *process)
request.var1.units = R95P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1637,12 +1565,9 @@ EcaR95ptot(void *process)
request.var1.units = R95PTOT_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarsum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TOTAL_AMOUNT;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1666,12 +1591,9 @@ EcaR99p(void *process)
request.var1.units = R99P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TIME;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1692,15 +1614,11 @@ EcaR99ptot(void *process)
request.var1.name = R99PTOT_NAME;
request.var1.longname = R99PTOT_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = nullptr;
request.var1.f1 = vfarselgec;
request.var1.f1arg = 1.0;
request.var1.f2 = nullptr;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarsum;
request.var1.f5 = nullptr;
request.var1.epilog = PERCENT_OF_TOTAL_AMOUNT;
request.var2.h2 = nullptr;
eca2(&request);
......@@ -1740,12 +1658,9 @@ EcaRr1(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = threshold;
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
cdoFinish();
......@@ -1788,14 +1703,10 @@ EcaRx1day(void *process)
request.var1.refdate = 18500101;
request.var1.units = RX1DAY_UNITS_ET;
}
request.var1.f1 = nullptr;
request.var1.f2 = vfarmax;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -1853,9 +1764,7 @@ EcaRx5day(void *process)
request.var1.refdate = 18500101;
request.var1.units = RX5DAY_UNITS_ET;
}
request.var1.f1 = nullptr;
request.var1.f2 = vfarmax;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
......@@ -1865,7 +1774,6 @@ EcaRx5day(void *process)
request.var2.h1 = vfarselgec;
request.var2.h1arg = argX;
request.var2.h2 = vfarnum;
request.var2.h3 = nullptr;
eca1(&request);
......@@ -1917,12 +1825,9 @@ EcaSdii(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = threshold;
request.var1.f2 = vfarsum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = MEAN;
request.var2.h2 = nullptr;
request.var2.h3 = nullptr;
eca1(&request);
cdoFinish();
......@@ -1948,11 +1853,10 @@ Fdns(void *process)
request.var1.f2arg = 0.01;
request.var1.f3 = vfaradd; // any f with f(a, b) = miss, if a = miss or b = miss will do here
request.var1.f4 = vfarnum;
request.var1.f5 = nullptr;
request.var1.epilog = ECA_NONE;
request.var2.h2 = nullptr;
eca2(&request);
cdoFinish();
return 0;
......@@ -1990,7 +1894,6 @@ Strwin(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
......@@ -2031,7 +1934,6 @@ Strbre(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
......@@ -2071,7 +1973,6 @@ Strgal(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
......@@ -2111,7 +2012,6 @@ Hurr(void *process)
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
request.var1.f2 = vfarnum;
request.var1.f3 = nullptr;
request.var1.mulc = 0.0;
request.var1.addc = 0.0;
request.var1.epilog = ECA_NONE;
......@@ -2124,6 +2024,7 @@ Hurr(void *process)
request.var2.h3 = vfarmax;
eca1(&request);
cdoFinish();
return 0;
......
......@@ -55,14 +55,14 @@ using ECA_FUNC_3 = void (*)(Field &, const Field &, double);
*/
struct ECA_MAJOR_REQUEST_ELEMENT_1
{
const char *name;
const char *longname;
const char *units;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
int refdate;
ECA_FUNC_1 f1;
ECA_FUNC_1 f1 = nullptr;
double f1arg;
ECA_FUNC_2 f2;
ECA_FUNC_2 f3;
ECA_FUNC_2 f2 = nullptr;
ECA_FUNC_2 f3 = nullptr;
double mulc;
double addc;
ECA_EPILOG epilog;
......@@ -87,13 +87,13 @@ struct ECA_MAJOR_REQUEST_ELEMENT_1
*/
struct ECA_MINOR_REQUEST_ELEMENT_1
{
const char *name;
const char *longname;
const char *units;
ECA_FUNC_1 h1;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
ECA_FUNC_1 h1 = nullptr;
double h1arg;
ECA_FUNC_2 h2;
ECA_FUNC_2 h3;
ECA_FUNC_2 h2 = nullptr;
ECA_FUNC_2 h3 = nullptr;
};
struct ECA_REQUEST_1
......@@ -127,17 +127,17 @@ struct ECA_REQUEST_1
*/
struct ECA_MAJOR_REQUEST_ELEMENT_2
{
const char *name;
const char *longname;
const char *units;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
int refdate;
ECA_FUNC_1 f1;
ECA_FUNC_1 f1 = nullptr;
double f1arg;
ECA_FUNC_1 f2;
ECA_FUNC_1 f2 = nullptr;
double f2arg;
ECA_FUNC_2 f3;
ECA_FUNC_2 f4;
ECA_FUNC_3 f5;
ECA_FUNC_2 f3 = nullptr;
ECA_FUNC_2 f4 = nullptr;
ECA_FUNC_3 f5 = nullptr;
double f5arg;
ECA_EPILOG epilog;
};
......@@ -161,12 +161,12 @@ struct ECA_MAJOR_REQUEST_ELEMENT_2
*/
struct ECA_MINOR_REQUEST_ELEMENT_2
{
const char *name;
const char *longname;
const char *units;
ECA_FUNC_1 h1;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
ECA_FUNC_1 h1 = nullptr;
double h1arg;
ECA_FUNC_2 h2;
ECA_FUNC_2 h2 = nullptr;
};
struct ECA_REQUEST_2
......@@ -194,13 +194,13 @@ struct ECA_REQUEST_2
*/
struct ECA_REQUEST_3
{
const char *name;
const char *longname;
const char *units;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
int refdate;
ECA_FUNC_2 f1;
ECA_FUNC_2 f2;
ECA_FUNC_2 f3;
ECA_FUNC_2 f1 = nullptr;
ECA_FUNC_2 f2 = nullptr;
ECA_FUNC_2 f3 = nullptr;
};
/**
......@@ -224,17 +224,17 @@ struct ECA_REQUEST_3
*/
struct ECA_REQUEST_4
{
const char *name;
const char *longname;
const char *units;
const char *name2;
const char *longname2;
const char *units2;
ECA_FUNC_1 s1;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
const char *name2 = nullptr;
const char *longname2 = nullptr;
const char *units2 = nullptr;
ECA_FUNC_1 s1 = nullptr;
double s1arg;
ECA_FUNC_1 s2;
ECA_FUNC_1 s2 = nullptr;
double s2arg;
ECA_FUNC_1 s3;
ECA_FUNC_1 s3 = nullptr;
double s3arg;
int consecutiveDays;
};
......@@ -255,9 +255,9 @@ struct ECA_REQUEST_4
struct ETCCDI_REQUEST
{
const char *name;
const char *longname;
const char *units;
const char *name = nullptr;
const char *longname = nullptr;
const char *units = nullptr;
int pn;
int ndates;
int startboot;
......
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