Skip to content

Costaki33/TISAT

Repository files navigation

Slicing

TexNet Injection-Seismic Analysis Tool

By COE. Constantinos Skevofilax and PhD. Alexandros Savvaidis of BEG TexNet

Introduction

The TexNet Injection-Seismic Analysis Tool (TISAT) is designed to efficiently analyze the relationship between oil and gas fracking operations and the occurrence of induced earthquakes.

The tool plots reported well injection volumes and pressures, and calculates the daily bottomhole pressure experienced underground for the N closest oil and gas wells to a specific earthquake. The goal is to assess the potential influence of these operations on earthquake activity.

Traditionally, in the field of seismology, it is recognized that oil and gas operations can induce earthquakes, as evidenced by the increased volume and frequency of seismic activity in oil and gas fields. However, the underlying mechanisms behind this connection are not yet fully understood. The goal of this tool is to provide an accessible way to visualize trends in these fields, helping to develop a clearer understanding of how human activities contribute to earthquake induction.

Features

  • Fetches and parses earthquake data from FDSN event services provided by TexNet
  • Cleans and preprocesses injection well data provided either by B3 or IVRT
  • Calculates bottomhole pressure and generates statistical plots of reported injection activity over time
  • Analyze pressure/injection volumes near earthquakes
  • Export well data quality summaries and plots

Directory Structure

1. Storage of Generated Outputs

This directory will store all images and files generated by TISAT.

2. Data Source Directory

This directory will hold critical data resources that the tool will reference for processing calculations.

Instillation

  1. Clone the Repository: Clone the repository to your local environment using:

    git clone https://github.com/Costaki33/TISAT.git
  2. Go into the TISAT Directory and install Requirements:

    Please have the latest Python version installed. Similarly, review the requirements.txt file for the necessary libraries you need to have installed. You may alternatively run the following to install the required libraries on your machine:

    cd TISAT
    pip install -r requirements.txt
  3. Gather Required Data Files and Modify tisat.py: To fully enable TISAT's functionality, a formation data file is required to classify wells as shallow or deep. Additionally, a tubing formation data file is needed to correlate each well's API number with its corresponding borehead tubing size. Please do the following:

    • Create a filepath you would like to store your data at. You can do so by running:
    mkdir my_earthquake_data

    Place your formation data file here.

    • Gather your Strawn Formation Data file and put it into your data folder. It must be in the following column format and be a CSV file: (Latitude, Longitude, and Z Depth) Open the tisat.py script and modify the following line:

          # Line 23:
          STRAWN_FORMATION_DATA_FILE_PATH = '/your/earthquake_data/TopStrawn_RD_GCSWGS84.csv'
    • Gather the API Tubing Data file and put it into your data folder. It must be in the following column format, be a CSV file, and the tubing dimension itself must be the inner diameter of the borehead: (api_no, tubing_size, modified_dt, depth_set, packer_set) Modify the following path in the friction_loss_calc.py script:

          # Line 14:
          tubing_information = '/your/earthquake_data/cmpl_tubing_data.csv'

Code Logic

  • Input Earthquake Data: The user provides earthquake data from the SeisComP FDSNWS Event - URL Builder in CSV format.

  • Find Closest Wells: The tool locates the closest wells to the earthquake within a set range. Well data is fetched from the requested data source.

  • Give me Well Information in a given Timeperiod: User provides an analysis timeperiod, which is the time before the earthquake one would like to observe.

  • Plot Generation:

    • Injection Data is Cleaned

      • Injection Data only is focused on the requested timeperiod
      • Identification of faulty records (Ex. missing pairs of injection volumes and pressures) and the creation of Well Data Quality Histograms:
        • Well Data Quality Histograms:
          • Based on the quality of available injection data for each utilized well, well data quality histograms are created to enable users to quickly visualize data quality. Data quality is organized into 3 categories and are visualized on a histogram which are saved to file:
            • Complete Data: Well Injection BBL and Avg Pressure PSIG is available.
            • Incomplete Data: Well Injection BBL available but Avg Pressure PSIG is missing.
            • Missing Data: Both Well Injection BBL and Avg Pressure PSIG are missing.
    • Calculate Bottomhole Pressure: TISAT calculates bottomhole pressure using the formula provided by Jim Moore (RRC):

      Bottomhole pressure = surface pressure + hydrostatic pressure - deltaP
      • Hydrostatic pressure formula: 0.465 psi/ft X depth (ft)*
      • Friction loss (DeltaP): Computed using the Colebrook-White equation for turbulent flow.

      Note regarding bottomhole pressure calculation, the equation above is the ideal formula to be used when calculating. However, due to either a lack of precise of well depth information available, when calculating deltaP (friction loss), the depth used may either be the depth of the packer or the depth of the well. Ideally it is the depth of the packer, but if not available the depth of the well is used. Please review the friction_loss_calc.py and tisat.py to get a better understanding of how we handle for lack of well depth information

    • Well Depth Classification: Wells are classified as either deep or shallow based on the Strawn Formation, with shallow wells plotted on the top of the figure and vice versa for deep wells.

    • Visualization: Well Data Quality Histograms, Shallow and Deep Injection Volume, Pressure, and Bottomhole Pressure (with and without Moving Average) plots, and individual well Volume and Pressure plots are generated and saved to file.

Running the Code

Run the following in your code environment:

Data Source: TexNet

python3 tisat.py ivrt

It will prompt you to enter a directory path where the outputted files will go. If it doesn't exist, TISAT will automatically make the directory for you in the working space where TISAT is:

