G⁻¹Lab

G⁻¹Lab is a framework to solve forward and inverse geophysical problems either using deterministic (optimization) or probabilistic (Monte Carlo) methods. It includes several packages addressing seismological and potential field problems and algorithms to solve the related inverse problems. G⁻¹Lab is a super-set of the HMCLab framework (Zunino et al. 2023) and has thus absorbed all of the HMCLab packages. It is written in the easy to use yet performant Julia language.
The core problems that are currently addressed are:

- Acoustic and elastic seismic wave propagation, providing tools to solve both the forward problem and also to compute gradients using the adjoint method. The codes are parallelized on xPUs, meaning the can run on either multi-core machines (threads) or on GPUs (Nvidia, AMD and Apple GPUs).

- Seismic traveltime computations by solving the eikonal equation in 2D and 3D using the fast-marching method for forward calculations and the discrete adjoint state method to compute gradients. The provided gradients target both the velocity model and the source location, i.e., both tomography and source location can be addressed.

- Magnetic and gravity anomalies (including joint) calculations for polygonal shapes in 2D or 2.75D. Forward solvers and functions to compute gradients based on automatic differentiation are provided. The gradients can be calculated both with respect to the position of the vertices of the polygons or the material properties.

For all the forward problems included in G⁻¹Lab, a set of deterministic and probabilistic inverse algorithms are provided. These currently include:

- Hamiltonian Monte Carlo algorithm and its No U-Turn (NUTS) variant, in addition the the standard Metropolis algorithm.

- l-BFGS and Gauss-Newton optimization algorithms.

G⁻¹Lab is in constant evolution: existing packages are improved and new packages are added.

 

Website

Website: external page https://github.com/GinvLab
General documentation: external page https://ginvlab.github.io

 

Publications

Zunino, A, Keating, S., Fichtner, A. (2025), A discrete adjoint method for deterministic and probabilistic eikonal-equation-based inversion of traveltime for velocity and source location, arXiv preprint arXiv:2501.13532, external page https://arxiv.org/abs/2501.13532v1.

Zunino, A., Gebraad, L., Ghirotto, A., Fichtner, A., (2023). HMCLab: a framework for solving diverse geophysical inverse problems using the Hamiltonian Monte Carlo method. Geophysical Journal International 235, 2970-2991, external page https://doi.org/10.1093/gji/ggad403.

Zunino, A., Ghirotto, A., Armadillo, E., Fichtner, A. (2022). Hamiltonian Monte Carlo probabilistic joint inversion of 2D (2.75D) gravity and magnetic data. Geophysical Research Letters, 49, e2022GL099789. external page https://doi.org/10.1029/2022GL099789.