EGU26-1578, updated on 13 Mar 2026
https://doi.org/10.5194/egusphere-egu26-1578
EGU General Assembly 2026
© Author(s) 2026. This work is distributed under
the Creative Commons Attribution 4.0 License.
Oral | Tuesday, 05 May, 11:40–11:50 (CEST)
 
Room -2.20
The power of modularity in open-source projects
Dieter Werthmüller1,2, Seogi Kang3, Thomas Günther4, Wouter Deleersnyder5,6, María Carrizo Mascarell2,7, and Lukas Aigner8
Dieter Werthmüller et al.
  • 1Inst. of Geophysics, ETH Zurich, Switzerland
  • 2Dep. of Gesocience & Engineering, TU Delft, The Netherlands
  • 3Dep. of Earth Sciences, University of Manitoba, Canada
  • 4Inst. of Geophysics and Geoinformatics, TU Bergakademie Freiberg, Germany
  • 5Dep. of Physics and Astronomy, KU Leuven, Belgium
  • 6Dep. of Earth, Ocean and Atmospheric Sciences, The University of British Columbia, Canada
  • 7Seekable B.V., Amsterdam, The Netherlands
  • 8Dep. of Geodesy and Geoinformation, TU Wien, Austria

The advantages of well-documented and modularly designed open-source projects starts to shine when they allow for the combination of different tools to create new possibilities. We have achieved this in the last few years within the electromagnetic (EM) geophysics community.

PyGIMLi is an open-source library for multi-method modelling and inversion in geophysics. It is particularly strong in electrical resistivity tomography, induced polarization, magnetics, and seismic refraction tomography, as well as in joint inversions.

SimPEG is an open-source Python package for simulation and gradient-based parameter estimation in geophysical applications. It provides strong capabilities, particularly for modelling gravity, magnetics, direct current resistivity, induced polarization, and frequency- and time-domain electromagnetic data. Additionally, it provides a joint inversion capability. However, the analytical 1D forward modelling is, currently, limited to loop-loop configurations. Furthermore, for 3D EM modelling, it uses a direct solver with a large memory requirement.

The emsig project contains a variety of codes. One of them is empymod, a semi-analytical electromagnetic code for layered media that can model any source-receiver configuration. Another one is emg3d, a three-dimensional modeller for EM diffusion. It provides a matrix-free multigrid solver, which means that it has a comparatively low memory footprint. However, both of these codes are purely forward modelling codes, and contain no possibility for inversions.

We will present how these codes can be combined to use the forward modelling capabilities of emsig, together with the inversion capabilities of SimPEG and pyGIMli. This not only elevates all codes to create new tools in the form of SimPEG(emsig) and pyGIMLi(emsig), but more importantly, it also allows for comparisons between different frameworks. While doing these exercises, we did encounter some struggles and concepts that need to be modularized better and be improved in the future. In particular, forward modelling codes should provide easy ways to obtain the forward response as well as the (adjoint-state or analytical) gradient. Inversion codes, on the other hand, should be able to run the inversion without knowledge of the survey configuration or any of the underlying method, just with the forward responses and the gradients. These are ideas that are often not thought of when starting a new project, but they would make life much easier if they were, which is why we offer guidelines for developers to improve the modularity of future forward modeling and inversion codes.

How to cite: Werthmüller, D., Kang, S., Günther, T., Deleersnyder, W., Carrizo Mascarell, M., and Aigner, L.: The power of modularity in open-source projects, EGU General Assembly 2026, Vienna, Austria, 3–8 May 2026, EGU26-1578, https://doi.org/10.5194/egusphere-egu26-1578, 2026.