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, and standard operations on global gravitational and magnetic field data.
FEATURES
Supports all standard normalizations and phase conventions of the spherical harmonic functions.
Effortless conversion between real and complex harmonics, between phase conventions, and between 4π normalized, Schmidt semi-normalized, orthonormalized, and unnormalized harmonics.
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 Fortran 95 code, 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.
OpenMP compatible and OpenMP thread-safe versions of the Fortran routines.
INSTALLATION
pyshtools (for Python)
Install using conda:
conda install -c conda-forge pyshtools # Linux and macOS only
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 requirements
# Linux: install gfortran, fftw3, blas, and lapack
sudo apt-get install g++ gfortran libfftw3-dev libblas-dev liblapack-dev
# macOS: install fftw using brew or macports
brew install fftw
sudo port install fftw-3
# macOS: for LAPACK, link to the system '-framework Accelerate' or install openblas
then clone the shtools repo and install manually:
git clone https://github.com/SHTOOLS/SHTOOLS.git
cd shtools
git checkout develop
pip install -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 shtools 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.
HOW TO USE
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. A variety of Python tutorials and guides are included that demonstrate the major features of the library.
To get started, click on the following Python tutorials and then run them interactively in Binder:
DEVELOPERS
We work on the develop branch and only push releases to master. Please base all pull requests on develop.
REFERENCE
Mark A. Wieczorek and Matthias Meschede (2018). SHTools — Tools for working with spherical harmonics, Geochemistry, Geophysics, Geosystems, 19, 2574-2592, doi:10.1029/2018GC007529.
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.10.1.tar.gz
.
File metadata
- Download URL: pyshtools-4.10.1.tar.gz
- Upload date:
- Size: 38.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59a5403c901dd6cbe431f6a5e8213f435fcee3f1ed3020077f0f1608ff9d4f2a |
|
MD5 | eb3ef73d16c3c936abf215267c6ca334 |
|
BLAKE2b-256 | f90cb43cd8d46abac919d0a04a8c7f69d1b19be34b895e2993992ac8f0efacdb |
File details
Details for the file pyshtools-4.10.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f27b2db0c56072e46ace9d5bf12597f5f29698d5a90297e98ba1bd89b702b7e6 |
|
MD5 | 3365f11a3294ee6e8f3955e7e39d5769 |
|
BLAKE2b-256 | 95c4d435c9662fedcf7e5e3fc7b85006274b634c72e0e2e6fd0839b36626d965 |
File details
Details for the file pyshtools-4.10.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb760a5bfd2e3b047fbe25a90cdc6b55a470a0b6e51cbf10da99b396e305726d |
|
MD5 | fd9de48c15fb678d973a3f83e10d5189 |
|
BLAKE2b-256 | fd703a5c7826eb446ec44d45c01e9f7fe8f177591e6a941ce1f5ea3d54ca0804 |
File details
Details for the file pyshtools-4.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f461a430ca400c86baf7bb29f649efea4681aa99facbd25c111c900e818d2b |
|
MD5 | ee85b2425b0030108dc471563531d70e |
|
BLAKE2b-256 | c06fd60276fb2bebf0ac56d3f946533878a7269dd338b420b8a03b893370a6b0 |
File details
Details for the file pyshtools-4.10.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fef71fbc2412a474aa7a33add65a0456469ece69239fefe95e241c9c442e76b9 |
|
MD5 | 49f54b99045a8a2723126782db54c636 |
|
BLAKE2b-256 | 31134a40c000999c1786da4fb3bf3ce6089aea750b9f9f2b04d6754d84262b65 |
File details
Details for the file pyshtools-4.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa9975ef38238e8c4cbc24e68139e160ed266b9ced95ea38d2d5fb60b191b3cc |
|
MD5 | 855cbca5ee1e202c31c4aa1038cbd4d3 |
|
BLAKE2b-256 | 781456be62a759482a17fc6fb3293a99a07fd628a44802357be522d41e0420a6 |
File details
Details for the file pyshtools-4.10.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65dbb2229857f7ff6c3e1e8996fb4214c3892166be8a7fe7c600ed259a1fac41 |
|
MD5 | 68be0ad7bc492e1e6050c4fd07f331b4 |
|
BLAKE2b-256 | 60557c0c6d7f2f85483976416e733627eb2457c82021bea4a69c60024b6f23f4 |
File details
Details for the file pyshtools-4.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c655b51c801e4f5b4a03fefde4263fe5000393952167ef494492575badbc6549 |
|
MD5 | 14dbfe65c777c884d8d666a75d160cf9 |
|
BLAKE2b-256 | 1d44cfda1955a59cad56f83e03f7c97bb76771d9c781bde126affe1ed4ab9e04 |
File details
Details for the file pyshtools-4.10.1-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: pyshtools-4.10.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc51a59b602cd6e68854e57b73400fb75119434faa154807e6bbc2da21076b17 |
|
MD5 | 3e18d0c7d3b55b7559297f2e4fd05d3a |
|
BLAKE2b-256 | ce603157c8cd1e841e872d9664aa5beaa1230b28aebf2c7524bded689e9cfa1b |