Commit ada3950f authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Fixing bug in radixsnd2arl that caused temperature to climb each interval.

parent e8f87bdb
Pipeline #61356 passed with stages
in 14 minutes and 16 seconds
......@@ -475,6 +475,11 @@ int main(int argc, char **argv)
std::cout << " Height:" << std::endl;
inputHeights = interpolateValues(inputPressures, inputHeights, true);
}
// First convert temperature from Celsius to Kelvin
std::cout << "Converting Temperature from C to Kelvin." << std::endl;
std::transform(inputTemps.begin(), inputTemps.end(), inputTemps.begin(),
[](double v) { return v - ABS_ZERO_CELSIUS; });
std::cout << " Interpolation complete." << std::endl;
// Check if the grid is of appropriate size - with too small grid/too many
......@@ -604,8 +609,6 @@ int main(int argc, char **argv)
}
// Write temperature levels
// First convert temperature from Celsius to Kelvin
inputTemps[level] = inputTemps[level] - ABS_ZERO_CELSIUS;
{
thisRecordHeader.kvar = "TEMP";
thisRecordHeader.var1 = inputTemps[level];
......
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