Delta Ensemble : Do not try to combine results with no data

This commit is contained in:
Magne Sjaastad 2020-09-22 19:22:30 +02:00
parent c5d75a8519
commit bbdda4215b

View File

@ -235,6 +235,11 @@ std::pair<std::vector<time_t>, std::vector<double>>
reader1->values( address, &values1 ); reader1->values( address, &values1 );
reader2->values( address, &values2 ); reader2->values( address, &values2 );
if ( values1.empty() && values2.empty() )
{
return ResultPair();
}
merger.addCurveData( reader1->timeSteps( address ), values1 ); merger.addCurveData( reader1->timeSteps( address ), values1 );
merger.addCurveData( reader2->timeSteps( address ), values2 ); merger.addCurveData( reader2->timeSteps( address ), values2 );
merger.computeInterpolatedValues(); merger.computeInterpolatedValues();