`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. However, care has to be taken that two header lines of the model files are formatted correctly and the list of spline knot point epochs starts only in line 3. The first header line has to contain start and end epoch of the model as the first two numbers, any further information in that line is ignored. The second header line has to start with three integers, which are the maximum spherical harmonic degree, a dummy that actually is not used, and the number of splines.
By default, `pymagglobal` includes several models. Use
```console
$pymagglobal --list-models
```
to get a list of these default models or go to [pymagglobal/dat](https://git.gfz-potsdam.de/sec23/korte/pymagglobal/-/tree/master/pymagglobal/dat) for further information. Using
```console
$pymagglobal ... <path/to/your_model>
```
you can use `pymagglobal` to evaluate your own models, if they come in a similar format. `<path/to/your_model>` specifies the path to your model and is given instead of the name of an included model. You can download additional models [here](ftp://ftp.gfz-potsdam.de/home/mag/arthus/pymagglobal_models/) and use them as above.
`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.
Once installed, `pymagglobal` can be imported and its routines used to access the models from inside your own python code.
For extensive documentation, including a more detailed description of the standard file format, check out the [docs](https://sec23.git-pages.gfz-potsdam.de/korte/pymagglobal).
## License
GNU General Public License, Version 3, 29 June 2007
Since [conda](https://docs.conda.io/) version 4.6, conda and pip get along well. So you can also run `pip3 install ...` from inside your conda environment.
## Documentation
Check out the extended documention [here](https://sec23.git-pages.gfz-potsdam.de/korte/pymagglobal).
pymagglobal comes with a GUI, that can be started from the command line via
```console
$pymagglobal-gui
```
You can also use pymagglobal directly from the command line, to get various results from the models. For example,
```console
$pymagglobal dipole gufm1
```
will give a plot of the dipole moment time series for the model gufm1. In general, pymagglobal is called as
```console
$pymagglobal command--options model
```
where `command` specifies the quantity you want to get from `pymagglobal` and `model` is the respective model. You can use
:code:`pymagglobal` serves the purpose of replacing some Fortran scripts, which are used in the geomagnetism community to evaluate global field models.
:ref:`pymagglobal <Overview>` 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.
:code:`pymagglobal` comes with a GUI, that can be started from the command line via
.. code-block:: bash
$ pymagglobal-gui
Installation
------------
.. note:
...
...
@@ -26,16 +20,13 @@ Installation
This should also help if you receive :code:`ImportError: NumPy 1.10+ is required to install cartopy.`
:code:`pymagglobal` is distributed via the PyPI registry of the corresponding repository. It can be installed using
pymagglobal is distributed via the PyPI registry of the corresponding repository. It can be installed using
See also `here <https://git.gfz-potsdam.de/sec23/korte/pymagglobal#installation>`_ and `here <https://git.gfz-potsdam.de/sec23/korte/pymagglobal#testing>`_.
.. include:: ../pymagglobal/dat/README.rst
Additional information can be found in the :ref:`installation section <Installation>`.
License
-------
...
...
@@ -55,11 +46,3 @@ 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/>.
:code:`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.
A detailed description of the file format, together with a list of the included models can be found below.
:code:`pymagglobal` comes with a GUI, that can be started from the command line via
.. code-block:: bash
$ pymagglobal-gui
You can also use pymagglobal directly from the command line, to get various results from the models. For example,
.. code-block:: bash
$ pymagglobal dipole gufm1
will give a plot of the dipole moment time series for the model gufm1. In general, pymagglobal is called as
.. code-block:: bash
$ pymagglobal command --options model
where `command` specifies the quantity you want to get from `pymagglobal` and `model` is the respective model. You can use
Additionally, the object contains several quantities of interest, for example the minimal and maximal time for which the model is valid
.. code-block:: python
>>> gufm1.t_min
1590.0
>>> gufm1.t_max
1990.0
By default, `pymagglobal` includes several models. A dictionary of the built in models is returned by `built_in_models`. The keys give a list of the model names, while the items point to the paths, where the models are stored. To access a dictionary of available models:
.. code-block:: python
models = built_in_models()
names = models.keys()
paths = models.items()
You can also use
.. code-block:: bash
$ pymagglobal --list-models
to get a list of these default models via the command line interface or check the table below.
.. code-block:: bash
$ pymagglobal ... <path/to/your_model>
you can use `pymagglobal` to evaluate your own models, if they come in a similar format. `<patodel>` specifies the path to your model and is given instead of the name of an included model.