# Well report#

This is an auto-generated report showing some summary plots followed by a standard set of plots for every well.

[1]:

#papermill_description=Initialise_Report
import numpy as np
import pandas as pd
import cegalprizm.investigator as investigator
from cegalprizm.investigator import InvestigatorConnection
from cegalprizm.investigator.views import *

[2]:

from cegalprizm.investigator import DimensionPropertyNameTuple

required_dimensions = []
required_dimensions.append(DimensionPropertyNameTuple(name="Porosity", property_name="porosity"))
required_dimensions.append(DimensionPropertyNameTuple(name="Permeability", property_name="perm"))
required_dimensions.append(DimensionPropertyNameTuple(name="Gamma ray", property_name="gamma"))
required_dimensions.append(DimensionPropertyNameTuple(name="Z", property_name="depth"))
required_dimensions.append(DimensionPropertyNameTuple(name="Facies", property_name="facies"))

[3]:

#papermill_description=Load_Investigation

if inv is None:
sys.exit("Investigation cannot be accessed")

[4]:

continuous_dimension_names = [ ]
discrete_dimension_names = [ ]

for required_dimension in required_dimensions:
for dimension in inv.continuous_dimension_property_names:
settings = inv.get_continuous_settings(dimension.name)
name = dimension.name
found = False
if required_dimension.property_name in dimension.property_name.lower():
name = required_dimension.name
found = True

if found:
continuous_dimension_names.append(name)
settings.set_name(name)

for dimension in inv.discrete_dimension_property_names:
if dimension.name is not investigator.DATASET_DIMENSION_NAME:
settings = inv.get_discrete_settings(dimension.name)
name = dimension.name
found = False
if required_dimension.property_name in dimension.property_name.lower():
name = required_dimension.name
found = True

if found:
discrete_dimension_names.append(name)
settings.set_name(name)

inv.update()

[5]:

#papermill_description=Verify_Investigation
import sys

#if len(continuous_dimension_names) + len(discrete_dimension_names) != len(required_dimensions):
#  sys.exit("The required dimensions are not available in the investigation")

[6]:

raw_wells = [x for x in inv.dataset_names if x.startswith("Wells")]
well_names = [x.replace("Wells/", "") for x in raw_wells]

[7]:

settings = inv.get_continuous_settings("Z")
settings.set_bin_size(10)
inv.update()

[8]:

continuous_dimension_names = [x for x in continuous_dimension_names if x != "Z"]

[9]:

for well in raw_wells:
settings = inv.get_dataset_settings(well)
settings.set_shape("circlefill", 6)
inv.update()


## Overview map#

A map showing the well head locations for each well in this report.

[10]:

#papermill_description=Write_Overview
view = MapView(inv)
view.show_boreholes(True, True, True)
investigator.plot(view)

[10]:


A matrix plot of the continuous data for all wells.

[11]:

view = MatrixView(inv)
view.set_datasets_visible(raw_wells)
view.set_dimensions(continuous_dimension_names)
view.set_count_axis("percentage")
view.show_histograms(True)
view.show_legend(True)
investigator.plot(view)

[11]:

[12]:

logtracks_view = LogTracksView(inv)
logtracks_view.group_tracks_by("property")
logtracks_view.show_continuous_fill(True)

matrix_view = MatrixView(inv)
matrix_view.set_dimensions(continuous_dimension_names)
matrix_view.set_color_by(investigator.DATASET_DIMENSION_NAME)
matrix_view.set_count_axis("percentage")
matrix_view.show_histograms(True)
matrix_view.show_histogram_as("bars")
matrix_view.show_legend(True)

multi_histo_view = HistogramView(inv)
multi_histo_view.show_multi_histograms(True)
multi_histo_view.set_dimensions(continuous_dimension_names)
multi_histo_view.set_count_axis("percentage")
multi_histo_view.set_draw_statistics(True)
multi_histo_view.show_histogram_as("bars")
multi_histo_view.show_legend(True)

