mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5399 Export LAS-curves of WBS-parameters with the LAS-name rather than the Ui name
This commit is contained in:
parent
a399a843b0
commit
b40f3dcd39
@ -107,7 +107,7 @@ QString RimWellFlowRateCurve::wellName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellFlowRateCurve::wellLogChannelName() const
|
||||
QString RimWellFlowRateCurve::wellLogChannelUiName() const
|
||||
{
|
||||
return "AccumulatedFlowRate";
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
RimEclipseResultCase* rimCase();
|
||||
int timeStep();
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
QString wellLogChannelUiName() const override;
|
||||
|
||||
void setGroupId( int groupId );
|
||||
int groupId() const;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "RigFemResultAddress.h"
|
||||
#include "RigFormationNames.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigWbsParameter.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
|
||||
@ -624,6 +625,38 @@ QString RimGeoMechResultDefinition::resultComponentUiName() const
|
||||
return m_resultComponentName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGeoMechResultDefinition::resultVariableUiName() const
|
||||
{
|
||||
QString name = resultFieldName();
|
||||
QString resCompName = resultComponentName();
|
||||
|
||||
if ( !resCompName.isEmpty() )
|
||||
{
|
||||
name += "." + resCompName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGeoMechResultDefinition::resultVariableName() const
|
||||
{
|
||||
if ( m_resultPositionType == RIG_WELLPATH_DERIVED )
|
||||
{
|
||||
RigWbsParameter param;
|
||||
if ( RigWbsParameter::findParameter( resultFieldName(), ¶m ) )
|
||||
{
|
||||
QString lasName = param.sourceLabel( RigWbsParameter::LAS_FILE );
|
||||
if ( !lasName.isEmpty() ) return lasName;
|
||||
}
|
||||
}
|
||||
return resultVariableUiName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -66,6 +66,8 @@ public:
|
||||
|
||||
QString resultFieldUiName() const;
|
||||
QString resultComponentUiName() const;
|
||||
QString resultVariableUiName() const;
|
||||
QString resultVariableName() const;
|
||||
|
||||
bool hasCategoryResult() const
|
||||
{
|
||||
|
@ -155,6 +155,14 @@ const RigWellLogCurveData* RimWellLogCurve::curveData() const
|
||||
return m_curveData.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellLogCurve::wellLogChannelName() const
|
||||
{
|
||||
return wellLogChannelUiName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -62,8 +62,9 @@ public:
|
||||
|
||||
const RigWellLogCurveData* curveData() const;
|
||||
|
||||
virtual QString wellName() const = 0;
|
||||
virtual QString wellLogChannelName() const = 0;
|
||||
virtual QString wellName() const = 0;
|
||||
virtual QString wellLogChannelUiName() const = 0;
|
||||
virtual QString wellLogChannelName() const;
|
||||
virtual QString wellDate() const
|
||||
{
|
||||
return "";
|
||||
|
@ -454,10 +454,10 @@ void RimWellLogCurveCommonDataSource::updateCurvesAndTracks( const std::vector<R
|
||||
if ( wellPathToApply() != nullptr )
|
||||
{
|
||||
fileCurve->setWellPath( wellPathToApply() );
|
||||
if ( !fileCurve->wellLogChannelName().isEmpty() )
|
||||
if ( !fileCurve->wellLogChannelUiName().isEmpty() )
|
||||
{
|
||||
RimWellLogFile* logFile = wellPathToApply()->firstWellLogFileMatchingChannelName(
|
||||
fileCurve->wellLogChannelName() );
|
||||
fileCurve->wellLogChannelUiName() );
|
||||
fileCurve->setWellLogFile( logFile );
|
||||
RimWellLogPlot* parentPlot = nullptr;
|
||||
fileCurve->firstAncestorOrThisOfTypeAsserted( parentPlot );
|
||||
|
@ -877,9 +877,9 @@ QString RimWellLogExtractionCurve::createCurveAutoName()
|
||||
generatedCurveName.push_back( m_case->caseUserDescription() );
|
||||
}
|
||||
|
||||
if ( m_addPropertyToCurveName && !wellLogChannelName().isEmpty() )
|
||||
if ( m_addPropertyToCurveName && !wellLogChannelUiName().isEmpty() )
|
||||
{
|
||||
generatedCurveName.push_back( wellLogChannelName() );
|
||||
generatedCurveName.push_back( wellLogChannelUiName() );
|
||||
}
|
||||
|
||||
if ( m_addTimestepToCurveName || m_addDateToCurveName )
|
||||
@ -921,6 +921,27 @@ QString RimWellLogExtractionCurve::createCurveAutoName()
|
||||
return generatedCurveName.join( ", " );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellLogExtractionCurve::wellLogChannelUiName() const
|
||||
{
|
||||
RimGeoMechCase* geoMechCase = dynamic_cast<RimGeoMechCase*>( m_case.value() );
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case.value() );
|
||||
|
||||
QString name;
|
||||
if ( eclipseCase )
|
||||
{
|
||||
name = caf::Utils::makeValidFileBasename( m_eclipseResultDefinition->resultVariableUiShortName() );
|
||||
}
|
||||
else if ( geoMechCase )
|
||||
{
|
||||
name = m_geomResultDefinition->resultVariableUiName();
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -936,15 +957,7 @@ QString RimWellLogExtractionCurve::wellLogChannelName() const
|
||||
}
|
||||
else if ( geoMechCase )
|
||||
{
|
||||
QString resCompName = m_geomResultDefinition->resultComponentUiName();
|
||||
if ( resCompName.isEmpty() )
|
||||
{
|
||||
name = m_geomResultDefinition->resultFieldUiName();
|
||||
}
|
||||
else
|
||||
{
|
||||
name = m_geomResultDefinition->resultFieldUiName() + "." + resCompName;
|
||||
}
|
||||
name = caf::Utils::makeValidFileBasename( m_geomResultDefinition->resultVariableName() );
|
||||
}
|
||||
|
||||
return name;
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
|
||||
TrajectoryType trajectoryType() const;
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelUiName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
QString wellDate() const override;
|
||||
int branchIndex() const;
|
||||
|
@ -412,7 +412,7 @@ QString RimWellLogFileCurve::createCurveAutoName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellLogFileCurve::wellLogChannelName() const
|
||||
QString RimWellLogFileCurve::wellLogChannelUiName() const
|
||||
{
|
||||
return m_wellLogChannnelName;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
// Overrides from RimWellLogPlotCurve
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
QString wellLogChannelUiName() const override;
|
||||
|
||||
RimWellLogFile* wellLogFile() const;
|
||||
|
||||
|
@ -139,7 +139,7 @@ QString RimWellLogRftCurve::wellName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellLogRftCurve::wellLogChannelName() const
|
||||
QString RimWellLogRftCurve::wellLogChannelUiName() const
|
||||
{
|
||||
return m_wellLogChannelName().text();
|
||||
}
|
||||
@ -342,11 +342,11 @@ QString RimWellLogRftCurve::createCurveAutoName()
|
||||
{
|
||||
name.push_back( m_observedFmuRftData->name() );
|
||||
}
|
||||
if ( wellLogChannelName() !=
|
||||
if ( wellLogChannelUiName() !=
|
||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::text( RifEclipseRftAddress::NONE ) )
|
||||
{
|
||||
RifEclipseRftAddress::RftWellLogChannelType channelNameEnum =
|
||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::fromText( wellLogChannelName() );
|
||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::fromText( wellLogChannelUiName() );
|
||||
QString channelName = caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( channelNameEnum );
|
||||
channelName = RiaStatisticsTools::replacePercentileByPValueText( channelName );
|
||||
name.push_back( channelName );
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
~RimWellLogRftCurve() override;
|
||||
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
QString wellLogChannelUiName() const override;
|
||||
|
||||
void setEclipseResultCase( RimEclipseResultCase* eclipseResultCase );
|
||||
RimEclipseResultCase* eclipseResultCase() const;
|
||||
|
@ -2290,9 +2290,9 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
|
||||
caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) );
|
||||
|
||||
std::vector<QString> sourceNames =
|
||||
RigWbsParameter::PP_Reservoir().allSourceLabels( "\n",
|
||||
wbsPlot->userDefinedValue(
|
||||
RigWbsParameter::PP_NonReservoir() ) );
|
||||
RigWbsParameter::PP_Reservoir().allSourceUiLabels( "\n",
|
||||
wbsPlot->userDefinedValue(
|
||||
RigWbsParameter::PP_NonReservoir() ) );
|
||||
curveData.data = ppSourceRegions;
|
||||
|
||||
std::vector<QString> sourceNamesToPlot;
|
||||
@ -2316,9 +2316,9 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
|
||||
caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) );
|
||||
|
||||
std::vector<QString> sourceNames =
|
||||
RigWbsParameter::poissonRatio().allSourceLabels( "\n",
|
||||
wbsPlot->userDefinedValue(
|
||||
RigWbsParameter::poissonRatio() ) );
|
||||
RigWbsParameter::poissonRatio().allSourceUiLabels( "\n",
|
||||
wbsPlot->userDefinedValue(
|
||||
RigWbsParameter::poissonRatio() ) );
|
||||
curveData.data = poissonSourceRegions;
|
||||
|
||||
std::vector<QString> sourceNamesToPlot;
|
||||
@ -2342,7 +2342,7 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
|
||||
caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) );
|
||||
|
||||
std::vector<QString> sourceNames =
|
||||
RigWbsParameter::UCS().allSourceLabels( "\n", wbsPlot->userDefinedValue( RigWbsParameter::UCS() ) );
|
||||
RigWbsParameter::UCS().allSourceUiLabels( "\n", wbsPlot->userDefinedValue( RigWbsParameter::UCS() ) );
|
||||
|
||||
curveData.data = ucsSourceRegions;
|
||||
|
||||
@ -2374,11 +2374,11 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
{
|
||||
m_wellPathAttributePlotObjects.clear();
|
||||
|
||||
if ( wellPathAttributeSource())
|
||||
if ( wellPathAttributeSource() )
|
||||
{
|
||||
std::vector<const RimWellPathComponentInterface*> allWellPathComponents;
|
||||
|
||||
if ( wellPathAttributeSource()->wellPathGeometry() && (m_showWellPathAttributes || m_showWellPathCompletions ))
|
||||
if ( wellPathAttributeSource()->wellPathGeometry() && ( m_showWellPathAttributes || m_showWellPathCompletions ) )
|
||||
{
|
||||
m_wellPathAttributePlotObjects.push_back( std::unique_ptr<RiuWellPathComponentPlotItem>(
|
||||
new RiuWellPathComponentPlotItem( wellPathAttributeSource() ) ) );
|
||||
|
@ -272,7 +272,7 @@ QString RimWellMeasurementCurve::createCurveAutoName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellMeasurementCurve::wellLogChannelName() const
|
||||
QString RimWellMeasurementCurve::wellLogChannelUiName() const
|
||||
{
|
||||
// Does not really make sense for measurement curve.
|
||||
return QString( "" );
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
|
||||
// Overrides from RimWellLogPlotCurve
|
||||
QString wellName() const override;
|
||||
QString wellLogChannelName() const override;
|
||||
QString wellLogChannelUiName() const override;
|
||||
|
||||
protected:
|
||||
// Overrides from RimWellLogCurve
|
||||
|
@ -119,13 +119,13 @@ void RigWbsParameter::setOptionsExclusive( bool exclusive )
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString>
|
||||
RigWbsParameter::allSourceLabels( const QString& delimiter /*= " "*/,
|
||||
double userDefinedValue /*= std::numeric_limits<double>::infinity() */ )
|
||||
RigWbsParameter::allSourceUiLabels( const QString& delimiter /*= " "*/,
|
||||
double userDefinedValue /*= std::numeric_limits<double>::infinity() */ )
|
||||
{
|
||||
std::vector<QString> allLabels;
|
||||
for ( size_t i = 0; i < SourceEnum::size(); ++i )
|
||||
{
|
||||
allLabels.push_back( sourceLabel( SourceEnum::fromIndex( i ), delimiter, userDefinedValue ) );
|
||||
allLabels.push_back( sourceUiLabel( SourceEnum::fromIndex( i ), delimiter, userDefinedValue ) );
|
||||
}
|
||||
return allLabels;
|
||||
}
|
||||
@ -133,9 +133,9 @@ std::vector<QString>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RigWbsParameter::sourceLabel( Source currentSource,
|
||||
const QString& delimiter,
|
||||
double userDefinedValue /*= std::numeric_limits<double>::infinity() */ )
|
||||
QString RigWbsParameter::sourceUiLabel( Source currentSource,
|
||||
const QString& delimiter,
|
||||
double userDefinedValue /*= std::numeric_limits<double>::infinity() */ )
|
||||
{
|
||||
QString sourceLabel;
|
||||
if ( currentSource == USER_DEFINED )
|
||||
@ -150,6 +150,15 @@ QString RigWbsParameter::sourceLabel( Source currentSource,
|
||||
return sourceLabel;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RigWbsParameter::sourceLabel( Source source )
|
||||
{
|
||||
SourceAddress addr = address( source );
|
||||
return addr.primary;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -57,11 +57,12 @@ public:
|
||||
bool exclusiveOptions() const;
|
||||
void setOptionsExclusive( bool exclusive );
|
||||
|
||||
std::vector<QString> allSourceLabels( const QString& delimiter = " ",
|
||||
double userDefinedValue = std::numeric_limits<double>::infinity() );
|
||||
QString sourceLabel( Source currentSource,
|
||||
const QString& delimiter = " ",
|
||||
double userDefinedValue = std::numeric_limits<double>::infinity() );
|
||||
std::vector<QString> allSourceUiLabels( const QString& delimiter = " ",
|
||||
double userDefinedValue = std::numeric_limits<double>::infinity() );
|
||||
QString sourceUiLabel( Source currentSource,
|
||||
const QString& delimiter = " ",
|
||||
double userDefinedValue = std::numeric_limits<double>::infinity() );
|
||||
QString sourceLabel( Source currentSource );
|
||||
|
||||
bool operator==( const RigWbsParameter& rhs ) const;
|
||||
bool operator<( const RigWbsParameter& rhs ) const;
|
||||
|
Loading…
Reference in New Issue
Block a user