#2264 PLT plot. Filter wells list based on well geometry and production data

This commit is contained in:
Bjørn Erik Jensen
2017-12-14 11:22:44 +01:00
parent 8efcccf5c4
commit f84a535511
4 changed files with 18 additions and 10 deletions

View File

@@ -58,8 +58,18 @@ bool RicNewPltPlotFeature::isCommandEnabled()
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
RimSimWellInView* simWell = caf::firstAncestorOfTypeFromSelectedObject<RimSimWellInView*>();
RimWellPath* selectedWellPath = caf::firstAncestorOfTypeFromSelectedObject<RimWellPath*>();
bool enable = true;
if (selectedWellPath)
{
if (selectedWellPath->wellPathGeometry() == nullptr && !RimWellPlotTools::hasFlowData(selectedWellPath))
{
return false;
}
}
if (simWell != nullptr)
{
RimProject* proj = RiaApplication::instance()->project();

View File

@@ -152,7 +152,7 @@ bool RimWellPlotTools::hasFlowData(const RimWellLogFile* wellLogFile)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPlotTools::hasFlowData(RimWellPath* wellPath)
bool RimWellPlotTools::hasFlowData(const RimWellPath* wellPath)
{
for (RimWellLogFile* const wellLogFile : wellPath->wellLogFiles())
{

View File

@@ -104,6 +104,9 @@ public:
static QString curveUnitText(RimWellLogFile::WellFlowCondition condition,
RiaEclipseUnitTools::UnitSystem unitSystem,
FlowPhase flowPhase);
static bool hasFlowData(const RimWellPath* wellPath);
private:
friend class StaticFieldsInitializer;
static const std::set<QString> PRESSURE_DATA_NAMES;
@@ -120,7 +123,6 @@ private:
static bool hasPressureData(RimEclipseResultCase* gridCase);
static bool hasPressureData(RimWellPath* wellPath);
static bool hasFlowData(RimEclipseResultCase* gridCase);
static bool hasFlowData(RimWellPath* wellPath);
static bool isFlowChannel(RimWellLogFileChannel* channel);
static bool tryMatchChannelName(const std::set<QString>& channelNames, const QString& channelNameToMatch);
static std::set<QDateTime> findMatchingOrAdjacentTimeSteps(const std::set<QDateTime>& baseTimeLine, const std::set<QDateTime>& availableTimeSteps);

View File

@@ -1073,17 +1073,13 @@ void RimWellPltPlot::calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>
if (proj != nullptr)
{
std::set<QString> wellNames;
// Observed wells
for (const RimWellPath* const wellPath : proj->allWellPaths())
{
wellNames.insert(wellPath->name());
}
const QString wellName = wellPath->name();
for (const auto& wellName : wellNames)
{
options.push_back(caf::PdmOptionItemInfo(wellName, wellName));
if(wellPath->wellPathGeometry() || RimWellPlotTools::hasFlowData(wellPath))
options.push_back(caf::PdmOptionItemInfo(wellName, wellName));
}
}