mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1982 RFT plot. Support for TVDMSL when showing well log file curve
This commit is contained in:
@@ -90,10 +90,23 @@ void RimWellLogFileCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
if (wellLogFile)
|
if (wellLogFile)
|
||||||
{
|
{
|
||||||
std::vector<double> values = wellLogFile->values(m_wellLogChannnelName);
|
std::vector<double> values = wellLogFile->values(m_wellLogChannnelName);
|
||||||
|
|
||||||
std::vector<double> measuredDepthValues = wellLogFile->depthValues();
|
std::vector<double> measuredDepthValues = wellLogFile->depthValues();
|
||||||
|
|
||||||
if (wellLogPlot && wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
if (wellLogPlot && wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
||||||
|
{
|
||||||
|
bool canUseTvd = false;
|
||||||
|
if (wellLogFile->hasTvdChannel())
|
||||||
|
{
|
||||||
|
std::vector<double> tvdMslValues = wellLogFile->tvdMslValues();
|
||||||
|
|
||||||
|
if (values.size() == measuredDepthValues.size() && values.size() == tvdMslValues.size())
|
||||||
|
{
|
||||||
|
m_curveData->setValuesWithTVD(values, measuredDepthValues, tvdMslValues, wellLogFile->depthUnit(), false);
|
||||||
|
canUseTvd = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!canUseTvd)
|
||||||
{
|
{
|
||||||
RigWellPath* rigWellPath = m_wellPath->wellPathGeometry();
|
RigWellPath* rigWellPath = m_wellPath->wellPathGeometry();
|
||||||
if (rigWellPath)
|
if (rigWellPath)
|
||||||
@@ -107,9 +120,12 @@ void RimWellLogFileCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
if (values.size() == trueVerticeldepthValues.size() && values.size() == measuredDepthValues.size())
|
if (values.size() == trueVerticeldepthValues.size() && values.size() == measuredDepthValues.size())
|
||||||
{
|
{
|
||||||
m_curveData->setValuesWithTVD(values, measuredDepthValues, trueVerticeldepthValues, wellLogFile->depthUnit(), false);
|
m_curveData->setValuesWithTVD(values, measuredDepthValues, trueVerticeldepthValues, wellLogFile->depthUnit(), false);
|
||||||
|
canUseTvd = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
|
||||||
|
if (!canUseTvd)
|
||||||
{
|
{
|
||||||
if (RiaApplication::instance()->preferences()->showLasCurveWithoutTvdWarning())
|
if (RiaApplication::instance()->preferences()->showLasCurveWithoutTvdWarning())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ bool RigWellLogFile::open(const QString& fileName, QString* errorMessage)
|
|||||||
{
|
{
|
||||||
m_depthLogName = logName;
|
m_depthLogName = logName;
|
||||||
}
|
}
|
||||||
|
else if (logName.toUpper() == "TVDMSL")
|
||||||
|
{
|
||||||
|
m_tvdMslLogName = logName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_wellLogChannelNames = wellLogNames;
|
m_wellLogChannelNames = wellLogNames;
|
||||||
@@ -172,6 +176,14 @@ std::vector<double> RigWellLogFile::depthValues() const
|
|||||||
return values(m_depthLogName);
|
return values(m_depthLogName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RigWellLogFile::tvdMslValues() const
|
||||||
|
{
|
||||||
|
return values(m_tvdMslLogName);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -339,6 +351,14 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogCurve* curve, const QString
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RigWellLogFile::hasTvdChannel() const
|
||||||
|
{
|
||||||
|
return !m_tvdMslLogName.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public:
|
|||||||
QStringList wellLogChannelNames() const;
|
QStringList wellLogChannelNames() const;
|
||||||
|
|
||||||
std::vector<double> depthValues() const;
|
std::vector<double> depthValues() const;
|
||||||
|
std::vector<double> tvdMslValues() const;
|
||||||
std::vector<double> values(const QString& name) const;
|
std::vector<double> values(const QString& name) const;
|
||||||
|
|
||||||
QString wellLogChannelUnitString(const QString& wellLogChannelName, RiaDefines::DepthUnitType displayDepthUnit) const;
|
QString wellLogChannelUnitString(const QString& wellLogChannelName, RiaDefines::DepthUnitType displayDepthUnit) const;
|
||||||
@@ -57,6 +58,8 @@ public:
|
|||||||
|
|
||||||
static bool exportToLasFile(const RimWellLogCurve* curve, const QString& fileName);
|
static bool exportToLasFile(const RimWellLogCurve* curve, const QString& fileName);
|
||||||
|
|
||||||
|
bool hasTvdChannel() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void close();
|
void close();
|
||||||
QString depthUnitString() const;
|
QString depthUnitString() const;
|
||||||
@@ -64,4 +67,5 @@ private:
|
|||||||
NRLib::Well* m_wellLogFile;
|
NRLib::Well* m_wellLogFile;
|
||||||
QStringList m_wellLogChannelNames;
|
QStringList m_wellLogChannelNames;
|
||||||
QString m_depthLogName;
|
QString m_depthLogName;
|
||||||
|
QString m_tvdMslLogName;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user