mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10281 Make sure missing data is marked with NULL
If an ensemble do not have data for some realizations, Show Plot Data reported wrong data when resampling was activated. Display of data for No Resampling was correct.
This commit is contained in:
parent
fc8235aeca
commit
473f1bebcd
@ -239,8 +239,6 @@ void RimSummaryCurvesData::prepareCaseCurvesForExport( RiaDefines::DateTimePerio
|
||||
const RimSummaryCurvesData& inputCurvesData,
|
||||
RimSummaryCurvesData* resultCurvesData )
|
||||
{
|
||||
RiaTimeHistoryCurveResampler resampler;
|
||||
|
||||
resultCurvesData->clear();
|
||||
|
||||
if ( period != RiaDefines::DateTimePeriod::NONE )
|
||||
@ -259,21 +257,13 @@ void RimSummaryCurvesData::prepareCaseCurvesForExport( RiaDefines::DateTimePerio
|
||||
|
||||
for ( auto& curveDataItem : caseCurveData )
|
||||
{
|
||||
resampler.setCurveData( curveDataItem.values, caseTimeSteps );
|
||||
|
||||
if ( RiaSummaryTools::hasAccumulatedData( curveDataItem.address ) || algorithm == ResampleAlgorithm::PERIOD_END )
|
||||
{
|
||||
resampler.resampleAndComputePeriodEndValues( period );
|
||||
}
|
||||
else
|
||||
{
|
||||
resampler.resampleAndComputeWeightedMeanValues( period );
|
||||
}
|
||||
const auto [resampledTime, resampledValues] =
|
||||
RiaSummaryTools::resampledValuesForPeriod( curveDataItem.address, caseTimeSteps, curveDataItem.values, period );
|
||||
|
||||
auto cd = curveDataItem;
|
||||
cd.values = resampler.resampledValues();
|
||||
cd.values = resampledValues;
|
||||
|
||||
resultCurvesData->addCurveData( caseId, "", resampler.resampledTimeSteps(), cd );
|
||||
resultCurvesData->addCurveData( caseId, "", resampledTime, cd );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user