diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp index e48d5706d8..27e83ec83d 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp @@ -403,32 +403,14 @@ QString RimWellLogExtractionCurve::createCurveName() generatedCurveName += m_case->caseUserDescription(); } - if (m_addPropertyToCurveName && eclipseCase) + if (m_addPropertyToCurveName) { if (!generatedCurveName.isEmpty()) { - generatedCurveName += ", "; + generatedCurveName += ","; } - generatedCurveName += m_eclipseResultDefinition->resultVariable(); - } - - if (m_addPropertyToCurveName && geomCase) - { - QString geoMechResultName; - - QString resCompName = m_geomResultDefinition->resultComponentUiName(); - if (resCompName.isEmpty()) - geoMechResultName = m_geomResultDefinition->resultFieldUiName(); - else - geoMechResultName += m_geomResultDefinition->resultFieldUiName() + "." + resCompName; - - if (!generatedCurveName.isEmpty()) - { - generatedCurveName += ", "; - } - - generatedCurveName += geoMechResultName; + generatedCurveName += wellLogChannelName(); } if (m_addTimestepToCurveName || m_addDateToCurveName) @@ -478,3 +460,32 @@ QString RimWellLogExtractionCurve::createCurveName() return generatedCurveName; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellLogExtractionCurve::wellLogChannelName() const +{ + RimGeoMechCase* geoMechCase = dynamic_cast(m_case.value()); + RimEclipseCase* eclipseCase = dynamic_cast(m_case.value()); + + QString name; + if (eclipseCase) + { + name = m_eclipseResultDefinition->resultVariable(); + } + else if (geoMechCase) + { + QString resCompName = m_geomResultDefinition->resultComponentUiName(); + if (resCompName.isEmpty()) + { + name = m_geomResultDefinition->resultFieldUiName(); + } + else + { + name = m_geomResultDefinition->resultFieldUiName() + "." + resCompName; + } + } + + return name; +} diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h index e8778ea02f..75b1ca57a4 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.h @@ -46,6 +46,8 @@ public: void setWellPath(RimWellPath* wellPath); void setPropertiesFromView(RimView* view); + virtual QString wellLogChannelName() const; + protected: virtual QString createCurveName(); diff --git a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp index 4c23c961d2..6c4101b271 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp @@ -248,3 +248,11 @@ QString RimWellLogFileCurve::createCurveName() return "Empty curve"; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RimWellLogFileCurve::wellLogChannelName() const +{ + return m_wellLogChannnelName; +} + diff --git a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.h b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.h index bf053e932d..0726608bb5 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.h @@ -46,6 +46,7 @@ public: // Overrides from RimWellLogPlotCurve virtual void updatePlotData(); + virtual QString wellLogChannelName() const; protected: // Overrides from RimWellLogPlotCurve diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.h b/ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.h index 06408eea96..e4a49b0032 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.h @@ -61,6 +61,7 @@ public: void updateCurveName(); void updatePlotTitle(); + virtual QString wellLogChannelName() const = 0; virtual void updatePlotData() = 0; protected: diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp index 2f3a5838e9..1b7febdf4b 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp @@ -266,9 +266,12 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogPlotCurve* curve, const QSt } } + QString wellLogChannelName = curve->wellLogChannelName(); + wellLogChannelName.replace(".", "_"); + NRLib::LasWell lasFile; lasFile.AddLog("DEPTH", "m", "Depth [m]", curveData->yValues()); - lasFile.AddLog(curve->name().trimmed().toStdString(), "NO_UNIT", "PARAMETERINFO", wellLogValues); + lasFile.AddLog(wellLogChannelName.toStdString(), "NO_UNIT", "PARAMETERINFO", wellLogValues); lasFile.SetMissing(absentValue); std::vector commentHeader;