{ "info": { "author": "Michael Hirsch, Ph.D.", "author_email": "scivision@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Fortran", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering :: Atmospheric Science" ], "description": "[![DOI](https://zenodo.org/badge/33064474.svg)](https://zenodo.org/badge/latestdoi/33064474)\n\n[![Actions Status](https://github.com/space-physics/igrf12/workflows/ci/badge.svg)](https://github.com/space-physics/igrf12/actions)\n\n[![Python versions (PyPI)](https://img.shields.io/pypi/pyversions/igrf12.svg)](https://pypi.python.org/pypi/igrf12)\n[![PyPi Download stats](http://pepy.tech/badge/igrf12)](http://pepy.tech/project/igrf12)\n\n# IGRF 2012 in Python\n\nInternational Geomagnetic Reference Field IGRF12 and IGRF11...in simple, object-oriented Python ≥ 3.6 or Matlab.\n\n![image](tests/incldecl.png)\n\n![image](tests/vectors.png)\n\n## Install\n\nA Fortran compiler is required, such as `gfortran`:\n\n* Linux: `apt install gfortran`\n* Mac: `brew install gcc`\n* [gfortran for Windows](https://www.scivision.dev/windows-gcc-gfortran-cmake-make-install/) (MinGW)\n Windows only: from Powershell:\n\n ```posh\n echo \"[build]`ncompiler=mingw32\" | Out-File -Encoding ASCII ~/pydistutils.cfg\n ```\n\nTo get the IGRF12 development version, `git clone` and then:\n```sh\npython -m pip install -e .\n```\n\nOtherwise, for the latest release from PyPi:\n```sh\npython -m pip install igrf12\n```\n\nOptionally, test the install with:\n```sh\npytest\n```\n\n### Windows\nIf you get ImportError on Windows for the Fortran module, try from the `iri2016` directory:\n\n```posh\ndel *.pyd\npython setup.py build_ext --inplace --compiler=mingw32\n```\n\n\n## Example\nTo make the plots in this readme:\n```sh\nigrf12\n```\n\nusing as a Python module at geodetic coordinates 65N, 148W:\n```python\nimport igrf12\n\nmag = igrf12.igrf('2010-07-12', glat=65, glon=-148, alt_km=100)\n```\nreturns an `xarray.Dataset`:\n```\n\nDimensions: (alt_km: 1)\nCoordinates:\n * alt_km (alt_km) int64 100\nData variables:\n north (alt_km) float64 1.122e+04\n east (alt_km) float64 4.148e+03\n down (alt_km) float64 5.302e+04\n total (alt_km) float64 5.436e+04\n incl (alt_km) float64 77.29\n decl (alt_km) float64 20.29\n```\n\nThe IGRF model may be specified with the `igrf12.igrf(model=)` option:\n* `11`: IGRF11\n* `12`: IGRF12\n\n### Matlab\nMatlab can seamlessly call Python modules, as in `igrf12.m`.\nInstead of the $1000 Aerospace Toolbox, use this free IGRF12 for Matlab.\n\n## Reference\n\nIf you only want the plain Fortran program, you can do:\n\n```sh\ncmake -B build\n\ncmake --build build --parallel\n\n./testigrf\n```\n\n### References\n\n- [IGRF12 Fortran code](http://www.ngdc.noaa.gov/IAGA/vmod/igrf12.f)\n- [IGRF11 Fortran code](http://www.ngdc.noaa.gov/IAGA/vmod/igrf11.f)\n- WMM2015 [inclination map](https://www.ngdc.noaa.gov/geomag/WMM/data/WMM2015/WMM2015_I_MERC.pdf)\n- WMM2015 [declination map](https://www.ngdc.noaa.gov/geomag/WMM/data/WMM2015/WMM2015_D_MERC.pdf)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/space-physics/igrf12", "keywords": "geomagnetic,igrf", "license": "", "maintainer": "", "maintainer_email": "", "name": "igrf12", "package_url": "https://pypi.org/project/igrf12/", "platform": "", "project_url": "https://pypi.org/project/igrf12/", "project_urls": { "Homepage": "https://github.com/space-physics/igrf12" }, "release_url": "https://pypi.org/project/igrf12/1.3.5/", "requires_dist": null, "requires_python": ">= 3.6", "summary": "IGRF12 model with simple object-oriented Python interface.", "version": "1.3.5" }, "last_serial": 5887052, "releases": { "1.3.3": [ { "comment_text": "", "digests": { "md5": "4a159aaefecc52461962f167934516d2", "sha256": "324b1c14a9b0ede542fa9439dfeaffaf1cc021bb82c81323d2b195abd121d22e" }, "downloads": -1, "filename": "igrf12-1.3.3.tar.gz", "has_sig": false, "md5_digest": "4a159aaefecc52461962f167934516d2", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.6", "size": 402283, "upload_time": "2018-08-14T17:24:08", "url": "https://files.pythonhosted.org/packages/fb/9e/5709aa1d52299d98c81e7db16ff8326faf35b8a9812950b503dcabb23725/igrf12-1.3.3.tar.gz" } ], "1.3.4": [ { "comment_text": "", "digests": { "md5": "c8e65fb599b91ce47e28471819e494ec", "sha256": "7e469ebbc6c761ff58ae84456a96921c4cdf9933f085d5d6e709c314ee3de1ee" }, "downloads": -1, "filename": "igrf12-1.3.4.tar.gz", "has_sig": false, "md5_digest": "c8e65fb599b91ce47e28471819e494ec", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.6", "size": 403179, "upload_time": "2018-08-14T19:42:33", "url": "https://files.pythonhosted.org/packages/eb/07/fd857a0a70210da856a4ecb12a0ad3bb18c04d3e019f7bc3a448c0ce716a/igrf12-1.3.4.tar.gz" } ], "1.3.5": [ { "comment_text": "", "digests": { "md5": "a9bfddc9109788dab531f6941e6ba27e", "sha256": "5eca83f19a41a4c9ea6eb32d6ad87851bb1606eff52a373ba731303912f4c78b" }, "downloads": -1, "filename": "igrf12-1.3.5.tar.gz", "has_sig": false, "md5_digest": "a9bfddc9109788dab531f6941e6ba27e", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.6", "size": 25658, "upload_time": "2019-09-25T19:58:39", "url": "https://files.pythonhosted.org/packages/b3/af/45538b972e0d56213411035c7994f5e6197bf3dfb5d478447b7e785e8f9a/igrf12-1.3.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9bfddc9109788dab531f6941e6ba27e", "sha256": "5eca83f19a41a4c9ea6eb32d6ad87851bb1606eff52a373ba731303912f4c78b" }, "downloads": -1, "filename": "igrf12-1.3.5.tar.gz", "has_sig": false, "md5_digest": "a9bfddc9109788dab531f6941e6ba27e", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.6", "size": 25658, "upload_time": "2019-09-25T19:58:39", "url": "https://files.pythonhosted.org/packages/b3/af/45538b972e0d56213411035c7994f5e6197bf3dfb5d478447b7e785e8f9a/igrf12-1.3.5.tar.gz" } ] }