Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

space-physics/geo2mag

Geographic ↔ Geomagnetic Coordinate Conversion

Convert geodetic coordinates to geomagnetic coordinates, using the UNENCRYPTED connection to IGRF web service: http://wdc.kugi.kyoto-u.ac.jp/igrf/gggm/index.html

Install

python -m pip install -e .

Optional: If you wish to plot maps, consider installing CartoPy like:

conda install cartopy

Usage

This program reads coordinates from file or command line.

python GeomagConvert.py 2015 -c 65 -148 geomag

65.56 -96.46

python GeomagConvert.py 2015 -c 65.56 -96.46 geodetic

65.004 -147.994

Read coords from file

Convert .KMZ file containing geodetic coordinates to geomagnetic coordinates:

python GeomagConvert.py 2015 -f tests/example.kml

or likewise with a CSV or XLS file.