mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#820 Export of TVD along with MD to LAS file
Now the tvd data is always put into the RigWellLogCurveData Existing tvd data is written to LAS file.
This commit is contained in:
@@ -218,15 +218,8 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
|||||||
|
|
||||||
if (eclExtractor.notNull())
|
if (eclExtractor.notNull())
|
||||||
{
|
{
|
||||||
RimWellLogPlot* wellLogPlot;
|
|
||||||
firstAnchestorOrThisOfType(wellLogPlot);
|
|
||||||
CVF_ASSERT(wellLogPlot);
|
|
||||||
|
|
||||||
measuredDepthValues = eclExtractor->measuredDepth();
|
measuredDepthValues = eclExtractor->measuredDepth();
|
||||||
if (wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
tvDepthValues = eclExtractor->trueVerticalDepth();
|
||||||
{
|
|
||||||
tvDepthValues = eclExtractor->trueVerticalDepth();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_eclipseResultDefinition->loadResult();
|
m_eclipseResultDefinition->loadResult();
|
||||||
|
|
||||||
@@ -251,15 +244,9 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
|||||||
}
|
}
|
||||||
else if (geomExtractor.notNull()) // geomExtractor
|
else if (geomExtractor.notNull()) // geomExtractor
|
||||||
{
|
{
|
||||||
RimWellLogPlot* wellLogPlot;
|
|
||||||
firstAnchestorOrThisOfType(wellLogPlot);
|
|
||||||
CVF_ASSERT(wellLogPlot);
|
|
||||||
|
|
||||||
measuredDepthValues = geomExtractor->measuredDepth();
|
measuredDepthValues = geomExtractor->measuredDepth();
|
||||||
if (wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
tvDepthValues = geomExtractor->trueVerticalDepth();
|
||||||
{
|
|
||||||
tvDepthValues = geomExtractor->trueVerticalDepth();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_geomResultDefinition->loadResult();
|
m_geomResultDefinition->loadResult();
|
||||||
|
|
||||||
@@ -283,12 +270,19 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
|||||||
|
|
||||||
RimWellLogPlot* wellLogPlot;
|
RimWellLogPlot* wellLogPlot;
|
||||||
firstAnchestorOrThisOfType(wellLogPlot);
|
firstAnchestorOrThisOfType(wellLogPlot);
|
||||||
if (wellLogPlot)
|
CVF_ASSERT(wellLogPlot);
|
||||||
|
|
||||||
|
displayUnit = wellLogPlot->depthUnit();
|
||||||
|
|
||||||
|
if(wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
||||||
{
|
{
|
||||||
displayUnit = wellLogPlot->depthUnit();
|
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->trueDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->measuredDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
|
||||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||||
|
|
||||||
zoomAllParentPlot();
|
zoomAllParentPlot();
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ void RimWellLogFileCurve::onLoadDataAndUpdate()
|
|||||||
displayUnit = wellLogPlot->depthUnit();
|
displayUnit = wellLogPlot->depthUnit();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->measuredDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||||
|
|
||||||
zoomAllParentPlot();
|
zoomAllParentPlot();
|
||||||
|
|||||||
@@ -102,6 +102,14 @@ const std::vector<double>& RigWellLogCurveData::measuredDepths() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const std::vector<double>& RigWellLogCurveData::tvDepths() const
|
||||||
|
{
|
||||||
|
return m_tvDepths;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -116,12 +124,12 @@ std::vector<double> RigWellLogCurveData::xPlotValues() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double> RigWellLogCurveData::depthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const
|
std::vector<double> RigWellLogCurveData::trueDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const
|
||||||
{
|
{
|
||||||
std::vector<double> filteredValues;
|
std::vector<double> filteredValues;
|
||||||
if (m_tvDepths.size())
|
if(m_tvDepths.size())
|
||||||
{
|
{
|
||||||
if (destinationDepthUnit == m_depthUnit)
|
if(destinationDepthUnit == m_depthUnit)
|
||||||
{
|
{
|
||||||
RigCurveDataTools::getValuesByIntervals(m_tvDepths, m_intervalsOfContinousValidValues, &filteredValues);
|
RigCurveDataTools::getValuesByIntervals(m_tvDepths, m_intervalsOfContinousValidValues, &filteredValues);
|
||||||
}
|
}
|
||||||
@@ -131,17 +139,25 @@ std::vector<double> RigWellLogCurveData::depthPlotValues(RimDefines::DepthUnitTy
|
|||||||
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
|
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return filteredValues;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RigWellLogCurveData::measuredDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const
|
||||||
|
{
|
||||||
|
std::vector<double> filteredValues;
|
||||||
|
|
||||||
|
if(destinationDepthUnit == m_depthUnit)
|
||||||
|
{
|
||||||
|
RigCurveDataTools::getValuesByIntervals(m_measuredDepths, m_intervalsOfContinousValidValues, &filteredValues);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (destinationDepthUnit == m_depthUnit)
|
std::vector<double> convertedValues = convertDepthValues(destinationDepthUnit, m_measuredDepths);
|
||||||
{
|
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
|
||||||
RigCurveDataTools::getValuesByIntervals(m_measuredDepths, m_intervalsOfContinousValidValues, &filteredValues);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::vector<double> convertedValues = convertDepthValues(destinationDepthUnit, m_measuredDepths);
|
|
||||||
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return filteredValues;
|
return filteredValues;
|
||||||
|
|||||||
@@ -49,12 +49,14 @@ public:
|
|||||||
|
|
||||||
const std::vector<double>& xValues() const;
|
const std::vector<double>& xValues() const;
|
||||||
const std::vector<double>& measuredDepths() const;
|
const std::vector<double>& measuredDepths() const;
|
||||||
|
const std::vector<double>& tvDepths() const;
|
||||||
bool calculateMDRange(double* minMD, double* maxMD) const;
|
bool calculateMDRange(double* minMD, double* maxMD) const;
|
||||||
|
|
||||||
RimDefines::DepthUnitType depthUnit() const;
|
RimDefines::DepthUnitType depthUnit() const;
|
||||||
|
|
||||||
std::vector<double> xPlotValues() const;
|
std::vector<double> xPlotValues() const;
|
||||||
std::vector<double> depthPlotValues(RimDefines::DepthUnitType displayDepthUnit) const;
|
std::vector<double> trueDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const;
|
||||||
|
std::vector<double> measuredDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const;
|
||||||
std::vector< std::pair<size_t, size_t> > polylineStartStopIndices() const;
|
std::vector< std::pair<size_t, size_t> > polylineStartStopIndices() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogCurve* curve, const QString
|
|||||||
else if (curveData->depthUnit() == RimDefines::UNIT_FEET)
|
else if (curveData->depthUnit() == RimDefines::UNIT_FEET)
|
||||||
{
|
{
|
||||||
lasFile.AddLog("DEPTH", "FT", "Depth in feet", curveData->measuredDepths());
|
lasFile.AddLog("DEPTH", "FT", "Depth in feet", curveData->measuredDepths());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(curveData->tvDepths().size())
|
||||||
|
{
|
||||||
|
lasFile.AddLog("TVD", "M", "True vertical depth in meters", curveData->tvDepths());
|
||||||
}
|
}
|
||||||
|
|
||||||
lasFile.AddLog(wellLogChannelName.trimmed().toStdString(), "NO_UNIT", "", wellLogValues);
|
lasFile.AddLog(wellLogChannelName.trimmed().toStdString(), "NO_UNIT", "", wellLogValues);
|
||||||
|
|||||||
Reference in New Issue
Block a user