A short course on versatile processing & inversion of ERT monitoring data

Thomas Günther

TU Bergakademie Freiberg, Germany

Nico Skibbe

LIAG, Hannover, Germany

Nino Menzel

RWTH Aachen University, Germany

2025-02-17

pyGIMLi is a versatile open-source toolbox with:

  • management tools for structured and unstructured meshes in 2D & 3D
  • computationally efficient finite-element and finite-volume solvers
  • various geophysical forward operators: ERT/IP, Traveltime, Gravimetry, Magnetics, SP, EM
  • frameworks for constrained, joint and process-based inversions with region-specific regularization
  • open-source, platform compatible, documented & tested code
  • suitability for teaching & reproducible research
  • 1.0 version published in 2017 in Computers and Geosciences (Rücker et al., 2017) (and among the Most Downloaded papers since, > 430 citations, > 120 uses in peer-reviewed papers)

pyGIMLi

aims at making:

  • easy things easy
  • hard things possible
  • everything transparent and reproducible

Existing tutorials

  • Transform 2021: creating geometries & meshes, modeling PDEs, synthetic data, inversion (also with external forward operator).
  • Transform 2022: fundamental pyGIMLi objects (Mesh, DataContainer, matrix types, etc.), geostatistical vs. smoothness regularization, treatment of subsurface regions, adding prior data.
  • SEG webinar 2024: invert real-life 3D data (Hübner et al., 2017) to tweak your inversion beyond the standard practice.
  • Today we practise & focus on ERT monitoring data processing & inversion.