[2025-04-07 10:35:19] Please enter an file path you would like to store all injection well information under:

It will then prompt you to input a TexNet event ID and fetch earthquake data from the URL Builder. The script will automatically open the URL Builder:

[2025-04-07 10:35:53] Click on the following link to fetch earthquake data:
http://scdb.beg.utexas.edu/fdsnws/event/1/builder
[2025-04-07 10:35:53] Please enter the selected earthquake in CSV format: 

CSV format refers to the format of the earthquake event. For example:

Enter the earthquake data in CSV format: texnet2025fgzl,2025-03-16T23:19:36.954421Z,31.686719341492186,-104.23914522043873,7.586669921875,2.0349857115691612,"Western Texas"

[2025-04-07 10:36:13] Information about texnet2025fgzl:
Event ID: texnet2025fgzl
Latitude: 31.686719341492186
Longitude: -104.23914522043873
Origin Date: 2025-03-16
Origin Time: 23:19:36
Local Magnitude: 2.1

If you do not have access to the TexNet URL Builder (you must be on the BEG VPN to access), there is a format that the URL Builder uses to generate the CSV format, which is as follows:

EventID,Time,Latitude,Longitude,Depth/km,Magnitude,EventLocationName

You can go to the TexNet Catalog, search for an earthquake you are interested in, and recreate the format to input it into TISAT as shown below:

Catalog Example

You then will be asked to input a search range in kilometers, which will allow TISAT to gather all well information within said radius, with the starting point being the earthquake epicenter:

[2025-04-07 10:36:13] Please enter your search radius in kilometers (E.g. 20km): 

Finally, you will be asked to send a year cutoff for analysis leading up to the earthquake. Do not make the cutoff request longer than the total length of available prior information that is available to the TexNet Injection Reporting Tool, as there will be a lack of information the plots can reference. For example, the TexNet Injection Reporting Tool as information up until 2017. It is not recommended to do a year prior than that on this data source.

[2025-04-07 10:38:11] Please enter the year cutoff you would like to analyze prior to the earthquake: (E.g. 5 yrs):

After this the code will execute and generate the daily injection plots and data quality histograms, which are saved to your inputted save filepath.

Data Source: B3

python3 tisat.py b3

After prompting for an output directory, TISAT will ask the following:

[2025-04-07 10:38:50] Enter the output directory file path:

You will then be followed with the following prompt:

[2025-04-07 10:39:16] Do you already have a 'merged_B3_Monthly_Data_with_Well_Information.csv' file? (Enter True or False) 

This is a custom merged CSV file created by TISAT that will merge the WellInformation.csv and MonthlyInjection.csv files via a inner merge using the 'InjectionWellId' as the common shared column. For future runs this file can be used again. If you enter 'True', TISAT will ask you to provide the parent directory path, not the file path explicitly.

[2025-04-07 10:44:11] Please provide 'merged_B3_Monthly_Data_with_Well_Information.csv' directory path:

If you do not have this file yet (Most likely this is your first run through), enter 'False'. You will be prompted to enter the directory path where all files generated by B3 are:

[2025-04-07 10:45:05] Please provide B3 data folder filepath: /home/skevofilaxc/Documents/earthquake_data/B3_Midland_Culberson

This will prompt TISAT to create 'merged_B3_Monthly_Data_with_Well_Information.csv' in your save directory path:

[2025-04-07 10:47:02] Successfully Merged B3 Data into Pandas df
[2025-04-07 10:48:07] Saved Merged B3 DF as CSV at /home/skevofilaxc/Documents/earthquake_plots/rrc_pres/texnet2025fgzl_b3

Similar to the IVRT data source (above), provide the earthquake event data in CSV format:

[2025-04-07 10:48:07] Click on the following link to fetch earthquake data:
http://scdb.beg.utexas.edu/fdsnws/event/1/builder
[2025-04-07 10:48:07] Enter the earthquake data in CSV format: texnet2025fgzl,2025-03-16T23:19:36.954421Z,31.686719341492186,-104.23914522043873,7.586669921875,2.0349857115691612,"Western Texas"

Enter search radius and analysis time period:

[2025-04-07 10:49:10] Enter the range in kilometers (E.g. 20km): 15

[2025-04-07 10:49:21] Please enter the year cutoff you would like to analyze prior to the earthquake: (E.g. 5 yrs): 5

After this the code will execute and generate the monthly injection plots and data quality histograms, which are saved to your inputted save filepath.

Outputs

The script outputs:

  • Plots showing injection pressures for shallow and deep wells.
  • Histograms of complete, incomplete, and missing data for a given well over time.
  • Text and CSV files containing cleaned and compiled well injection data used for plot generation.

Below are sample output plots of injection activity over time as well as the quality of the reported data within the vicinity of the 4.5M Scurry-Fisher, TX earthquake:

Daily Injection Plot

Average Pressure Plot

Well Data Histogram 15100308

Well Data Histogram 15133086

Applications

TISAT enables detailed analysis of injection activity across multiple wells at different depths, helping seismologists identify unusual injection patterns that may be linked to induced seismicity in a given region. TISAT has been instrumental in identifying hazardous well activity in the Scurry-Fisher region of Texas, which was linked to the inducement of four M4+ earthquakes in the area in July 2024.

Credits

The banner image used in this repository was created by Elena Kalogirou — special thanks to her for her work!

Questions?

Please reach out to constantinos.skevofilax@austin.utexas.edu for any questions about usage, code development, or applications!

About

Texas Injection-Seismic Analysis Tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages