1 Star 0 Fork 0

crazyi / SHTOOLS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

LOGO

Documentation DOI Paper Binder Chat on matrix Chat at gitter Twitter

SHTOOLS/pyshtools is a Fortran-95/Python library that can be used to perform spherical harmonic transforms, multitaper spectral analyses, expansions of functions into Slepian bases, 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.

  • Perform localized multitaper spectral analyses, or expand functions in terms of localized Slepian bases.

  • 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.

Copyright (c) 2005-2019, SHTOOLS All rights reserved * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of SHTOOLS nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/crazyi/SHTOOLS.git
git@gitee.com:crazyi/SHTOOLS.git
crazyi
SHTOOLS
SHTOOLS
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891