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

EcaIndices: added variable ECA_refdate and ETC_refdate.

parent ce29ee9e
......@@ -74,6 +74,9 @@
#define TO_DEG_CELSIUS(x) ((x) -273.15)
#define TO_KELVIN(x) ((x) + 273.15)
constexpr int ECA_refdate = 19550101;
constexpr int ETC_refdate = 18500101;
// clang-format off
static const char CFD_NAME[] = "consecutive_frost_days_index_per_time_period";
......@@ -373,7 +376,7 @@ void *EcaCfd(void *process)
request.var1.name = CFD_NAME;
request.var1.longname = CFD_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.f1 = vfarselltc;
request.var1.f1arg = TO_KELVIN(0.0);
request.var1.f2 = vfarnum2;
......@@ -425,7 +428,7 @@ void *EcaCsu(void *process)
request.var1.name = CSU_NAME;
request.var1.longname = CSU_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.f1 = vfarselgtc;
request.var1.f1arg = TO_KELVIN(argT);
request.var1.f2 = vfarnum2;
......@@ -474,7 +477,7 @@ void *EcaCwdi(void *process)
request.var1.name = CWDI_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = CWDI_UNITS;
request.var1.f2 = vfarcsub;
request.var1.f2arg = argT;
......@@ -528,15 +531,15 @@ void *EcaCwfi(void *process)
{
request.var1.name = CWFI_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.units = CWFI_UNITS;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = CWFI_NAME_ET;
request.var1.longname = CWFI_LONGNAME_ET;
request.var1.units = CWFI_UNITS_ET;
request.var1.refdate = 18500101;
request.var1.refdate = ETC_refdate;
}
request.var1.f3 = vfarsellt;
......@@ -568,7 +571,7 @@ void *EcaEtr(void *process)
request.name = ETR_NAME;
request.longname = ETR_LONGNAME;
request.refdate = 19550101;
request.refdate = ECA_refdate;
request.f1 = vfarmax;
request.f2 = vfarmin;
request.f3 = vfarsub;
......@@ -603,14 +606,14 @@ void *EcaFd(void *process)
{
request.var1.name = FD_NAME;
request.var1.longname = FD_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = FD_NAME_ET;
request.var1.longname = FD_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = FD_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f1 = vfarselltc;
......@@ -695,7 +698,7 @@ void *EcaHd(void *process)
request.var1.name = HD_NAME;
request.var1.longname = HD_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = HD_UNITS;
request.var1.f1 = vfarselltc;
request.var1.f1arg = TO_KELVIN(argA);
......@@ -740,7 +743,7 @@ void *EcaHwdi(void *process)
request.var1.name = HWDI_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = HWDI_UNITS;
request.var1.f2 = vfarcadd;
request.var1.f2arg = argT;
......@@ -794,15 +797,15 @@ void *EcaHwfi(void *process)
{
request.var1.name = HWFI_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = HWFI_UNITS;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = HWFI_NAME_ET;
request.var1.longname = HWFI_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = HWFI_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f3 = vfarselgt;
......@@ -898,14 +901,14 @@ void *EcaSu(void *process)
{
request.var1.name = SU_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = SU_NAME_ET;
request.var1.longname = SU_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = SU_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f1 = vfarselgtc;
......@@ -930,7 +933,7 @@ void *EcaTg10p(void *process)
request.var1.name = TG10P_NAME;
request.var1.longname = TG10P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = TG10P_UNITS;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum;
......@@ -954,7 +957,7 @@ void *EcaTg90p(void *process)
request.var1.name = TG90P_NAME;
request.var1.longname = TG90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = TG90P_UNITS;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
......@@ -978,7 +981,7 @@ void *EcaTn10p(void *process)
request.var1.name = TN10P_NAME;
request.var1.longname = TN10P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = TN10P_UNITS;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum;
......@@ -1002,7 +1005,7 @@ void *EcaTn90p(void *process)
request.var1.name = TN90P_NAME;
request.var1.longname = TN90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = TN90P_UNITS;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
......@@ -1046,15 +1049,15 @@ void *EcaTr(void *process)
{
request.var1.name = TR_NAME;
request.var1.longname = tr_longname;
request.var1.refdate = 19550101;
request.var1.units = TR_UNITS;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = TR_NAME_ET;
request.var1.longname = TR_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = TR_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f1 = vfarselgtc;
......@@ -1079,7 +1082,7 @@ void *EcaTx10p(void *process)
request.var1.name = TX10P_NAME;
request.var1.longname = TX10P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = TX10P_UNITS;
request.var1.f3 = vfarsellt;
request.var1.f4 = vfarnum;
......@@ -1112,7 +1115,7 @@ void *EcaTx90p(void *process)
request.var1.name = TX90P_NAME;
request.var1.longname = TX90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = TX90P_UNITS;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarnum;
......@@ -1171,15 +1174,15 @@ void *EcaCdd(void *process)
{
request.var1.name = CDD_NAME;
request.var1.longname = cdd_longname;
request.var1.refdate = 19550101;
request.var1.units = CDD_UNITS;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = CDD_NAME_ET;
request.var1.longname = CDD_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = CDD_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f1 = vfarselltc;
......@@ -1244,15 +1247,15 @@ void *EcaCwd(void *process)
{
request.var1.name = CWD_NAME;
request.var1.longname = cwd_longname;
request.var1.refdate = 19550101;
request.var1.units = CWD_UNITS;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = CWD_NAME_ET;
request.var1.longname = CWD_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = CWD_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f1 = vfarselgec;
request.var1.f1arg = threshold;
......@@ -1345,15 +1348,15 @@ void *EcaPd(void *process)
{
request.var1.name = R10MM_NAME;
request.var1.longname = R10MM_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = R10MM_UNITS;
request.var1.refdate = ECA_refdate;
}
else
{
request.var1.name = R10MM_NAME_ET;
request.var1.longname = R10MM_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = R10MM_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
}
else if (operatorID == ECA_R20MM || operatorID == ETCCDI_R20MM)
......@@ -1363,15 +1366,15 @@ void *EcaPd(void *process)
{
request.var1.name = R20MM_NAME;
request.var1.longname = R20MM_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = R20MM_UNITS;
request.var1.refdate = ECA_refdate;
}
else
{
request.var1.name = R20MM_NAME_ET;
request.var1.longname = R20MM_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = R20MM_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
}
......@@ -1399,7 +1402,7 @@ EcaR75p(void *process)
request.var1.name = R75P_NAME;
request.var1.longname = R75P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R75P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1424,7 +1427,7 @@ EcaR75ptot(void *process)
request.var1.name = R75PTOT_NAME;
request.var1.longname = R75PTOT_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R75PTOT_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1449,7 +1452,7 @@ EcaR90p(void *process)
request.var1.name = R90P_NAME;
request.var1.longname = R90P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R90P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1474,7 +1477,7 @@ EcaR90ptot(void *process)
request.var1.name = R90PTOT_NAME;
request.var1.longname = R90PTOT_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R90PTOT_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1499,7 +1502,7 @@ EcaR95p(void *process)
request.var1.name = R95P_NAME;
request.var1.longname = R95P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R95P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1524,7 +1527,7 @@ EcaR95ptot(void *process)
request.var1.name = R95PTOT_NAME;
request.var1.longname = R95PTOT_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R95PTOT_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1549,7 +1552,7 @@ EcaR99p(void *process)
request.var1.name = R99P_NAME;
request.var1.longname = R99P_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = R99P_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
......@@ -1574,7 +1577,7 @@ EcaR99ptot(void *process)
request.var1.name = R99PTOT_NAME;
request.var1.longname = R99PTOT_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.f1 = vfarselgec;
request.var1.f3 = vfarselgt;
request.var1.f4 = vfarsum;
......@@ -1651,15 +1654,15 @@ EcaRx1day(void *process)
{
request.var1.name = RX1DAY_NAME;
request.var1.longname = RX1DAY_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = RX1DAY_UNITS;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = RX1DAY_NAME_ET;
request.var1.longname = RX1DAY_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = RX1DAY_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f2 = vfarmax;
......@@ -1709,15 +1712,15 @@ EcaRx5day(void *process)
{
request.var1.name = RX5DAY_NAME;
request.var1.longname = RX5DAY_LONGNAME;
request.var1.refdate = 19550101;
request.var1.units = RX5DAY_UNITS;
request.var1.refdate = ECA_refdate;
}
else if (OPID_ETC == cdoOperatorID())
{
request.var1.name = RX5DAY_NAME_ET;
request.var1.longname = RX5DAY_LONGNAME_ET;
request.var1.refdate = 18500101;
request.var1.units = RX5DAY_UNITS_ET;
request.var1.refdate = ETC_refdate;
}
request.var1.f2 = vfarmax;
request.var2.name = RX5DAY_NAME2;
......@@ -1795,7 +1798,7 @@ Fdns(void *process)
request.var1.name = FDNS_NAME;
request.var1.longname = FDNS_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = FDNS_UNITS;
request.var1.f1 = vfarsellec;
request.var1.f1arg = TO_KELVIN(0.0);
......@@ -1838,7 +1841,7 @@ Strwin(void *process)
request.var1.name = STRWIN_NAME;
request.var1.longname = longname.data();
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = STRWIN_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
......@@ -1875,7 +1878,7 @@ Strbre(void *process)
request.var1.name = STRBRE_NAME;
request.var1.longname = STRBRE_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = STRWIN_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
......@@ -1911,7 +1914,7 @@ Strgal(void *process)
request.var1.name = STRBRE_NAME;
request.var1.longname = STRBRE_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = STRWIN_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
......@@ -1947,7 +1950,7 @@ Hurr(void *process)
request.var1.name = HURR_NAME;
request.var1.longname = HURR_LONGNAME;
request.var1.refdate = 19550101;
request.var1.refdate = ECA_refdate;
request.var1.units = STRWIN_UNITS;
request.var1.f1 = vfarselgec;
request.var1.f1arg = maxWind;
......
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