Make it possible to exclude partial delta curves

Make sure statistics curves are recomputed on flag change

When toggling "Discard Missing or Incomplete Realizations", make sure the statistics is recomputed and the ensemble plots updated.
This commit is contained in:
Magne Sjaastad
2024-11-15 12:37:22 +01:00
parent dbea0e2593
commit 9b6e441386
20 changed files with 184 additions and 45 deletions

View File

@@ -143,14 +143,14 @@ void RimEnsembleStatisticsCase::calculate( const std::vector<RimSummaryCase*>& s
// Use first summary case to get unit system and other meta data
m_firstSummaryCase = summaryCases.front();
const auto [minTime, maxTime] = findMinMaxTime( summaryCases, inputAddress );
RiaDefines::DateTimePeriod period = findBestResamplingPeriod( minTime, maxTime );
const auto [minTime, maxTime] = findMinMaxTime( summaryCases, inputAddress );
// The last time step for the individual realizations in an ensemble is usually identical. Add a small threshold to improve robustness.
const auto timeThreshold = maxTime - ( maxTime - minTime ) * 0.01;
const auto timeThreshold = RiaSummaryTools::calculateTimeThreshold( minTime, maxTime );
RiaDefines::DateTimePeriod period = findBestResamplingPeriod( minTime, maxTime );
RiaTimeHistoryCurveMerger curveMerger;
for ( const auto& sumCase : summaryCases )
{
const auto& reader = sumCase->summaryReader();
@@ -169,7 +169,7 @@ void RimEnsembleStatisticsCase::calculate( const std::vector<RimSummaryCase*>& s
}
}
curveMerger.computeInterpolatedValues();
curveMerger.computeInterpolatedValues( includeIncompleteCurves );
std::vector<std::vector<double>> curveValues;
for ( size_t i = 0; i < curveMerger.curveCount(); i++ )