Summary : Guard invalid data

This commit is contained in:
Magne Sjaastad 2018-12-16 21:31:34 +01:00
parent 1654c3cc58
commit 86d801a138

View File

@ -147,6 +147,8 @@ void RimEnsembleStatisticsCase::calculate(const std::vector<RimSummaryCase*> sum
std::vector<double> values; std::vector<double> values;
reader->values(inputAddress, &values); reader->values(inputAddress, &values);
if (timeSteps.size() != values.size()) continue;
RiaTimeHistoryCurveResampler resampler; RiaTimeHistoryCurveResampler resampler;
resampler.setCurveData(values, timeSteps); resampler.setCurveData(values, timeSteps);
if (inputAddress.hasAccumulatedData()) resampler.resampleAndComputePeriodEndValues(DateTimePeriod::DAY); if (inputAddress.hasAccumulatedData()) resampler.resampleAndComputePeriodEndValues(DateTimePeriod::DAY);