mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#538) Added DepthUnitType enum containing meter and feet
This commit is contained in:
@@ -44,6 +44,14 @@ namespace caf
|
||||
setDefault(RimDefines::MATRIX_MODEL);
|
||||
}
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RimDefines::DepthUnitType >::setUp()
|
||||
{
|
||||
addItem(RimDefines::UNIT_METER, "UNIT_METER", "Meter");
|
||||
addItem(RimDefines::UNIT_FEET, "UNIT_FEET", "Feet");
|
||||
|
||||
setDefault(RimDefines::UNIT_METER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,5 +71,11 @@ public:
|
||||
static QString mockModelCustomized() { return "Result Mock Debug Model Customized"; }
|
||||
static QString mockModelBasicInputCase() { return "Input Mock Debug Model Simple"; }
|
||||
|
||||
enum DepthUnitType
|
||||
{
|
||||
UNIT_METER,
|
||||
UNIT_FEET
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
std::vector<double> measuredDepthValues;
|
||||
std::vector<double> tvDepthValues;
|
||||
|
||||
RimDefines::DepthUnitType depthUnit = RimDefines::UNIT_METER;
|
||||
|
||||
if (eclExtractor.notNull())
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
@@ -224,6 +226,14 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
{
|
||||
eclExtractor->curveData(resAcc.p(), &values);
|
||||
}
|
||||
|
||||
RigCaseData::UnitsType eclipseUnitsType = eclipseCase->reservoirData()->unitsType();
|
||||
if (eclipseUnitsType == RigCaseData::UNITS_FIELD)
|
||||
{
|
||||
// See https://github.com/OPM/ResInsight/issues/538
|
||||
|
||||
depthUnit = RimDefines::UNIT_FEET;
|
||||
}
|
||||
}
|
||||
else if (geomExtractor.notNull()) // geomExtractor
|
||||
{
|
||||
@@ -247,11 +257,11 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
{
|
||||
if (!tvDepthValues.size())
|
||||
{
|
||||
m_curveData->setValuesAndMD(values, measuredDepthValues, true);
|
||||
m_curveData->setValuesAndMD(values, measuredDepthValues, depthUnit, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_curveData->setValuesWithTVD(values, measuredDepthValues, tvDepthValues);
|
||||
m_curveData->setValuesWithTVD(values, measuredDepthValues, tvDepthValues, depthUnit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ void RimWellLogFileCurve::updatePlotData()
|
||||
|
||||
if (values.size() == depthValues.size())
|
||||
{
|
||||
m_curveData->setValuesAndMD(values, depthValues, false);
|
||||
m_curveData->setValuesAndMD(values, depthValues, wellLogFile->depthUnit(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ QString RimWellLogFileCurve::createCurveName()
|
||||
RigWellLogFile* wellLogFile = logFileInfo ? logFileInfo->wellLogFile() : NULL;
|
||||
if (wellLogFile)
|
||||
{
|
||||
QString unitName = wellLogFile->wellLogChannelUnit(m_wellLogChannnelName);
|
||||
QString unitName = wellLogFile->wellLogChannelUnitString(m_wellLogChannnelName);
|
||||
if (!unitName.isEmpty())
|
||||
{
|
||||
txt += QString(" [%1]").arg(unitName);
|
||||
|
||||
Reference in New Issue
Block a user