facies_proportion_view = HistogramView(inv)
facies_proportion_view.set_dimension("Z")
facies_proportion_view.set_count_axis("proportional")
facies_proportion_view.set_color_by("Facies")
facies_proportion_view.show_histogram_as("bars")
facies_proportion_view.swap_axes()
facies_proportion_view.show_legend(True)

[13]:

#papermill_description=Write_Well_QC_B2


## B2 QC#

The data from the B2 well are plotted in different ways to allow QC of the individual well and comparison between this wells and the other wells in the investigation.

A well section showing log data.

[14]:

view = logtracks_view.copy()
view.set_boreholes(['B2'])
investigator.plot(view, width=400)

[14]:


A matrix plot of the continuous properties.

[15]:

view = matrix_view.copy()
view.set_datasets_visible(['Wells/B2'])
investigator.plot(view)

[15]:


A multi-dimension histogram showing the continuous data for each log plotted alongside the same data from all the other wells in the investigation.

[16]:

view = multi_histo_view.copy()
view.set_highlight('B2')
investigator.plot(view)

[16]:


A histogram showing the proportion of facies in 10m TVD intervals for the well.

[17]:

view = facies_proportion_view.copy()
view.set_datasets_visible(['Wells/B2'])
investigator.plot(view)

[17]:

[18]:

#papermill_description=Write_Well_QC_B4


## B4 QC#

The data from the B4 well are plotted in different ways to allow QC of the individual well and comparison between this wells and the other wells in the investigation.

A well section showing log data.

[19]:

view = logtracks_view.copy()
view.set_boreholes(['B4'])
investigator.plot(view, width=400)

[19]:


A matrix plot of the continuous properties.

[20]:

view = matrix_view.copy()
view.set_datasets_visible(['Wells/B4'])
investigator.plot(view)

[20]:


A multi-dimension histogram showing the continuous data for each log plotted alongside the same data from all the other wells in the investigation.

[21]:

view = multi_histo_view.copy()
view.set_highlight('B4')
investigator.plot(view)

[21]:


A histogram showing the proportion of facies in 10m TVD intervals for the well.

[22]:

view = facies_proportion_view.copy()
view.set_datasets_visible(['Wells/B4'])
investigator.plot(view)

[22]:

[23]:

#papermill_description=Write_Well_QC_B8


## B8 QC#

The data from the B8 well are plotted in different ways to allow QC of the individual well and comparison between this wells and the other wells in the investigation.

A well section showing log data.

[24]:

view = logtracks_view.copy()
view.set_boreholes(['B8'])
investigator.plot(view, width=400)

[24]:


A matrix plot of the continuous properties.

[25]:

view = matrix_view.copy()
view.set_datasets_visible(['Wells/B8'])
investigator.plot(view)

[25]:


A multi-dimension histogram showing the continuous data for each log plotted alongside the same data from all the other wells in the investigation.

[26]:

view = multi_histo_view.copy()
view.set_highlight('B8')
investigator.plot(view)

[26]:


A histogram showing the proportion of facies in 10m TVD intervals for the well.

[27]:

view = facies_proportion_view.copy()
view.set_datasets_visible(['Wells/B8'])
investigator.plot(view)

[27]:

[28]:

#papermill_description=Write_Well_QC_B9


## B9 QC#

The data from the B9 well are plotted in different ways to allow QC of the individual well and comparison between this wells and the other wells in the investigation.

A well section showing log data.

[29]:

view = logtracks_view.copy()
view.set_boreholes(['B9'])
investigator.plot(view, width=400)

[29]:


A matrix plot of the continuous properties.

[30]:

view = matrix_view.copy()
view.set_datasets_visible(['Wells/B9'])
investigator.plot(view)

[30]:


A multi-dimension histogram showing the continuous data for each log plotted alongside the same data from all the other wells in the investigation.

[31]:

view = multi_histo_view.copy()
view.set_highlight('B9')
investigator.plot(view)

[31]:


A histogram showing the proportion of facies in 10m TVD intervals for the well.

[32]:

view = facies_proportion_view.copy()
view.set_datasets_visible(['Wells/B9'])
investigator.plot(view)

[32]: