Geophysical modelling performs to obtain subsurface structures in agreement with measured data. Freeware algorithms for geoelectrical data inversion have not been widely used in geophysical communities; however, different open-source modelling/inversion algorithms were developed in recent years. In this study, we review the structures and applications of openly Python-based inversion packages, such as pyGIMLi (Python Library for Inversion and Modelling in Geophysics), BERT (Boundless Electrical Resistivity Tomography), ResIPy (Resistivity and Induced Polarization with Python), pyres (Python wrapper for electrical resistivity modelling), and SimPEG (Simulation and Parameter Estimation in Geophysics). In addition, we examine the recovering ability of pyGIMLi, BERT, ResIPy, and SimPEG freeware through inversion of the same synthetic model forward responses. A versatile pyGIMLi freeware is highly suitable for various geophysical data inversion. The SimPEG framework is developed to allow the user to explore, experiment with, and iterate over multiple approaches to the inverse problem. In contrast, BERT, pyres, and ResIPy are exclusively designed for geoelectric data inversion. BERT and pyGIMLi codes can be easily modified for the intended applications. Both pyres and ResIPy use the same mesh designs and inversion algorithms, but pyres uses scripting language, while ResIPy uses a graphical user interface (GUI) that removes the need for text inputs. Our numerical modelling shows that all the tested inversion freeware could be effective for relatively larger targets. pyGIMLi and BERT could also obtain reasonable model resolutions and anomaly accuracies for small-sized subsurface structures. Based on the heterogeneous layered model and experimental target scenario results, the geoelectrical data inversion could be more effective in pyGIMLi, BERT, and SimPEG freeware packages. Moreover, this study can provide insight into implementing suitable inversion freeware for reproducible geophysical research, mainly for geoelectrical modelling.
The direct current resistivity method is widely used in geophysical near-surface prospecting, such as hydrogeological (Chambers et al. 2006; Chang et al. 2017; Zhang et al. 2016), geological structure (Caputo et al. 2003; Chang et al. 2015), engineering (Arjwech and Everett 2019; Lin et al. 2013), and environmental (Cardarelli et al. 2010; Van Schoor 2002) surveys. The resistivity method has been significantly advanced in data acquisitions and inversion techniques in recent decades. Modern resistivity acquisition obtains a large number of data in two dimension (2D) and three dimension (3D) to recover complex geological structures that are not possible with a one-dimensional (1D) survey (Dahlin and Zhou 2004; Sharma and Verma 2015). The measured apparent resistivity data can be inverted to reconstruct subsurface spatial resistivity distribution using inversion algorithms. Although several commercial inversion software have been established for geoelectric data inversion, they are less extensible to use and not easily accessible for independent researchers. Technically versatile users can also commonly end up building individually tailored solutions by linking various existing potentially commercial software through scripts, which hinders the reproducibility of scientific researches (Peng 2011). This motivates and supports the need for modern freeware architectures for the numerical tasks in geophysical studies.
This paper reviews the commonly used geoelectric data inversion freeware established in the Python interface. The freeware includes pyGIMLi (Python Library for Inversion and Modelling in Geophysics), BERT (Boundless Electrical Resistivity Tomography), ResIPy (Resistivity and Induced Polarization with Python), pyres (Python wrapper for electrical resistivity modelling), and SimPEG (Simulation and Parameter Estimation in Geophysics). We reviewed based on code structures, mesh designs, package dependencies, and applications.
Even though various studies implement inversion freeware for multiple applications (Benjamin et al. 2020; Gourdol et al. 2018; Klingler et al. 2020), there are no studies that assess the effectiveness of different freeware packages for geoelectric data inversion. We examine the pyGIMLi, BERT, ResIPy, and SimPEG freeware performances by inverting the same input models. A conceptual model with low and high resistive targets sets at different depths of the homogeneous host medium is used to measure the apparent resistivity data synthetically. The inverted models have shown variations based on the target size and buried depth in addition to the type of inversion freeware used. In addition, we have suggested suitable inversion freeware for subsurface structural studies. Overall, this review paper may encourage geoscientific communities to implement the inversion freeware for modelling and inverting geoelectrical datasets.
pyGIMLi package is created using a Python programming script that provides modular functionality for different geophysical studies. The architecture of pyGIMLi constitutes three significant conceptual levels: the equation, the modelling, and the application levels. The equation level provides an interface to solve partial differential equations on a given mesh, comprising all geometric specifications, for instance, topography and known subsurface structures. The modelling level represents a collection of classes to solve a simulation task for a specific geophysical method by applying the equation level or using appropriate calculations. The application-level defines a general framework to solve basic and advanced inversion tasks, like time-lapse and joint inversion. All the conceptual levels interacted through a unified Python interface to resolve the forward and inverse problem of the resistivity method. A more comprehensive design and architecture of pyGIMLi freeware are explained by Rücker et al. (2017).
BERT applies efficient meshing approaches for resistivity problem formulation. It uses unstructured triangular mesh for 2D modelling while tetrahedral mesh for 3D modelling (Günther and Rücker 2015). Similar to pyGIMLi, the BERT freeware can control mesh quality that enhances the numerical accuracy of the forward calculations. It can also import a free and versatile mesh from external mesh generators, including TetGen (Si 2015) and Gmsh (Geuzaine and Remacle 2009).
ResIPy can also enable the modelling and inversion of geoelectric datasets. It is established under the Python interface, and its source code is available on a GitLab repository ( ). ResIPy applies the freely available codes, such as R2, R3t, and cR2. The R2 and R3t codes are developed to solve the 2D and 3D direct current resistivity. On the contrary, the cR2 code is designed to solve the induced polarization problem (Binley and Kemna 2005). These codes require formatted text files for input, forward and inverse model setting, and mesh construction. However, the graphic user interface (GUI) in ResIPy removes the need for such text input and assists the user in pre- and post-processing stages. As shown in Fig. 3, ResIPy implements structured quadrilateral and unstructured triangular finite element meshes for resistivity calculations. Additionally, it can import complex mesh from Gmsh (Geuzaine and Remacle 2009). We forward the reader to Blanchy et al. (2020) for further design aspects of ResIPy.
SimPEG mainly implements a staggered grid and mimetic finite volume discretization on structured and semi-structured meshes (Hyman and Shashkov 1999). This approach requires definitions of variables at either cell centres, nodes, faces, or edges. Its forward resistivity calculation uses three different meshes: Tensor, Tree, and Curvilinear meshes (Cockett et al. 2015). The type of needed mesh can be imported from SimPEG libraries, including the supporting modules of NumPy and SciPy (Bressert 2012). Moreover, in a 1D direct current resistivity experiment, the governing equation with supplied boundary conditions can be solved using finite volume, finite element, integral equation, or semi-analytical method.
We develop a synthetic resistivity model to examine the effectiveness of Python-based inversion freeware, such as pyGIMLi, BERT, ResIPy, and SimPEG. This study uses the latest freeware versions: pyGIMLi 1.2.2, BERT 2.3.2, ResIPy 3.3.2, and SimPEG 0.15.1; their future inversion performance may be varied due to different advancements of the tested freeware codes. We use a conceptual model representing a horizontally stratified sedimentary layer and archaeological targets buried in a homogeneous host medium. Forward resistivity modelling is performed for a layered geologic model that consists of a sand layer with a resistivity value of 200 Ωm, a gravel layer with a resistivity value of 600 Ωm, and a moderately fractured sandstone with a resistivity value of 1000 Ωm, respectively, from top to bottom (Fig. 8a). Moreover, we conduct forward simulation for an archaeological model (Fig. 5a) comprising a conductive target (left side) with a resistivity value of 10 Ωm and a relatively resistive target (right side) with a resistivity value of 100 Ωm, buried in a silty clay host medium with a resistivity value of 50 Ωm (Keller 2017). We use four different scenarios based on the target sizes and survey depths. A 1 m target radius is set at three different depths to assess the depth effect on the performances of the inversion freeware; thus, the 1 m target is buried at 1.5 m deep in scenario one, at 3 m deep in scenario two, and 5 m deep in scenario three. We also use scenario four, a 2 m target radius situated at 3 m depth, to examine the size effect.
The general framework of the forward-inverse modelling of geoelectric data: a synthetic model with two target bodies representing simple subsurface reality, b model discretization, c synthetic measure of apparent resistivity data, and d recovered model 1e1