Pymaginverse: A python package for global geomagnetic field modeling

Data-based geomagnetic models are key for mapping the global field, predicting the movement of magnetic poles, understanding the complex processes happening in the outer core, and describing the global expression of magnetic field reversals. There exists a wide range of models, which differ in a pri...

Full description

Bibliographic Details
Main Authors: Frenk Out, Maximilian Schanner, Liz van Grinsven, Monika Korte, Lennart V. de Groot
Format: Article
Language:English
Published: Elsevier 2025-02-01
Series:Applied Computing and Geosciences
Subjects:
Online Access:http://www.sciencedirect.com/science/article/pii/S2590197425000047
_version_ 1826852884693647360
author Frenk Out
Maximilian Schanner
Liz van Grinsven
Monika Korte
Lennart V. de Groot
author_facet Frenk Out
Maximilian Schanner
Liz van Grinsven
Monika Korte
Lennart V. de Groot
author_sort Frenk Out
collection DOAJ
description Data-based geomagnetic models are key for mapping the global field, predicting the movement of magnetic poles, understanding the complex processes happening in the outer core, and describing the global expression of magnetic field reversals. There exists a wide range of models, which differ in a priori assumptions and methods for spatio-temporal interpolation. A frequently used modeling procedure is based on regularized least squares (RLS) spherical harmonic analysis, which has been used since the 1980s. The first version of this algorithm has been written in Fortran and inspired many different research groups to produce versions of the algorithm in other programming languages, either published open-access or only accessible within the institute. To open up the research field and allow for reproducibility of results between existing versions, we provide a user-friendly open-source Python version of this popular algorithm. We complement this method with an overview on background literature – concerning Maxwells equations, spherical harmonics, cubic B-Splines, and regularization – that forms the basis for RLS geomagnetic models. We included six spatial and two temporal damping methods from literature to further smooth the magnetic field in space and time. Computational resources are kept to a minimum by employing the banded structure of the normal equations involved and incorporating C-code (with Cython) for matrix formation, enabling a massive speed-up. This ensures that the algorithm can be executed on a simple laptop, and is as fast as its Fortran predecessor. Four tutorials with ample examples show how to employ the new lightweight and quick algorithm. With this properly documented open-source Python algorithm, we have the intention to encourage current and new users to employ and further develop the method.
first_indexed 2025-02-16T17:15:24Z
format Article
id doaj.art-4873efc9d24b46508733abba8930a44b
institution Directory Open Access Journal
issn 2590-1974
language English
last_indexed 2025-02-16T17:15:24Z
publishDate 2025-02-01
publisher Elsevier
record_format Article
series Applied Computing and Geosciences
spelling doaj.art-4873efc9d24b46508733abba8930a44b2025-01-28T04:14:52ZengElsevierApplied Computing and Geosciences2590-19742025-02-0125100222Pymaginverse: A python package for global geomagnetic field modelingFrenk Out0Maximilian Schanner1Liz van Grinsven2Monika Korte3Lennart V. de Groot4Paleomagnetic laboratory Fort Hoofddijk, Department of Earth Sciences, Utrecht University, Budapestlaan 17, 3584 CD Utrecht, The Netherlands; Corresponding author.Institute of applied mathematics, Potsdam University, Karl-Liebknecht-Str. 24-25, D-14476 Potsdam, Germany; Helmholtz Centre Potsdam, Deutsches GeoForschungsZentrum GFZ, Telegrafenberg, D-14473 Potsdam, GermanyPaleomagnetic laboratory Fort Hoofddijk, Department of Earth Sciences, Utrecht University, Budapestlaan 17, 3584 CD Utrecht, The NetherlandsHelmholtz Centre Potsdam, Deutsches GeoForschungsZentrum GFZ, Telegrafenberg, D-14473 Potsdam, GermanyPaleomagnetic laboratory Fort Hoofddijk, Department of Earth Sciences, Utrecht University, Budapestlaan 17, 3584 CD Utrecht, The NetherlandsData-based geomagnetic models are key for mapping the global field, predicting the movement of magnetic poles, understanding the complex processes happening in the outer core, and describing the global expression of magnetic field reversals. There exists a wide range of models, which differ in a priori assumptions and methods for spatio-temporal interpolation. A frequently used modeling procedure is based on regularized least squares (RLS) spherical harmonic analysis, which has been used since the 1980s. The first version of this algorithm has been written in Fortran and inspired many different research groups to produce versions of the algorithm in other programming languages, either published open-access or only accessible within the institute. To open up the research field and allow for reproducibility of results between existing versions, we provide a user-friendly open-source Python version of this popular algorithm. We complement this method with an overview on background literature – concerning Maxwells equations, spherical harmonics, cubic B-Splines, and regularization – that forms the basis for RLS geomagnetic models. We included six spatial and two temporal damping methods from literature to further smooth the magnetic field in space and time. Computational resources are kept to a minimum by employing the banded structure of the normal equations involved and incorporating C-code (with Cython) for matrix formation, enabling a massive speed-up. This ensures that the algorithm can be executed on a simple laptop, and is as fast as its Fortran predecessor. Four tutorials with ample examples show how to employ the new lightweight and quick algorithm. With this properly documented open-source Python algorithm, we have the intention to encourage current and new users to employ and further develop the method.http://www.sciencedirect.com/science/article/pii/S2590197425000047RLS geomagnetic modelsGeomagiaPaleomagnetismOpen research
spellingShingle Frenk Out
Maximilian Schanner
Liz van Grinsven
Monika Korte
Lennart V. de Groot
Pymaginverse: A python package for global geomagnetic field modeling
Applied Computing and Geosciences
RLS geomagnetic models
Geomagia
Paleomagnetism
Open research
title Pymaginverse: A python package for global geomagnetic field modeling
title_full Pymaginverse: A python package for global geomagnetic field modeling
title_fullStr Pymaginverse: A python package for global geomagnetic field modeling
title_full_unstemmed Pymaginverse: A python package for global geomagnetic field modeling
title_short Pymaginverse: A python package for global geomagnetic field modeling
title_sort pymaginverse a python package for global geomagnetic field modeling
topic RLS geomagnetic models
Geomagia
Paleomagnetism
Open research
url http://www.sciencedirect.com/science/article/pii/S2590197425000047
work_keys_str_mv AT frenkout pymaginverseapythonpackageforglobalgeomagneticfieldmodeling
AT maximilianschanner pymaginverseapythonpackageforglobalgeomagneticfieldmodeling
AT lizvangrinsven pymaginverseapythonpackageforglobalgeomagneticfieldmodeling
AT monikakorte pymaginverseapythonpackageforglobalgeomagneticfieldmodeling
AT lennartvdegroot pymaginverseapythonpackageforglobalgeomagneticfieldmodeling