mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#9620 Pressure/depth data: add user interface.
This commit is contained in:
@@ -129,6 +129,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimRoffCase.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimEclipseCaseTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleEclipseResults.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimPressureDepthData.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -257,6 +258,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimRoffCase.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimEclipseCaseTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleEclipseResults.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimPressureDepthData.cpp
|
||||
)
|
||||
|
||||
if(RESINSIGHT_USE_QT_CHARTS)
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "RimObservedDataCollection.h"
|
||||
#include "RimObservedFmuRftData.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimPressureDepthData.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
@@ -486,6 +487,39 @@ std::vector<RimObservedFmuRftData*> RimWellPlotTools::observedFmuRftData()
|
||||
return {};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPressureDepthData*> RimWellPlotTools::pressureDepthDataForWell( const QString& simWellName )
|
||||
{
|
||||
std::vector<RimPressureDepthData*> observedDataForWell;
|
||||
std::vector<RimPressureDepthData*> allObservedData = pressureDepthData();
|
||||
for ( RimPressureDepthData* observedData : allObservedData )
|
||||
{
|
||||
if ( observedData->hasWell( simWellName ) )
|
||||
{
|
||||
observedDataForWell.push_back( observedData );
|
||||
}
|
||||
}
|
||||
return observedDataForWell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPressureDepthData*> RimWellPlotTools::pressureDepthData()
|
||||
{
|
||||
const RimProject* project = RimProject::current();
|
||||
RimObservedDataCollection* observedDataCollection =
|
||||
project->activeOilField() ? project->activeOilField()->observedDataCollection() : nullptr;
|
||||
|
||||
if ( observedDataCollection )
|
||||
{
|
||||
return observedDataCollection->allPressureDepthData();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -588,6 +622,7 @@ RiaRftPltCurveDefinition RimWellPlotTools::curveDefFromCurve( const RimWellLogCu
|
||||
RimSummaryCase* rftSummaryCase = rftCurve->summaryCase();
|
||||
RimSummaryCaseCollection* rftEnsemble = rftCurve->ensemble();
|
||||
RimObservedFmuRftData* rftFmuData = rftCurve->observedFmuRftData();
|
||||
RimPressureDepthData* pressureDepthData = rftCurve->pressureDepthData();
|
||||
|
||||
const RifEclipseRftAddress rftAddress = rftCurve->rftAddress();
|
||||
const QString& wellName = rftAddress.wellName();
|
||||
@@ -620,6 +655,13 @@ RiaRftPltCurveDefinition RimWellPlotTools::curveDefFromCurve( const RimWellLogCu
|
||||
wellName,
|
||||
timeStep );
|
||||
}
|
||||
else if ( pressureDepthData != nullptr )
|
||||
{
|
||||
return RiaRftPltCurveDefinition( RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED_FMU_RFT,
|
||||
pressureDepthData ),
|
||||
wellName,
|
||||
timeStep );
|
||||
}
|
||||
}
|
||||
else if ( gridCurve != nullptr )
|
||||
{
|
||||
@@ -765,6 +807,20 @@ std::set<RiaRftPltCurveDefinition>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RimPressureDepthData* pressureDepthData = addr.pressureDepthData();
|
||||
if ( pressureDepthData && pressureDepthData->rftReader() )
|
||||
{
|
||||
std::set<QDateTime> timeSteps =
|
||||
pressureDepthData->rftReader()->availableTimeSteps( wellPathNameOrSimWellName );
|
||||
for ( const QDateTime& time : timeSteps )
|
||||
{
|
||||
if ( selectedTimeStepSet.count( time ) )
|
||||
{
|
||||
curveDefs.insert( RiaRftPltCurveDefinition( addr, wellPathNameOrSimWellName, time ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( addr.ensemble() )
|
||||
{
|
||||
@@ -1082,13 +1138,27 @@ std::map<QDateTime, std::set<RifDataSourceForRftPlt>> RimWellPlotTools::calculat
|
||||
{
|
||||
observedTimeStepsWithSources[source.wellLogFile()->date()].insert( source );
|
||||
}
|
||||
else if ( source.sourceType() == RifDataSourceForRftPlt::OBSERVED_FMU_RFT && source.observedFmuRftData() )
|
||||
else if ( source.sourceType() == RifDataSourceForRftPlt::OBSERVED_FMU_RFT )
|
||||
{
|
||||
std::set<QDateTime> rftFmuTimes =
|
||||
source.observedFmuRftData()->rftReader()->availableTimeSteps( wellPathNameOrSimWellName );
|
||||
for ( const QDateTime& date : rftFmuTimes )
|
||||
{
|
||||
observedTimeStepsWithSources[date].insert( source );
|
||||
if ( source.observedFmuRftData() )
|
||||
{
|
||||
std::set<QDateTime> rftFmuTimes =
|
||||
source.observedFmuRftData()->rftReader()->availableTimeSteps( wellPathNameOrSimWellName );
|
||||
for ( const QDateTime& date : rftFmuTimes )
|
||||
{
|
||||
observedTimeStepsWithSources[date].insert( source );
|
||||
}
|
||||
}
|
||||
else if ( source.pressureDepthData() )
|
||||
{
|
||||
std::set<QDateTime> rftFmuTimes =
|
||||
source.pressureDepthData()->rftReader()->availableTimeSteps( wellPathNameOrSimWellName );
|
||||
for ( const QDateTime& date : rftFmuTimes )
|
||||
{
|
||||
observedTimeStepsWithSources[date].insert( source );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ class RimWellLogCurve;
|
||||
class RimWellLogFileChannel;
|
||||
class RimWellLogPlot;
|
||||
class RimWellPath;
|
||||
class RimPressureDepthData;
|
||||
class RiuWellRftPlot;
|
||||
class RigEclipseCaseData;
|
||||
class RigEclipseResultAddress;
|
||||
@@ -134,6 +135,9 @@ public:
|
||||
|
||||
static bool hasFlowData( const RimWellPath* wellPath );
|
||||
|
||||
static std::vector<RimPressureDepthData*> pressureDepthData();
|
||||
static std::vector<RimPressureDepthData*> pressureDepthDataForWell( const QString& simWellName );
|
||||
|
||||
private:
|
||||
friend class StaticFieldsInitializer;
|
||||
static const std::set<QString> PRESSURE_DATA_NAMES;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "RimEnsembleCurveSetColorManager.h"
|
||||
#include "RimObservedFmuRftData.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimPressureDepthData.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
@@ -516,11 +517,18 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
|
||||
else if ( curveDefToAdd.address().sourceType() == RifDataSourceForRftPlt::OBSERVED_FMU_RFT )
|
||||
{
|
||||
auto curve = new RimWellLogRftCurve();
|
||||
curve->setErrorBarsVisible( m_showErrorInObservedData );
|
||||
plotTrack->addCurve( curve );
|
||||
|
||||
auto observedFmuRftData = curveDefToAdd.address().observedFmuRftData();
|
||||
curve->setObservedFmuRftData( observedFmuRftData );
|
||||
if ( auto observedFmuRftData = curveDefToAdd.address().observedFmuRftData() )
|
||||
{
|
||||
curve->setErrorBarsVisible( m_showErrorInObservedData );
|
||||
curve->setObservedFmuRftData( observedFmuRftData );
|
||||
}
|
||||
else if ( auto pressureDepthData = curveDefToAdd.address().pressureDepthData() )
|
||||
{
|
||||
curve->setPressureDepthData( pressureDepthData );
|
||||
}
|
||||
|
||||
RifEclipseRftAddress address =
|
||||
RifEclipseRftAddress::createAddress( m_wellPathNameOrSimWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
@@ -851,6 +859,22 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions( const caf::
|
||||
options.push_back( item );
|
||||
}
|
||||
}
|
||||
const std::vector<RimPressureDepthData*> pressureDepthData =
|
||||
RimWellPlotTools::pressureDepthDataForWell( m_wellPathNameOrSimWellName );
|
||||
if ( !pressureDepthData.empty() )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo::createHeader( RifDataSourceForRftPlt::sourceTypeUiText(
|
||||
RifDataSourceForRftPlt::OBSERVED_FMU_RFT ),
|
||||
true ) );
|
||||
|
||||
for ( const auto& pd : pressureDepthData )
|
||||
{
|
||||
auto addr = RifDataSourceForRftPlt( RifDataSourceForRftPlt::OBSERVED_FMU_RFT, pd );
|
||||
auto item = caf::PdmOptionItemInfo( pd->name(), QVariant::fromValue( addr ) );
|
||||
item.setLevel( 1 );
|
||||
options.push_back( item );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_selectedTimeSteps )
|
||||
{
|
||||
|
||||
@@ -1131,6 +1131,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
|
||||
menuBuilder << "RicImportObservedDataFeature";
|
||||
menuBuilder << "RicImportObservedFmuDataFeature";
|
||||
menuBuilder << "RicImportPressureDepthDataFeature";
|
||||
menuBuilder << "RicRenameSummaryCaseFeature";
|
||||
menuBuilder << "RicReloadSummaryCaseFeature";
|
||||
menuBuilder << "RicReplaceSummaryCaseFeature";
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "RimObservedEclipseUserData.h"
|
||||
#include "RimObservedFmuRftData.h"
|
||||
#include "RimObservedSummaryData.h"
|
||||
#include "RimPressureDepthData.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryObservedDataFile.h"
|
||||
|
||||
@@ -53,8 +54,10 @@ RimObservedDataCollection::RimObservedDataCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_observedDataArray, "ObservedDataArray", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_observedFmuRftArray, "ObservedFmuRftDataArray", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_observedPressureDepthArray, "PressureDepthDataArray", "" );
|
||||
m_observedDataArray.uiCapability()->setUiTreeHidden( true );
|
||||
m_observedFmuRftArray.uiCapability()->setUiTreeHidden( true );
|
||||
m_observedPressureDepthArray.uiCapability()->setUiTreeHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -64,6 +67,7 @@ RimObservedDataCollection::~RimObservedDataCollection()
|
||||
{
|
||||
m_observedDataArray.deleteChildren();
|
||||
m_observedFmuRftArray.deleteChildren();
|
||||
m_observedPressureDepthArray.deleteChildren();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -100,6 +104,14 @@ std::vector<RimObservedFmuRftData*> RimObservedDataCollection::allObservedFmuRft
|
||||
return m_observedFmuRftArray.children();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPressureDepthData*> RimObservedDataCollection::allPressureDepthData() const
|
||||
{
|
||||
return m_observedPressureDepthArray.children();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -249,3 +261,22 @@ RimObservedFmuRftData* RimObservedDataCollection::createAndAddFmuRftDataFromPath
|
||||
|
||||
return fmuRftData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPressureDepthData* RimObservedDataCollection::createAndAddPressureDepthDataFromPath( const QString& filePath )
|
||||
{
|
||||
QString name = QString( "Imported Pressure/Depth Data %1" ).arg( m_observedPressureDepthArray.size() + 1 );
|
||||
|
||||
RimPressureDepthData* data = new RimPressureDepthData;
|
||||
data->setFilePath( filePath );
|
||||
data->createRftReaderInterface();
|
||||
data->setName( name );
|
||||
m_observedPressureDepthArray.push_back( data );
|
||||
|
||||
updateNewObservedDataCreated( data );
|
||||
this->updateConnectedEditors();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
class RimObservedFmuRftData;
|
||||
class RimObservedSummaryData;
|
||||
class QFile;
|
||||
class RimPressureDepthData;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -44,8 +44,10 @@ public:
|
||||
bool useSavedFieldsValuesInDialog,
|
||||
QString* errorText = nullptr );
|
||||
RimObservedFmuRftData* createAndAddFmuRftDataFromPath( const QString& directoryPath );
|
||||
RimPressureDepthData* createAndAddPressureDepthDataFromPath( const QString& fileName );
|
||||
std::vector<RimObservedSummaryData*> allObservedSummaryData() const;
|
||||
std::vector<RimObservedFmuRftData*> allObservedFmuRftData() const;
|
||||
std::vector<RimPressureDepthData*> allPressureDepthData() const;
|
||||
|
||||
private:
|
||||
bool fileExists( const QString& fileName, QString* errorText = nullptr );
|
||||
@@ -53,4 +55,5 @@ private:
|
||||
private:
|
||||
caf::PdmChildArrayField<RimObservedSummaryData*> m_observedDataArray;
|
||||
caf::PdmChildArrayField<RimObservedFmuRftData*> m_observedFmuRftArray;
|
||||
caf::PdmChildArrayField<RimPressureDepthData*> m_observedPressureDepthArray;
|
||||
};
|
||||
|
||||
112
ApplicationLibCode/ProjectDataModel/RimPressureDepthData.cpp
Normal file
112
ApplicationLibCode/ProjectDataModel/RimPressureDepthData.cpp
Normal file
@@ -0,0 +1,112 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimPressureDepthData.h"
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
CAF_PDM_SOURCE_INIT( RimPressureDepthData, "ObservedPressureDepthData" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPressureDepthData::RimPressureDepthData()
|
||||
{
|
||||
CAF_PDM_InitObject( "Observed Pressure/Depth Data", ":/ObservedRFTDataFile16x16.png" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_filePath, "File", "File" );
|
||||
m_filePath.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_wells, "Wells", "Wells" );
|
||||
m_wells.xmlCapability()->disableIO();
|
||||
m_wells.uiCapability()->setUiReadOnly( true );
|
||||
m_wells.registerGetMethod( this, &RimPressureDepthData::wells );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPressureDepthData::setFilePath( const QString& path )
|
||||
{
|
||||
m_filePath = path;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPressureDepthData::createRftReaderInterface()
|
||||
{
|
||||
m_fmuRftReader = new RifReaderPressureDepthData( m_filePath );
|
||||
m_fmuRftReader->load();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifReaderRftInterface* RimPressureDepthData::rftReader()
|
||||
{
|
||||
if ( m_fmuRftReader.isNull() )
|
||||
{
|
||||
createRftReaderInterface();
|
||||
}
|
||||
|
||||
return m_fmuRftReader.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPressureDepthData::hasWell( const QString& wellPathName ) const
|
||||
{
|
||||
std::vector<QString> allWells = wells();
|
||||
for ( const QString& well : allWells )
|
||||
{
|
||||
if ( well == wellPathName )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RimPressureDepthData::wells() const
|
||||
{
|
||||
if ( m_fmuRftReader.p() )
|
||||
{
|
||||
std::set<QString> wellNames = const_cast<RifReaderPressureDepthData*>( m_fmuRftReader.p() )->wellNames();
|
||||
return std::vector<QString>( wellNames.begin(), wellNames.end() );
|
||||
}
|
||||
return std::vector<QString>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RimPressureDepthData::labels( const RifEclipseRftAddress& rftAddress )
|
||||
{
|
||||
if ( m_fmuRftReader.p() )
|
||||
{
|
||||
return const_cast<RifReaderPressureDepthData*>( m_fmuRftReader.p() )->labels( rftAddress );
|
||||
}
|
||||
return {};
|
||||
}
|
||||
51
ApplicationLibCode/ProjectDataModel/RimPressureDepthData.h
Normal file
51
ApplicationLibCode/ProjectDataModel/RimPressureDepthData.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2019- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifReaderFmuRft.h"
|
||||
|
||||
#include "RimNamedObject.h"
|
||||
|
||||
#include "RifReaderPressureDepthData.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmProxyValueField.h"
|
||||
|
||||
class RimPressureDepthData : public RimNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimPressureDepthData();
|
||||
|
||||
void setFilePath( const QString& path );
|
||||
void createRftReaderInterface();
|
||||
RifReaderRftInterface* rftReader();
|
||||
|
||||
bool hasWell( const QString& wellPathName ) const;
|
||||
std::vector<QString> wells() const;
|
||||
std::vector<QString> labels( const RifEclipseRftAddress& rftAddress );
|
||||
|
||||
private:
|
||||
cvf::ref<RifReaderPressureDepthData> m_fmuRftReader;
|
||||
|
||||
caf::PdmField<QString> m_filePath;
|
||||
caf::PdmProxyValueField<std::vector<QString>> m_wells;
|
||||
};
|
||||
@@ -161,6 +161,9 @@ RimWellLogRftCurve::RimWellLogRftCurve()
|
||||
CAF_PDM_InitFieldNoDefault( &m_observedFmuRftData, "ObservedFmuRftData", "Observed FMU RFT Data" );
|
||||
m_observedFmuRftData.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_pressureDepthData, "PressureDepthData", "Pressure Depth Data" );
|
||||
m_pressureDepthData.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_timeStep, "TimeStep", "Time Step" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellName, "WellName", "Well Name" );
|
||||
@@ -320,6 +323,22 @@ RimObservedFmuRftData* RimWellLogRftCurve::observedFmuRftData() const
|
||||
return m_observedFmuRftData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogRftCurve::setPressureDepthData( RimPressureDepthData* observedFmuRftData )
|
||||
{
|
||||
m_pressureDepthData = observedFmuRftData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPressureDepthData* RimWellLogRftCurve::pressureDepthData() const
|
||||
{
|
||||
return m_pressureDepthData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -671,6 +690,12 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
unitSystem = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
perPointLabels = this->perPointLabels();
|
||||
}
|
||||
else if ( m_pressureDepthData )
|
||||
{
|
||||
// TODO: Read unit system for pressure data
|
||||
unitSystem = RiaDefines::EclipseUnitSystem::UNITS_METRIC;
|
||||
// perPointLabels = this->perPointLabels();
|
||||
}
|
||||
else
|
||||
{
|
||||
CVF_ASSERT( false && "Need to have either an eclipse result case, a summary case or an ensemble" );
|
||||
@@ -1002,6 +1027,11 @@ RifReaderRftInterface* RimWellLogRftCurve::rftReader() const
|
||||
return m_observedFmuRftData()->rftReader();
|
||||
}
|
||||
|
||||
if ( m_pressureDepthData() )
|
||||
{
|
||||
return m_pressureDepthData()->rftReader();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1278,6 +1308,12 @@ std::vector<double> RimWellLogRftCurve::measuredDepthValues()
|
||||
return values;
|
||||
}
|
||||
|
||||
if ( m_pressureDepthData && !m_ensemble && !m_summaryCase )
|
||||
{
|
||||
// Pressure depth data does not have MD
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<double> measuredDepthForCells;
|
||||
|
||||
RigEclipseWellLogExtractor* eclExtractor = extractor();
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimPressureDepthData.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
|
||||
#include "RifEclipseRftAddress.h"
|
||||
@@ -38,6 +39,7 @@ class RimObservedFmuRftData;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryCaseCollection;
|
||||
class RimWellPath;
|
||||
class RimPressureDepthData;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -91,6 +93,9 @@ public:
|
||||
void setObservedFmuRftData( RimObservedFmuRftData* observedFmuRftData );
|
||||
RimObservedFmuRftData* observedFmuRftData() const;
|
||||
|
||||
void setPressureDepthData( RimPressureDepthData* observedFmuRftData );
|
||||
RimPressureDepthData* pressureDepthData() const;
|
||||
|
||||
void setRftAddress( RifEclipseRftAddress address );
|
||||
RifEclipseRftAddress rftAddress() const;
|
||||
|
||||
@@ -149,6 +154,7 @@ private:
|
||||
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
||||
caf::PdmPtrField<RimSummaryCaseCollection*> m_ensemble;
|
||||
caf::PdmPtrField<RimObservedFmuRftData*> m_observedFmuRftData;
|
||||
caf::PdmPtrField<RimPressureDepthData*> m_pressureDepthData;
|
||||
caf::PdmField<QDateTime> m_timeStep;
|
||||
caf::PdmField<QString> m_wellName;
|
||||
caf::PdmField<int> m_branchIndex;
|
||||
|
||||
Reference in New Issue
Block a user