mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8103 Ensemble Well Logs: Index_K not available as property for geogrid
Made "Index K" available for grdecl, fixed crash, and disabled the depth equalization when "Index K" is missing in the las files. Fixes #8103.
This commit is contained in:
@@ -472,6 +472,9 @@ void RimEnsembleWellLogCurveSet::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
uiOrdering.add( &m_ensembleCurveSet );
|
||||
uiOrdering.add( &m_depthEqualization );
|
||||
|
||||
bool hasKLayerIndex = hasPropertyInFile( RiaResultNames::indexKResultName() );
|
||||
m_depthEqualization.uiCapability()->setUiReadOnly( !hasKLayerIndex );
|
||||
|
||||
appendColorGroup( uiOrdering );
|
||||
|
||||
{
|
||||
@@ -1265,3 +1268,27 @@ cvf::ref<RigWellPathFormations>
|
||||
new RigWellPathFormations( wellPathFormationItems, unusedFilePath, "Ensemble formation" );
|
||||
return wellPathFormations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEnsembleWellLogCurveSet::hasPropertyInFile( const QString& property ) const
|
||||
{
|
||||
RimEnsembleWellLogs* group = m_ensembleWellLogs;
|
||||
if ( !group ) return false;
|
||||
|
||||
std::vector<RimWellLogFile*> allWellLogFiles = group->wellLogFiles();
|
||||
for ( auto& wellLogFile : allWellLogFiles )
|
||||
{
|
||||
QString errorMessage;
|
||||
if ( !wellLogFile->readFile( &errorMessage ) ) return false;
|
||||
|
||||
RigWellLogFile* wellLogDataFile = wellLogFile->wellLogFileData();
|
||||
CVF_ASSERT( wellLogDataFile );
|
||||
|
||||
std::vector<double> values = wellLogDataFile->values( RiaResultNames::indexKResultName() );
|
||||
if ( values.empty() ) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user