What is new since?

  • Transform ’21 & ’22 notebooks available as tutorials or examples on pygimli.org
  • Improved 3D visualization powered by pyvista (filters, slices, interactivity)
  • 3D gravity and (full-tensor) magnetics operators and managers
  • New matrices and matrix generators, e.g. non-explicit (PDE-based) Jacobian matrix
  • LSQRinversion framework to include parameter relations (from Wagner et al., 2019)
  • MultiFrameModelling framework for temporally/spectrally/spatially constraints
  • TimelapseERT class with different strategies, e.g. 4D inversion
  • New examples on ERT (2D/3D crosshole, 3D surface, timelapse), IP, 3D magnetics
  • Improved website, i.e. fully upgraded to modern (pg>1.2) style and moved to the pydata-sphinx-theme
  • Many more convenience functions to simplify the code
  • Many new papers using pyGIMLi (https://pygimli.org/publist.html)

New since v1.5.0 (SEG webinar)

https://github.com/gimli-org/gimli/releases

  • enabled pip install pygimli for easier installation (e.g. on Google Colab)
  • new examples (e.g. reciprocals) and improved old ones
  • better access to Jacobian, resolution matrices etc.
  • syntactic sugar (data.show('i'), mesh.show('res'), data.estimateError())
  • new mesh functions:
    e.g., submesh(), extract2dUpperSurfaceMesh(), extract2dSlice()
  • new matrix types, e.g. for BFGS-based inversion
  • different inversion frameworks (SD, NLCG, GN, L_BFGS, BFGS)
  • fully complex-valued (FD) ERT-IP inversion (also for TD)
  • improvements in gravity, magnetics and TDEM
  • a lot of of bug fixes and improved docstrings

Join the pyGIMLi user community!

“In open source, we feel strongly that to really do something well, you have to get a lot of people involved.”

– Linus Torvalds

  1. Join the #pyGIMLi chat on Mattermost!
  2. Open a discussion or raise an issue on GitHub.
  3. Contribute to the website via the “Improve this page” button in the right sidebar.
  4. Add your pyGIMLi-powered publication to this database.
  5. Send your example to mail@pygimli.org.
  6. Contribute to the code as described in our contribution guidelines.

The code base – ERT module

  • import and export of various formats
  • utility functions and data visualization
  • array generation and synthetic model simulation
  • ERTManager for data inversion and model output
  • ERTIPManager for FD or TD Induced Polarization (IP)
  • spectral IP analysis in pyBERT module (FDIP and TDIP)

The TimelapseERT class

  • designed for surface ERT data (crosshole: CrossholeERT)
  • different import formats and export of filtered data
  • extract data time series with .showTimeline()
  • extensive filter function (t, tmin, tmax, kmax)
  • masking of data with app. resistivity & error bounds (.mask())
  • automatic masking based on harmonic filtering
  • different types of data visualization and PDF generation
  • temporal fitting of reciprocal error models
  • invert single timesteps, sequentially or full (“4D” inversion)

The CrossholeERT class

  • based on TimelapseERT with some extra functions
  • different visualization methods
  • adapted mesh generation
  • attributes electrodes to boreholes
  • extractSubset to retrieve (3D) parts or (2D) planes

Make whole processing chain transparent and reproducible

TimelapseERT repository

Github Repository to collect published data sets and notebooks

Name Reference dim time data Info
pyGIMLi (Rücker et al., 2017) 2D 10 740 synthetic tracer
ALERT (Kuras et al., 2009) 2D xh 35 1200 9 boreholes
Hillslope (Hübner et al., 2015) 2D to 24 800 min. length
Infiltration (Hübner et al., 2017) 3D 200 2850 min. length
Tsunami (Ronczka et al., 2014) 2.5D 900 225 lab experiment
Steelcase (Ronczka et al., 2015) 3D sc 9 450 SEM, regions
SAMOS (Ronczka et al., 2020) 1.5D 7 3000 CEM
DynaDeep Skibbe talk 2D to 10 3000 topography change
TestUM Günther talk 3D xh 70 2200 heat experiment

How to get started

  1. Open Miniforge Prompt () or a Terminal (/).
  2. Clone the GELMON25 repository.
git clone https://github.com/gimli-org/gelmon25.git
cd gelmon25
  1. Install the pg environment with required dependencies (particularly pygimli=1.5.3).
conda env create
  1. Activate environment and start a Jupyter Notebook.
conda activate pg
jupyter notebook

Follow without a local installation

You can also visit https://colab.research.google.com, open an empty notebook and type !pip install pygimli tetgen.

Practising

Let’s find out what you already know and what you’re interested in!

Do you know it and if no do you want to learn it?

  • array generation and sensitivity distribution
  • mesh generation and synthetic modelling
  • field data inversion
  • error estimation and reciprocal data analysis
  • structural constraints in
  • using petrophysical relations
  • a-priori constraints
  • image appraisal (resolution and DOI)
  • basic timelapse strategies
  • automated timelapse processing
  • complex conductivity inversion
  • spectral (FD or TD) inversion of DC/IP data

The infiltration case (s. also SEG webinar)

  1. Load, process, visualize data
  2. Test different meshes
  3. Different regularizations
  4. Add prior information
  5. petrophysics
  6. Visualize results in 2D & 3D
  7. Time-lapse inversion

Survey layout after Hübner et al. (2017)

The heat case (s. also talk)

  1. Load, and visualize data
  2. look at data timeseries
  3. select 2D subsets
  4. Visualize results in 2D & 3D
  5. Time-lapse inversion

Temperature distribution crosshole ERT

References

Hübner, R., Günther, T., Heller, K., Noell, U., & Kleber, A. (2017). Impacts of a capillary barrier on infiltration and subsurface stormflow in layered slope deposits monitored with 3-d ERT and hydrometric measurements. Hydrology and Earth System Sciences, 21(10), 5181–5199. https://doi.org/10.5194/hess-21-5181-2017
Hübner, R., Heller, K., Günther, T., & Kleber, A. (2015). Monitoring hillslope moisture dynamics with surface ERT for enhancing spatial significance of hydrometric point measurements. Hydrology and Earth System Sciences, 19(1), 225–240. https://doi.org/10.5194/hess-19-225-2015
Kuras, O., Pritchard, J., Meldrum, P., Chambers, J., Wilkinson, P., Ogilvy, R., & Wealthall, G. (2009). Monitoring hydraulic processes with automated time-lapse electrical resistivity tomography (ALERT). Compt. Rendus Geosci., 341(10-11), 868–885.
Ronczka, M., Günther, T., Grinat, M., & Wiederhold, H. (2020). Monitoring freshwater-saltwater interfaces with SAMOS - installation effects on data and inversion. Near Surface Geophysics, 18(4), 369–383. https://doi.org/10.1002/nsg.12115
Ronczka, M., Günther, T., & Stoeckl, L. (2014). Geoelectrical monitoring of freshwater-saltwater interaction in physical model experiments. 23rd Saltwater Intrusion Meeting (SWIM), Husum, Germany.
Ronczka, M., Voß, T., & Günther, T. (2015). Cost-efficient imaging and monitoring of saltwater in a shallow aquifer by using long electrode {ERT}. Journal of Applied Geophysics, 122, 202–209. https://doi.org/10.1016/j.jappgeo.2015.08.014
Rücker, C., Günther, T., & Wagner, F. M. (2017). pyGIMLi: An open-source library for modelling and inversion in geophysics. Computers and Geosciences, 109, 106–123. https://doi.org/10.1016/j.cageo.2017.07.011
Wagner, F. M., Mollaret, C., Günther, T., Kemna, A., & Hauck, C. (2019). Quantitative imaging of water, ice, and air in permafrost systems through petrophysical joint inversion of seismic refraction and electrical resistivity data. Geophysical Journal International, 219(3), 1866–1875. https://doi.org/10.1093/gji/ggz402