report

report.WB_scatter(input_dictionary, well, block, source)[source]

Not documented

report.compare_runs_PT(input_dictionary, comment='', compare_wells=True)[source]

It generates a pdf for calibration pourposes, comparing current and previous data set

Parameters

input_dictionary (dict) – Contains well names, model version, db path and layers information.

Returns

run_{date_time}.pdf: on ‘../calib/PT/run

Return type

pdf

Note

Some other files such as ELEME.json, OBJ.json and COF_PT.json must be ready.

report.cross_section(input_dictionary, variable, layer, time, plot_mesh=False)[source]

Not documented

report.cross_section_real_data(wells, ngrid, masl, PT, save_img, model_version)[source]

It Generates a vertical cross section for a specified parameter on a defined path.

Parameters
  • ngrid (int) – Number of element on the horizontal/vertical direction

  • wells (dict) – Wells names

  • masl (float) – Desire depth for cross section

  • PT (string) – ‘T’ or ‘P’

  • save_img (bool) – Selects weather the plot is save as image or not

Returns

vertical_section_{varible_to_plot}.png: on ‘../output/PT/images/

Return type

image

Note

The data comes from the text file. The function is meant to be use at the early stages of the model to check natural state

report.flowell_dates(input_dictionary, d1, d2, well, position=3, source=None)[source]

Not documented

report.image_save_all_plots(typePT, input_dictionary, width=3, height=6)[source]

It plots all the wells defined on input_dictionay and compare real data with model output

Parameters
  • db_path (str) – Direccion de base de datos sqlite, tomado de model_conf

  • input_dictionary (dictionary) – Dictionary contaning the path and name of database on keyword ‘db_path’, list of wells under the keywords ‘WELLS’, ‘MAKE_UP_WELLS’ and ‘NOT_PRODUCING_WELL’. Lastly, it contains the information of the top level of the mesh on under the key ‘z_ref’

  • typePT (str) – ‘T’ for temperature or ‘P’ for pressure

  • height (float) – Defines the ratio height/width

  • width (float) – By dividing the number of wells defines the number of rows on the chart

Returns

{typePT}_all.png: on path ../output/PT/images/logging/

Return type

image

Note

The real data is taken from the the sqlite database. Depending on the number of wells defined the default values for width and height migth be changed

Examples

>>> image_save_all_plots(typePT='T',input_dictionary)
report.mh_indivual(input_dictionary, well, block, source, save, show, production_dictionary, years=35)[source]

Genera una grafica donde compara la evolucion de flujo y entalpia para el bloque asignado a la fuente de un pozo en particular

Parameters
  • well (str) – Nombre de pozo

  • block (str) – Nombre de bloque, en general donde se ubica zona de alimentacion

  • source (str) – Nombre de fuente asociada a pozo

  • save (bool) – Almacaena la grafica generada

  • show (bool) – Almacaena la grafica generada

Returns

{well}_{block}_{source}_evol.png: archivo con direccion ../output/mh/images/

Return type

image

Note

El archivo correspondiente en la carpeta ../output/mh/txt debe existir

Examples

>>> plot_compare_mh('AH-1','DA110','SRC1',save=True,show=False)
report.multiple_PI(input_dictionary, well, block, well_collection, save, show)[source]

It generates a single plot from a well that has been divided into many periods

report.plot_compare_PT(input_dictionary, well, block, save, show)[source]

Genera una grafica donde compara la evolucion de flujo y entalpia para el bloque asignado a la fuente de un pozo en particular

Parameters
  • well (str) – Nombre de pozo

  • block (str) – Nombre de bloque, en general donde se ubica zona de alimentacion

  • source (str) – Nombre de fuente asociada a pozo

  • save (bool) – Almacaena la grafica generada

  • show (bool) – Almacaena la grafica generada

Returns

{well}_{block}_{source}_evol.png: archivo con direccion ../output/mh/images/

Return type

image

Note

El archivo correspondiente en la carpeta ../output/mh/txt debe existir

Examples

>>> plot_compare_mh('AH-1','DA110','SRC1',save=True,show=False)
report.plot_compare_PT_curr_prev(db_path, name, ELEME, layers, inpath='../output/PT/txt', previnpath='../output/PT/txt/prev', show=False)[source]

Not documented

report.plot_compare_PT_vertical(input_dictionary, well, block, save, show, years=35, p_res_block=None, delta=False, var_name='P')[source]

Genera una grafica donde compara la evolucion de flujo y entalpia para el bloque asignado a la fuente de un pozo en particular

Parameters
  • well (str) – Nombre de pozo

  • block (str) – Nombre de bloque, en general donde se ubica zona de alimentacion

  • source (str) – Nombre de fuente asociada a pozo

  • save (bool) – Almacaena la grafica generada

  • show (bool) – Almacaena la grafica generada

Returns

{well}_{block}_{source}_evol.png: archivo con direccion ../output/mh/images/

Return type

image

Note

El archivo correspondiente en la carpeta ../output/mh/txt debe existir

Examples

>>> plot_compare_mh('AH-1','DA110','SRC1',save=True,show=False)
report.plot_compare_mh(input_dictionary, well, block, source, save, show, production_dictionary, years=35, variables=[], plot_feedzones=True)[source]

Genera una grafica donde compara la evolucion de flujo y entalpia para el bloque asignado a la fuente de un pozo en particular

Parameters
  • well (str) – Nombre de pozo

  • block (str) – Nombre de bloque, en general donde se ubica zona de alimentacion

  • source (str) – Nombre de fuente asociada a pozo

  • save (bool) – Almacaena la grafica generada

  • show (bool) – Almacaena la grafica generada

Returns

{well}_{block}_{source}_evol.png: archivo con direccion ../output/mh/images/

Return type

image

Note

El archivo correspondiente en la carpeta ../output/mh/txt debe existir

Examples

>>> plot_compare_mh('AH-1','DA110','SRC1',save=True,show=False)
report.plot_compare_mh_filtered(input_dictionary, well)[source]

Not documented

report.plot_compare_one(well, savefig, no_real_data, data, TVD_elem, TVD_elem_top, axT, axP, PT_real_dictionary, layer_bottom, limit_layer, input_dictionary, label=None, def_colors=True)[source]

It generates two plots, they compare real downhole temperature and pressure measurements with model output

Parameters
  • well (str) – Selected well

  • savefig (bool) – If true the plot is saved on ../output/PT/images/logging/

  • PT_real_dictionary (dictionary) – Contains real measurements on temperature, pressure and measure depth

  • no_real_data (bool) – If True, no real measurements are provides

  • data (pandas dataframe) – Contains model output information for each element assigned to a well

  • TVD_elem (array) – Contains the masl data at the middle for each element assigned to a well

  • TVD_elem_top (array) – Contains the masl data at the top for each element assigned to a well

  • axT (matplotlib_axis) – Framework where temperature data is plotted

  • axP (matplotlib_axis) – Framework where temperature data is plotted

  • layer_bottom (array) – Contains the masl data at the bottom for each element assigned to a well

  • limit_layer (str) – Layer correlative at which plotting stops

  • input_dictionary (dictionary) – Contains the information of the top level of the mesh on under the key ‘z_ref’

  • label (str) – Contains the legend of the plotted line

  • def_colors (True) – If True uses the colors defined on formats

Returns

  • image – PT_{well}.png: on the path../output/PT/images/logging

  • matplotlib_axis – axT: contains real and simulated downhole temperature data

  • matplotlib_axis – axP: contains real and simulated downhole pressure data

Note

It is used in combination of the function plot_compare_one_data

report.plot_compare_one_data(well, input_dictionary, inpath='../output/PT/txt')[source]

Compiles real and output for temperature and pressure data

Parameters
  • well (str) – Selected well

  • input_dictionary (dictionary) – Dictionary contaning the path and name of database on keyword ‘db_path’

  • inpath (str) – Constains path for input files. Default value is “../output/PT/txt”

Returns

  • PT_real_dictionary (dictionary) – Contains real measurements on temperature, pressure and measure depth

  • no_real_data (bool) – If True, no real measurements are provides

  • data (pandas dataframe) – Contains model output information for each element assigned to a well

  • TVD_elem (array) – Contains the masl data at the middle for each element assigned to a well

  • TVD_elem_top (array) – Contains the masl data at the top for each element assigned to a well

  • layer_bottom (array) – Contains the masl data at the bottom for each element assigned to a well

Note

The real data is taken from the the sqlite database

report.plot_compare_producers(input_dictionary, years=35)[source]

Not documented

report.plot_evol_well_data(well, layer, parameter, input_dictionary)[source]

It generates the input data for a line type plot data, from model and real , for one parameter along the time from a reference date define on input_dictionary

Parameters
  • well (str) – Well name

  • layer (str) – Layer (level) at which the data will be extracted

  • parameter (str) – Variable to plot: “P”,”T”,”SG”,”SW”,”X1”,”X2”,”PCAP,””DG” y “DW”

  • input_dictionary (dict) – Dictionary with the keywords ‘ref_date’ (datetime type value) and ‘db_path’ (database path)

Returns

  • dictionary – calculated: output data from model

  • pandas.dataframe – data_real: Real data (if exist)

  • float – depth: masl

  • string – header: Parameter keyword

  • string – parameter_label: parameter label

  • string – parameter_unit: Parameter unit

Note

it generates the input data for the function plot_evol_well_lines

report.plot_evol_well_lines(calculated, real_data, parameter, depth, header, well, layer, parameter_unit, parameter_label, label, ax, input_dictionary, years=15, color_def=False)[source]

It generates the input data for a line type plot data, from model and real , for one parameter along the time from a reference date define on input_dictionary

Parameters
  • calculated (dict) – Output data from model

  • pandas.dataframe – data_real: Real data (if exist)

  • float – depth: masl

  • header (str) – Parameter keyword

  • parameter_label (str) – parameter label

  • parameter_unit (str) – parameter_unit: Parameter unit

  • well (str) – Well name

  • layer (str) – Layer (level) at which the data will be extracted

  • parameter (str) – Variable to plot: “P”,”T”,”SG”,”SW”,”X1”,”X2”,”PCAP,””DG” y “DW”

  • input_dictionary (dict) – Dictionary with the keywords ‘ref_date’ (datetime type value) and ‘db_path’ (database path)

  • years (float) – Number of years after the ref_date to be plotted on the chart

  • color_def (bool) – If true default colors are use from the formats module

Returns

ax: contains real and simulated for the selected paramter along the time

Return type

matplotlib_axis

Note

It is use in combination with the function plot_evol_well_data

report.plot_power(input_dictionary, save=True, show=True)[source]

Not documented

report.plot_power_flowell(input_dictionary, save=True, show=True)[source]

Not documented

report.plot_power_it2(input_dictionary, save=True, show=True)[source]

Not documented

report.pres(input_dictionary, incon_init=False)[source]

Not documented

report.sources_plots(input_dictionary, well, block, source, variables=[])[source]

Not documented

report.to_paraview(input_dictionary, itime=None, num=None)[source]

It generates a vtu file to be read on Paraview for different time output including all the parameters from each block.

Parameters
  • input_dictionary (dictionary) – Contains the information of the layers on the model

  • itime (float) – It defines a time at which a the parameters from the blocks are extracted into json file. Must be on the same units as the TOUGH2 output files (days, seconds, etc.)

Returns

to_paraview.vtu: on ../mesh

Return type

file

report.vertical_cross_section(method, ngridx, ngridy, variable_to_plot, source, show_wells_3D, print_point, savefig, plots_conf, input_dictionary)[source]

It Generates a vertical cross section for a specified parameter on a defined path.

Parameters
  • ngridx (int) – Number of element on the horizontal direction

  • ngridy (int) – Number of element on the vertical direction

  • show_wells_3D (bool) – If true the wells are shown on 3D

  • print_point (bool) – If true prints the points where the interpolation has taken place.

  • variable_to_plot (str) – Variable to plot: “P”,”T”,”SG”,”SW”,”X1”,”X2”,”PCAP,””DG” y “DW” for ‘t2’ source; “P” and “T” for ‘sav’ source

  • source (str) – ‘t2’ or ‘sav’

  • savefig (bool) – If true the plot is saved

  • plots_conf (dictionary) – With key words ‘cross_section’ defines the points of a lines for the vertical section. ‘variables_level’ defines the variable values to plot

  • input_dictionary (dictioanary) – Contains the ‘LAYERS’ keyword

Returns

vertical_section_{varible_to_plot}.png: on ‘../output/PT/images/

Return type

image

Note

The point should not be defined on a well coordinate.

Examples

>>> plots_conf={'cross_section':{'x':[5000,5000,7500],'y':[3000,7250,7250]},'variable_levels':[25,50,75,100,125,150,170,180,200,220,230,250,260]}
>>> input_dictionary={'LAYERS':{1:['A',100],2:['B', 100],3:['C', 125]}}
>>> vertical_cross_section(ngridx=100,ngridy=100,variable_to_plot="T",source="t2",show_wells_3D=True)