igrf

授权协议 MIT License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 邢和光
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

IGRF 13 in Python

Actions Status

International Geomagnetic Reference Field: IGRF13 in object-oriented Python or Matlab.

Install

A Fortran compiler is required, such as gfortran:

To get the IGRF Python development version, git clone and then:

python -m pip install -e .

Otherwise, for the latest release from PyPi:

python -m pip install igrf

Optionally, test the install with:

pytest

Example

To make the plots in this readme:

igrf

using as a Python module at geodetic coordinates 65N, 148W:

import igrf

mag = igrf.igrf('2010-07-12', glat=65, glon=-148, alt_km=100)

returns an xarray.Dataset:

<xarray.Dataset>
Dimensions:  (alt_km: 1)
Coordinates:
  * alt_km   (alt_km) int64 100
Data variables:
    north    (alt_km) float64 1.122e+04
    east     (alt_km) float64 4.148e+03
    down     (alt_km) float64 5.302e+04
    total    (alt_km) float64 5.436e+04
    incl     (alt_km) float64 77.29
    decl     (alt_km) float64 20.29

Matlab

Matlab can seamlessly call Python modules, as used in igrf.m.Instead of the $1000 Aerospace Toolbox, use this free IGRF for Matlab like:

igrf.igrf(datetime(2020,1,3,5,4,22), 20, 60, 0)

You may find it helpful to run "setup.m" first to setup the library paths.

References

  • International Geomagnetic Reference Field (IGRF) Model The International Geomagnetic Reference Field (IGRF) is an internationally agreed upon mathematical model of the Earth's magnetic field. This pro

  • 下载于官方网址 https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html 国际地磁参考场-地球主要磁场的标准数学描述的最新版本 matlab 代码: https://ww2.mathworks.cn/matlabcentral/fileexchange/34388-international-geomagnetic-reference-field-igrf-mod

相关阅读

相关文章

相关问答

相关文档