#7871 StimPlan Model: resample well log data when not from static case

This commit is contained in:
Kristian Bendiksen
2021-08-16 19:50:52 +02:00
parent b69665ce23
commit 56a86eee5f
2 changed files with 37 additions and 6 deletions

View File

@@ -42,6 +42,7 @@
#include "RimNonNetLayers.h"
#include "RimStimPlanModel.h"
#include "RimStimPlanModelCalculator.h"
#include "RimStimPlanModelPressureCalculator.h"
#include "RimStimPlanModelTemplate.h"
#include "RimWellPath.h"
@@ -203,6 +204,36 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur
scaleByNetToGross( stimPlanModel, netToGross, values );
}
// Extracted well log needs to be sampled at same depths as well logs from static grid.
// If the well log is extracted from a different model it needs to be resampled.
if ( curveProperty != RiaDefines::CurveProperty::FACIES )
{
std::vector<double> targetMds;
std::vector<double> targetTvds;
std::vector<double> faciesValues;
if ( !stimPlanModel->calculator()->extractCurveData( RiaDefines::CurveProperty::FACIES,
timeStep,
faciesValues,
targetMds,
targetTvds,
rkbDiff ) )
{
return false;
}
if ( targetMds.size() != measuredDepthValues.size() )
{
RiaLogging::info( "Resampling data to fit static case." );
auto [tvds, mds, results] = RimStimPlanModelPressureCalculator::interpolateMissingValues( targetTvds,
targetMds,
measuredDepthValues,
values );
tvDepthValues = tvds;
measuredDepthValues = mds;
values = results;
}
}
RiaLogging::debug( QString( "Well log for '%1' done. Size: %2." )
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() )
.arg( values.size() ) );