Skip to content
Snippets Groups Projects
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
No related branches found
Tags SAMMY-8.2-beta1
1 merge request!77Snd2arl
Pipeline #61356 passed with warnings
......@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment