From 40bd4c285a57510d071323fba4f4c7c1d08fa57c Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Thu, 12 Aug 2021 06:40:31 +0200 Subject: [PATCH] Improve logging when extracting StimPlan well logs. --- .../RimStimPlanModelPressureCalculator.cpp | 3 ++- .../RimStimPlanModelWellLogCalculator.cpp | 23 ++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp index a456a1cc91..f9e58f695b 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelPressureCalculator.cpp @@ -619,7 +619,8 @@ bool RimStimPlanModelPressureCalculator::interpolateInitialPressureByEquilibrati // EQLNUM data has values for over/underburden, but the pressure values does not. if ( eqlNumValues.size() != ( values.size() + 4 ) ) { - RiaLogging::error( QString( "Failed to build EQLNUM pressure data: result length mismatch." ) ); + RiaLogging::error( + QString( "Failed to build EQLNUM pressure data for initial pressure: result length mismatch." ) ); RiaLogging::error( QString( "EQLNUM length: %1 PRESSURE length: %2" ).arg( eqlNumValues.size() ).arg( values.size() ) ); return false; diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp index 8b88e1fb73..e27ea48911 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModelWellLogCalculator.cpp @@ -24,6 +24,7 @@ #include "RigActiveCellInfo.h" #include "RigEclipseCaseData.h" +#include "RigEclipseResultAddress.h" #include "RigEclipseWellLogExtractor.h" #include "RigMainGrid.h" #include "RigResultAccessor.h" @@ -80,6 +81,8 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur std::vector& tvDepthValues, double& rkbDiff ) const { + RiaLogging::debug( + QString( "Calculating well log for '%1'." ).arg( caf::AppEnum( curveProperty ).uiText() ) ); std::deque missingValueStratgies = stimPlanModel->missingValueStrategies( curveProperty ); @@ -173,6 +176,9 @@ bool RimStimPlanModelWellLogCalculator::calculate( RiaDefines::CurveProperty cur scaleByNetToGross( stimPlanModel, netToGross, values ); } + RiaLogging::debug( QString( "Well log for '%1' done. Size: %2." ) + .arg( caf::AppEnum( curveProperty ).uiText() ) + .arg( values.size() ) ); return true; } @@ -357,7 +363,9 @@ void RimStimPlanModelWellLogCalculator::scaleByNetToGross( const RimStimPlanMode { if ( netToGross.size() != values.size() ) { - RiaLogging::error( QString( "Different sizes for net to gross calculation." ) ); + RiaLogging::error( QString( "Different sizes for net to gross calculation. NTG length: %1. Values length: %2" ) + .arg( netToGross.size() ) + .arg( values.size() ) ); return; } @@ -409,6 +417,9 @@ bool RimStimPlanModelWellLogCalculator::extractValuesForProperty( RiaDefines::Cu return false; } + RiaLogging::info( QString( "Extracting values for '%1' from grid '%2'." ) + .arg( caf::AppEnum( curveProperty ).uiText() ) + .arg( eclipseCase->caseUserDescription() ) ); RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" ); measuredDepthValues = eclExtractor.cellIntersectionMDs(); @@ -438,6 +449,10 @@ bool RimStimPlanModelWellLogCalculator::extractValuesForProperty( RiaDefines::Cu if ( resAcc.notNull() ) { eclExtractor.curveData( resAcc.p(), &values ); + RiaLogging::info( QString( "Extracted values %1 from grid '%2' for '%3'." ) + .arg( values.size() ) + .arg( eclipseCase->caseUserDescription() ) + .arg( caf::AppEnum( curveProperty ).uiText() ) ); } else { @@ -492,6 +507,8 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithDefault( RiaDefi RigEclipseWellLogExtractor eclExtractor( eclipseCase->eclipseCaseData(), wellPathGeometry, "fracture model" ); eclExtractor.curveData( backupResAcc.p(), &replacementValues ); + RiaLogging::debug( QString( "Read %1 values for '%2'" ).arg( replacementValues.size() ).arg( resultVariable ) ); + if ( values.empty() ) { values = replacementValues; @@ -530,6 +547,10 @@ bool RimStimPlanModelWellLogCalculator::replaceMissingValuesWithDefault( RiaDefi replaceMissingValues( values, replacementValues ); } } + else + { + RiaLogging::debug( "No backup result accessor found." ); + } // If the backup accessor is not found, or does not provide all the missing values: // use default value from the fracture model