StimPlan Model: Improve error handling on missing pressure and porosity data.

This commit is contained in:
Kristian Bendiksen
2021-08-11 11:12:48 +02:00
committed by Magne Sjaastad
parent 92bd783a10
commit 7db9efe387
2 changed files with 19 additions and 10 deletions

View File

@@ -164,21 +164,25 @@ bool RimStimPlanModelElasticPropertyCalculator::calculate( RiaDefines::CurveProp
RimElasticProperties* elasticProperties = stimPlanModelTemplate->elasticProperties();
if ( !elasticProperties )
{
RiaLogging::error( QString( "No elastic properties found" ) );
RiaLogging::error( QString( "No elastic properties found weh extracting elastic properties." ) );
return false;
}
std::vector<double> faciesValues =
m_stimPlanModelCalculator->extractValues( RiaDefines::CurveProperty::FACIES, timeStep );
if ( faciesValues.empty() )
{
RiaLogging::error( QString( "No facies values found." ) );
RiaLogging::error( QString( "No facies values found when extracting elastic properties." ) );
return false;
}
std::vector<double> poroValues =
m_stimPlanModelCalculator->extractValues( RiaDefines::CurveProperty::POROSITY_UNSCALED, timeStep );
if ( poroValues.empty() )
{
RiaLogging::error( QString( "No porosity values found when extracting elastic properties." ) );
return false;
}
double overburdenHeight = stimPlanModel->overburdenHeight();
if ( overburdenHeight > 0.0 )

View File

@@ -161,13 +161,18 @@ bool RimStimPlanModelPressureCalculator::extractValuesForProperty( RiaDefines::C
else
{
// Extract the property we care about
RimStimPlanModelWellLogCalculator::extractValuesForProperty( pressureCurveProperty,
stimPlanModel,
timeStep,
values,
measuredDepthValues,
tvDepthValues,
rkbDiff );
if ( !RimStimPlanModelWellLogCalculator::extractValuesForProperty( pressureCurveProperty,
stimPlanModel,
timeStep,
values,
measuredDepthValues,
tvDepthValues,
rkbDiff ) )
{
RiaLogging::error( QString( "Unable to extract pressure values for property: %1" )
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
return false;
}
}
if ( targetTvds.size() != tvDepthValues.size() )