SHTOOLS - Spherical Harmonic Tools
Project description
SHTOOLS/pyshtools is a Fortran-95/Python library that can be used for spherical harmonic transforms, multitaper spectral analyses, expansions of gridded data into Slepian basis functions, standard operations on global gravitational and magnetic field data.
TABLE OF CONTENTS
FEATURES
-
Supports all standard normalizations and phase conventions of the spherical harmonic functions.
-
Effortless conversion between real and complex harmonics, and between different normalization and phase conventions.
-
Use of both regularly sampled geographic grids and grids appropriate for Gauss-Legendre quadrature.
-
Spherical harmonic transforms proven to be accurate up to about degree 2800 for the native Fortran 95 backend and beyond using the DUCC0 backend.
-
Perform localized multitaper spectral analyses, or expand gridded data in terms of localized Slepian basis functions.
-
Support for standard data and file formats, including xarray and netcdf.
-
Import research-grade gravity, topography, and magnetic field datasets with a single command.
-
Creation of publication quality maps using Cartopy and PyGMT.
-
Support multithreaded programming using the OpenMP API.
HOW TO USE
A variety of Python tutorials and guides are available to explain the main library features. To get started, click on the following Python tutorials and run them interactively in Binder:
- Spherical harmonic coefficients and grids
- Localization windows and spectral analysis
- Gravity and magnetic fields
- Plotting maps
INSTALLATION
SHTOOLS can be invoked in any Fortran 95 or Python program. The core software is written in Fortran 95, and Python wrappers and dedicated classes allow simple access to the fortran-compiled routines. To install it, run these commands below:
pyshtools (for Python)
Install using conda
:
conda install -c conda-forge pyshtools
conda update -c conda-forge pyshtools # to upgrade a pre-existing installation
Install using pip
:
pip install pyshtools
pip install --upgrade pyshtools # to upgrade a pre-existing installation
pip install pyshtools --no-binary pyshtools # build from source
pip install git+https://github.com/SHTOOLS/SHTOOLS@develop # install the develop branch from source
For developers:
Install the system level build requirements:
sudo apt-get install build-essential cmake gfortran # Debian, Ubuntu and derivatives
sudo dnf group install "C Development Tools and Libraries" "Development Tools" # Fedora, Centos, RHEL and derivatives
sudo dnf install cmake gcc-fortran # Fedora, Centos, RHEL and derivatives
xcode-select --install # macOS
Then clone the shtools repo, install the other dependencies, and install manually in a conda environment:
git clone https://github.com/SHTOOLS/SHTOOLS.git
cd shtools
conda create -n your_env_name python=3.xx # create a new conda environment, if desired
conda env update -n your_env_name -f environment.yml
conda activate your_env_name # activate the new conda environment
pip install --no-build-isolation -e . # install into the shtools folder and link to the active python environment
SHTOOLS (for Fortran 95)
Install using the brew package manager (MacOS, Linux, Windows):
brew install shtools
Install using the macports package manager (MacOS):
sudo port install shtools
Install from source:
Clone or download the this repo, and then execute one (or both) of the following commands in the shtools
directory:
make fortran
make fortran-mp # for OpenMP Fortran routines
Further installation instructions and options can be found in the web documentation.
CONTRIBUTING
We work on the develop
branch and only push releases to master
. Please base all pull requests on develop
.
CONTRIBUTORS
For the full list of contributors, see the AUTHORS file.
LICENSE
This project uses the BSD 3-Clause license, as found in the LICENSE file.
REFERENCES
- Mark A. Wieczorek and Matthias Meschede (2018). SHTools --- Tools for working with spherical harmonics, Geochemistry, Geophysics, Geosystems, 19, 2574-2592, doi:10.1029/2018GC007529.
- Mark Wieczorek, et al. (2019). SHTOOLS/SHTOOLS. Zenodo, doi:10.5281/zenodo.3457861
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pyshtools-4.13.1.tar.gz
.
File metadata
- Download URL: pyshtools-4.13.1.tar.gz
- Upload date:
- Size: 41.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc4a323e9cbc905c04ae9e2e9fedeea6d76f3315a6863ede353a4dec87b8c018 |
|
MD5 | b07749cbe95de82eaae4a45fb77525ca |
|
BLAKE2b-256 | f458b75aa783852e3b5af74e5657163c5ddc2d3a906d3cf935b4f41a57defcbc |
Provenance
File details
Details for the file pyshtools-4.13.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71f5ea1cddcb5b210a12488dc4899e50219e6fb8727d03c3584d433ac62e9248 |
|
MD5 | 80833fabfb5491d20860330b0a1de945 |
|
BLAKE2b-256 | 2ce6a5af62ccd9a83ac3f7f11b1d67bd7aaa1673c6cce46bb61592f51f8a4786 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a4d22a3305540788928421fb5673c102f14fd78904012e53a44bf438c2484e |
|
MD5 | 44459913be745539144585ef07d37871 |
|
BLAKE2b-256 | f06f1b9db745e562579d3a24fbdb32c58ab0130a5a5de46730e9171d70ac8136 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp312-cp312-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53bbeb0a01fe8b6b7e662b05b3d0f67685d61c2c8f36cad363455923aeaa5353 |
|
MD5 | bc75f088f6422dcc2f4e84fc16690b7b |
|
BLAKE2b-256 | 19ec8ebc15d816a883d91fcafe218523e08837217214b91fb79b79eac40bc4d4 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10bd367d5a389a2e7d6985ad4d093c486c13c47b1d632dd28ff273a0f73490ab |
|
MD5 | 720504bbf3ec1ce93ec3329f0f873bca |
|
BLAKE2b-256 | c9dc663fea1cad11c4a6daa6d54966f58995f59a41fd1ecf9e163ec332b680a8 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e3131d2fd148b1f1089ae8e044c8b28ef988033fc1315ff600b65964fa179e0 |
|
MD5 | 8b120177041347c672f0350327cd2e96 |
|
BLAKE2b-256 | 4ca88a4594e43882065a01092dd0542212bf0c5efb97446d80ad70eb7fd303db |
Provenance
File details
Details for the file pyshtools-4.13.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afc93c79de48b9e8ce7eb71e518356c1c11221a0791b37c827ef5fbd48d93e55 |
|
MD5 | cbd406e60f4553311fd25b656c191fe8 |
|
BLAKE2b-256 | ad45280c5d1e7b119465c6a9e0fadb42d260a4260d83b89a559a7aab7eb7bd8e |
Provenance
File details
Details for the file pyshtools-4.13.1-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d8dfec4aa43486b0ea7f23654bf63f26309c4448dc8a06df43cd9affe18db11 |
|
MD5 | 2bc6d830854d3eae12bc063f0e2472ec |
|
BLAKE2b-256 | cc23174859cc4890b6910868a601e1e088fe15dad3b7dc4de68ef94aca1ca6f0 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp311-cp311-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c73d6cdeee11fc058ba840ab12037a3390fa6ae18bca507f9ade559489aa0c09 |
|
MD5 | b71e75a2cb91c1467c80cfe510dd0f5f |
|
BLAKE2b-256 | a02afca8907a5fd7a806f64e438e8dd2ff5b0c51148d69c6ab723b9ae38a0e03 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a1c1917fc7e968f27e0551d784f64eab7e344549b0e9bc77700b3b5c8f617a9 |
|
MD5 | cf65ff467b4098b001652fb754232107 |
|
BLAKE2b-256 | db86253c3515ec388dd89405b3f352a39dd3f499a5b512cbfbc7cba92a4fa014 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea6b21d7d1e22361c7902b500a3a5da5f7ca24d8c866b3aa319a83f8ab09a96 |
|
MD5 | 93e9b18de5ae6b694f3fb26c6ea9d269 |
|
BLAKE2b-256 | b13e1ffc2621e9905cbb353ff01947b415a11ed3ae824612e574f48a65f049ad |
Provenance
File details
Details for the file pyshtools-4.13.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a3549c6d0b8299b5f7d7369c46d541c02e045f2db65b7b01949e0fdd0de60d |
|
MD5 | 1fa6427ba9eaaf169df3de17d2cbb575 |
|
BLAKE2b-256 | e8a5ab2d4608ea75fd5335c20387997f3ea9865229a2815db584663ad30f78e8 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7b566cfe7499f19e4d7db2eb336e1ad9a20faf609788e7b696bb3ad03312aa5 |
|
MD5 | 7b54229618cee23cb36e6cdf664df1ac |
|
BLAKE2b-256 | cfa4ff0980b943812a85de8c7b04bc781d4726822beaa991d83e534ca4b4c323 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp310-cp310-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2926cbef344092ced413575001f012eeb001ef88d5c7e0fd5d45e21449471416 |
|
MD5 | a96c5b8af17dc2541b2024ee1e0584af |
|
BLAKE2b-256 | fee1dab58b7728fa6319bf39adc4fef6a752bd6504428f67e6e099f1a1c42af3 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4059d67721c7ba033ae591cad8f32fa26149892e833e292d512824bbedce445 |
|
MD5 | bf9bd6027c219369eefdefad53b1fede |
|
BLAKE2b-256 | 14d4f10f7cb2d8de9a647c18f0c2581388dded1e86511247b21603cf54f9f874 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6235c5616c17a5b214af2575571dee7eb15f58ec5b382081ace47960a10e14 |
|
MD5 | 3fe68485bc6dc1d04d5b12b56619f387 |
|
BLAKE2b-256 | d778ac9cc67d990ffff2fcbe985a38efa04a499a765f0bfa53465793023542c3 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8994277075608fb8eeaa5d1e43b66dfc50c2f5b276b3325197cd7d2107fcf875 |
|
MD5 | 01685a555c19795d27d3fd0662d0f92f |
|
BLAKE2b-256 | 0ddeaffc3749deb5a53922691d47ac524019888e8310dd50bbfd6e4126952297 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 14.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc798e61614a7411a90bc63d1a44faf55cfc90c842284cd27167759ea72a4e31 |
|
MD5 | 4ae13a40c5dc6a67b889c1f0d4889960 |
|
BLAKE2b-256 | 4413de1ba0fd91dd1e64f7586b739d17b1c41977acf26e62a2f85c95c06f68b0 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp39-cp39-manylinux_2_28_aarch64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp39-cp39-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad505acc3e6e1a9839938e959d3c188fadcf915aad9c7680d9211246a55e32b |
|
MD5 | 6b22fa82d0635dafaa3a996157651ed4 |
|
BLAKE2b-256 | 03a4ed14e3c21830ca11db9fd1cf3832e15b41f69ae5769d282f7fa44f5c10e0 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 487f8368308ebac20b1eb2c6bd03a927f27121a02bdeeafe371b998776f34f71 |
|
MD5 | 60e165d61627572f5b0fd0d5799f1512 |
|
BLAKE2b-256 | b2f68a491a37fda746dea8bfecd9e249bcc6d045ab88fb61e849f98e4f167796 |
Provenance
File details
Details for the file pyshtools-4.13.1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.13.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f010fc0d610063ab16d7c6048fac6b611dc5d3398c53b515ef6789ee27c9b5c5 |
|
MD5 | 159845dda623a34da814f9a2036c8055 |
|
BLAKE2b-256 | c2ff2d0898750c6647afdf205f3f240bbdb5512b194720e5af62982378a71ab2 |