Skip to main content

WMM2020 geomagnetic model with simple object-oriented Python interface

Project description

WMM2020_CEXT

This library was modified to make a Python C Extension. This makes the library easy to install if you have the proper compilers installed. Additionally, I published Windows .whl binaries to pypi.org.

Install

wmm2020_cext has prebuilt Windows binaries (.whl files), so the library can easily be installed with pip.

python -m pip install wmm2020_cext

Use with wmm2020

import wmm2020
import numpy as np

wmm2020.wmm(np.array([0]), np.array([0]), 0, 0)

Manually Install

Install Visual Studio C Compilers https://wiki.python.org/moin/WindowsCompilers to compile the C extension. If this is done correctly you can simply pip install ./path/to/library or build your binaries python setup.py bdist_wheel (or pip wheel --no-deps ./path/to/library). The wheel library is required.

WMM2020

Actions Status Language grade: Python Python versions (PyPI) Downloads

WMM2020 World Magnetic Model...in simple, object-oriented Python. WMM2015 is also available. Tested on Linux, Mac and Windows. Most C compilers work. At this time Visual Studio is not supported since MSVC doesn't export function symbols without additional headers, which is typically done with something like SWIG.

image

Install

for the latest release from PyPi:

python -m pip install wmm2020

Optionally, to get the cutting-edge development version:

git clone https://github.com/space-physics/wmm2020

python -m pip install -e wmm2020

This Python wrapper of WMM2020 uses our build-on-run technique. The first time you use WMM2020, you will see messages from the Meson build system and your C compiler.

Usage

an example script

python RunWMM2020.py

or as a Python module:

import wmm2020

mag = wmm2020.wmm(glat, glon, alt_km, yeardec)

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wmm2020_cext-1.1.3.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

wmm2020_cext-1.1.3-cp39-cp39-win32.whl (6.4 MB view details)

Uploaded CPython 3.9 Windows x86

wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

wmm2020_cext-1.1.3-cp38-cp38-win32.whl (6.4 MB view details)

Uploaded CPython 3.8 Windows x86

wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.7m Windows x86-64

wmm2020_cext-1.1.3-cp37-cp37m-win32.whl (6.4 MB view details)

Uploaded CPython 3.7m Windows x86

File details

Details for the file wmm2020_cext-1.1.3.tar.gz.

File metadata

  • Download URL: wmm2020_cext-1.1.3.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3.tar.gz
Algorithm Hash digest
SHA256 5370ac5824eaa7ec03366fe65ecfbd84e31192d4bd85f4c4a6437672cdacab53
MD5 3e748111dd00e4edb3594df9aae92fd1
BLAKE2b-256 f5686d25715fd8b37e0b0dbad96c4042f34cdc3d668b4067d88e36ecc3d81d2d

See more details on using hashes here.

File details

Details for the file wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d6ade1ecaf7b198d753a0c2b709d2bdd8c32cf107e4bff7bfa1ad8d11441bc21
MD5 5abaf8f2f149c9099e0d405172da767f
BLAKE2b-256 56fb38b191ca3bd6a09c70b89ad88467d150a53c5315249ec687330b189a44f0

See more details on using hashes here.

File details

Details for the file wmm2020_cext-1.1.3-cp39-cp39-win32.whl.

File metadata

  • Download URL: wmm2020_cext-1.1.3-cp39-cp39-win32.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 de855e3c733a3cc5c6cf80d659f43cd27ced9d1ab1d9aeb54db0b9883eb4b1c5
MD5 402a28f817a8bd9a35abcb07231c53d7
BLAKE2b-256 4003aa0a9abe7bf3a071b0e73f1e0391efa925bf42e3934ceed488fe334c5842

See more details on using hashes here.

File details

Details for the file wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4af2f45e8432ca6659145bb0d6b68ea66622e332c52a7676f162125d442f4962
MD5 87549c520de80d8592afb5f719e755dc
BLAKE2b-256 92353bdde1d9ddd952059106da8542a4db20f2b9e87e2652261c04b5d9e351bb

See more details on using hashes here.

File details

Details for the file wmm2020_cext-1.1.3-cp38-cp38-win32.whl.

File metadata

  • Download URL: wmm2020_cext-1.1.3-cp38-cp38-win32.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 f8b10991db8acb9ba2fa1d2783fa19fb13a1f8810800f7ab895be289c283c23a
MD5 05485bef5d675de0dcea9729e363da52
BLAKE2b-256 bbbb7ed08d289dc4bb4a1b1646d8d099677a5563f31d621f48b1def7eb7cf6db

See more details on using hashes here.

File details

Details for the file wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6d18eb4781a7f063f55eab345b731fad14ac6abb260f9b4b4c7bd2b04f1e99d2
MD5 834969cbdb8fdac51218cbc863629558
BLAKE2b-256 3e1ed90647dca4410728f604f67ea8596612997311260397df592a464e5172f9

See more details on using hashes here.

File details

Details for the file wmm2020_cext-1.1.3-cp37-cp37m-win32.whl.

File metadata

  • Download URL: wmm2020_cext-1.1.3-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for wmm2020_cext-1.1.3-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 f6f858b77e34e4e21336ca6da385f6bf58fc5b9171ce657352a9c984309c230d
MD5 bab2a38412b8d4ec1430b974fea7616f
BLAKE2b-256 d8adf72459fec30c1238868f266731bad74f8bbc4d8a949ce9bbe86fb4adbdc5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page