WSL/SLF GitLab Repository

Commit b80ef32f authored by Mathias Bavay's avatar Mathias Bavay
Browse files

There was a bug when applying daily corrections: the juliand day numbers start at 1, not 0!

parent 4e844583
......@@ -55,7 +55,7 @@ void ProcAdd::process(const unsigned int& param, const std::vector<MeteoData>& i
double& tmp = ovec[ii](param);
if (tmp == IOUtils::nodata) continue; //preserve nodata values
tmp += vecOffsets[ ovec[ii].date.getJulianDayNumber() ];
tmp += vecOffsets[ ovec[ii].date.getJulianDayNumber()-1 ]; //indices start at 0 while day numbers start at 1
}
} else if (type=='h') {
int year, month, day, hour;
......
......@@ -55,7 +55,7 @@ void ProcMult::process(const unsigned int& param, const std::vector<MeteoData>&
double& tmp = ovec[ii](param);
if (tmp == IOUtils::nodata) continue; //preserve nodata values
tmp *= vecFactors[ ovec[ii].date.getJulianDayNumber() ];
tmp *= vecFactors[ ovec[ii].date.getJulianDayNumber()-1 ]; //indices start at 0 while day numbers start at 1
}
} else if (type=='h') {
int year, month, day, hour;
......
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