EGU22-4857, updated on 27 Mar 2022
EGU General Assembly 2022
© Author(s) 2022. This work is distributed under
the Creative Commons Attribution 4.0 License.

A python interface for global geomagnetic field models: pymagglobal

Maximilian Arthus Schanner1, Stefan Mauerberger, and Monika Korte2
Maximilian Arthus Schanner et al.
  • 1Applied Mathematics, University of Potsdam, Germany (
  • 2GFZ Potsdam, Section 2.3 Geomagnetism, Germany

We present pymagglobal, a simple to use python interface for global geomagnetic field models. Pymagglobal was developed to provide easy access to global, spherical harmonics based magnetic main field models over historical and paleomagnetic times. The software readily handles cubic-spline based geomagnetic field models stored in the same file format as gufm1 or the CALSxk model series out of the box. Models in other file formats can be incorporated with minimal effort using the python backend. The python interface can, e.g., give model curves for any location, time series of dipole moment or spherical harmonic coefficients or grids and maps of magnetic field components. 

Pymagglobal can be installed by a single command and comes with a command line interface and a GUI, that allows easy extraction and visualization of information from the models. Additionally, the python backend can be used to access the models, for example to generate synthetic data or refer to them in your own analysis. Emphasis is put on documentation and accessibility. The package is available via a git repository  and a custom website at

How to cite: Schanner, M. A., Mauerberger, S., and Korte, M.: A python interface for global geomagnetic field models: pymagglobal, EGU General Assembly 2022, Vienna, Austria, 23–27 May 2022, EGU22-4857,, 2022.