Skip to content
Snippets Groups Projects
user avatar
Maximilian Schanner authored
68a1ba86
History

pymagglobal

python interface for global geomagnetic field models

pymagglobal serves the purpose of replacing some Fortran scripts, which are used in the geomagnetism community to evaluate global field models. It can be applied to all cubic-spline based geomagnetic field models stored in the same file format as gufm1 or the CALSxk model series.

For extensive documentation, including a more detailed description of the standard file format, check out the docs.

License

GNU General Public License, Version 3, 29 June 2007

Copyright (C) 2020 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences, Potsdam, Germany (https://www.gfz-potsdam.de)

pymagglobal is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

pymagglobal is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Data files are licensed under CC-BY 4.0.

Citation

Schanner, M. A.; Mauerberger, S.; Korte, M. (2020)
pymagglobal - Python interface for global geomagnetic field models. V. 0.1.0.
GFZ Data Services. https://doi.org/10.5880/GFZ.2.3.2020.005
DOI

Installation

Note: pymagglobal depends on cartopy. You have to install it, before running the install command.
This should also help if you receive ImportError: NumPy 1.10+ is required to install cartopy.

pymagglobal is distributed via the PyPI registry of this repository. It can be installed using

$ pip3 install pymagglobal --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple

Since conda version 4.6, conda and pip get along well. So you can also run pip3 install ... from inside your conda environment.

Testing

To test your pymagglobal installation, run

$ python tests/run_tests.py

from <pymagglobal>. Some tests require FieldTools, packaging and orthopoly and will be skipped, if the respective pacakges are not available. You can install orthopoly and packaging together with pymagglobal, by running

$ pip install pymagglobal[tests] --extra-index-url https://public:5mz_iyigu-WE3HySBH1J@git.gfz-potsdam.de/api/v4/projects/1055/packages/pypi/simple

Documentation

Extensive documentation is available here.

Contact

  • Maximilian Schanner
    Helmholtz Centre Potsdam German Research Centre for Geoscienes GFZ
    Section 2.3: Geomagnetism
    Telegrafenberg
    14473 Potsdam, Germany

References

pymagglobal uses numpy, scipy, matplotlib and cartopy:

[scipy] Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland,
Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson,
Warren Weckesser, Jonathan Bright, Stéfan J. van der Walt, Matthew Brett,
Joshua Wilson, K. Jarrod Millman, Nikolay Mayorov, Andrew R. J. Nelson,
Eric Jones, Robert Kern, Eric Larson, CJ Carey, İlhan Polat, Yu Feng,
Eric W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman,
Ian Henriksen, E.A. Quintero, Charles R Harris, Anne M. Archibald,
Antônio H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt,
and SciPy 1.0 Contributors (2020)
"SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python".
Nature Methods, in press.
https://doi.org/10.1038/s41592-019-0686-2

[matplotlib] J. D. Hunter (2007)
"Matplotlib: A 2D Graphics Environment",
Computing in Science & Engineering, vol. 9, no. 3, pp. 90-95
https://doi.org/10.1109/MCSE.2007.55

[cartopy] UK Met Office (2018)
"Cartopy: a cartographic python library with a Matplotlib interface"

For testing pymagglobal, we use pyfield, orthopoly and packaging:

[pyfield] Matuschek, H. and Mauerberger, S. (2019)
FieldTools - A toolbox for manipulating vector fields on the sphere
GFZ Data Services. 10.5880/fidgeo.2019.033

[orthopoly] Mark Baum (2020)
wordsworthgroup/orthopoly v0.7 (Version v0.7)
Zenodo. http://doi.org/10.5281/zenodo.3779456