Unverified Commit bf88a99e authored by Mark Wieczorek's avatar Mark Wieczorek

Merge develop to master for v4.7

parents 740455a2 978a51c1
www/* linguist-documentation
docs/* linguist-documentation
src/fdoc/* linguist-documentation
src/pydoc/* linguist-documentation
examples/ExampleDataFiles/FSU_mars90.sh linguist-documentation
pyshtools/_version.py export-subst
......@@ -7,6 +7,7 @@
NONE/
build/
dist/
docs/vendor/
pyshtools/doc/
examples/notebooks/.ipynb_checkpoints/
pyshtools.egg-info/
......
image: ruby:2.7
image: ruby:latest
cache:
paths:
- vendor/
variables:
LC_ALL: "C.UTF-8"
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"
......
......@@ -2,63 +2,70 @@ language: c
matrix:
include:
# Test Python 3.7 on Linux and OSX
# Test using python 3.8 on Linux and OSX
- os: linux
env: PYTHON_VERSION=3.7
env: PYTHON_VERSION=3.8
- os: osx
env: PYTHON_VERSION=3.7
env: PYTHON_VERSION=3.8
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install fftw;
brew upgrade wget;
else
sudo apt-get update;
sudo apt-get install libfftw3-dev libblas-dev liblapack-dev g++ gfortran tcsh;
fi
addons:
apt:
packages:
- gcc
- gfortran
install:
# Download and install miniconda
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export OS="MacOSX";
export FFTW="/usr/local";
else
export OS="Linux";
fi
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-x86_64.sh -o miniconda.sh
- bash miniconda.sh -u -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
# Configure conda testing environment
- conda config --set always_yes yes --set changeps1 no
- conda install -c anaconda setuptools
- conda update --force-reinstall -q conda
- conda info -a
- conda config --append channels conda-forge
- conda config --add channels conda-forge
- conda update -q conda
- conda create -q -n test-environment
python=$PYTHON_VERSION
numpy
scipy
matplotlib
jupyter
mkl
fftw>=3.3.8
liblapack>=3.8
openblas
gmt>=6.1.1
scipy>=0.14.0
matplotlib>=3.3
astropy
xarray
requests
cartopy
gmt=6.0.0
- source activate test-environment
- pip install git+https://github.com/GenericMappingTools/pygmt.git
- pip install palettable
cartopy>=0.18.0
pygmt>=0.2.0
pooch>=1.1
tqdm
jupyter
palettable>=3.3
pypandoc
- conda activate test-environment
# Conda info for debugging
- conda list -n test-environment
- conda info -a
- conda config --show-sources
# Install pyshtools
- pip install --no-deps .
script:
- python examples/notebooks/test_notebooks.py
- export MPLBACKEND=Agg
- make -C examples/python -f Makefile no-timing
- mkdir empty
- cd empty
- mkdir empty && cd empty
- python -c "import pyshtools"
notifications:
......
......@@ -13,4 +13,5 @@
* Andrew Walker / [andreww](https://github.com/andreww)
* Stefan Schröder / [Nasuyo](https://github.com/Nasuyo)
* Akihisa Hattori / [HattoriAkihisa](https://github.com/HattoriAkihisa)
* Aaryaman Vasishta / [jammm](https://github.com/jammm)
\ No newline at end of file
* Aaryaman Vasishta / [jammm](https://github.com/jammm)
* Alex Kalinin / [alkalinin](https://github.com/alkalinin)
include README.md
include LICENSE.txt
include VERSION.txt
include AUTHORS.md
include Makefile
include versioneer.py
include pyshtools/_version.py
graft examples/ExampleDataFiles
recursive-include examples/fortran *.f95 input* Makefile
......
This diff is collapsed.
......@@ -3,42 +3,42 @@
[![Documentation](https://img.shields.io/badge/documentation-shtools.github.io%2FSHTOOLS%2F-yellow.svg)](https://shtools.github.io/SHTOOLS/)
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.592762.svg)](https://doi.org/10.5281/zenodo.592762)
[![Paper](https://img.shields.io/badge/paper-10.1029/2018GC007529-orange.svg)](https://doi.org/10.1029/2018GC007529)
[![Join the chat at https://gitter.im/SHTOOLS/SHTOOLS](https://badges.gitter.im/SHTOOLS/SHTOOLS.svg)](https://gitter.im/SHTOOLS/SHTOOLS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/SHTOOLS/SHTOOLS/master?filepath=examples%2Fnotebooks%2F)
[![Chat on matrix](https://img.shields.io/badge/chat-on_[matrix]-4bb596.svg)](https://matrix.to/#/!SrkiFczPSWmYrlSNYF:matrix.org?via=matrix.org)
[![Chat at gitter](https://badges.gitter.im/SHTOOLS/SHTOOLS.svg)](https://gitter.im/SHTOOLS/SHTOOLS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Twitter](https://img.shields.io/twitter/follow/pyshtools.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=pyshtools)
SHTOOLS/pysthools is a Fortran-95/Python library that can be used to perform
spherical harmonic transforms, multitaper spectral analyses on the sphere, expansions of functions into Slepian bases, and standard operations on global gravitational and magnetic field data.
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 ###
* A wide range of supported spherical harmonic functions:
* real and complex,
* all standard normalizations (Geodesy 4π, Schmidt semi-normalized, orthonormalized, unnormalized),
* Condon-Shortley phase factor of (-1)<sup>m</sup>.
* Supports all standard normalizations and phase conventions of the spherical harmonic functions.
* Clean implementation of the spherical harmonic transforms:
* exact quadrature rules using the sampling theorem of *Driscoll and Healy* (1994) or Gauss-Legendre quadrature,
* accurate and fast to approximately degree 2800,
* OpenMP compatible and OpenMP thread-safe.
* Effortless conversion between real and complex harmonics, between phase conventions, and between 4&pi; normalized, Schmidt semi-normalized, orthonormalized, and unnormalized harmonics.
* Selected applications and routines:
* global spectral analysis, spherical harmonic rotations, and Wigner 3j symbols,
* localized multitaper spectral analyses, and expansions in Slepian basis functions,
* standard gravity and magnetic field calculations, computation of the geoid, and finite-amplitude potential from topography.
* Use of both regularly sampled geographic grids and grids appropriate for Gauss-Legendre quadrature.
* Integrated support for working with xarray and netcdf data.
* Spherical harmonic transforms proven to be accurate up to about degree 2800.
* Publication quality maps using [Cartopy](https://scitools.org.uk/cartopy) or [pygmt](https://www.pygmt.org/dev/).
* Perform localized multitaper spectral analyses, or expand functions in terms of localized Slepian bases.
* SHTOOLS is open source software (3-clause BSD license).
* 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](https://scitools.org.uk/cartopy) and [pygmt](https://www.pygmt.org/).
* OpenMP compatible and OpenMP thread-safe versions of the Fortran routines.
### INSTALLATION ###
#### pyshtools for Python ####
#### pyshtools (for Python) ####
Binary install for linux and macOS:
Binary install using pip or conda:
```bash
pip install pyshtools
pip install --upgrade pyshtools # upgrade to a new version
pip install --upgrade pyshtools # to upgrade a pre-existing installation
conda install -c conda-forge pyshtools # Linux and macOS only
```
Build from source:
......@@ -46,58 +46,63 @@ Build from source:
pip install pyshtools --no-binary pyshtools
```
#### pyshtools for developers ####
Linux requirements:
Install the develop branch from source:
```bash
sudo apt-get install libblas-dev liblapack-dev g++ gfortran libfftw3-dev tcsh
pip install git+https://github.com/SHTOOLS/SHTOOLS@develop
```
macOS requirements:
For developers, install the requirements
```bash
# Linux
sudo apt-get install libblas-dev liblapack-dev g++ gfortran libfftw3-dev tcsh
# macOS: install fftw using brew or macports
brew install fftw
# for lapack and blas, link to the system '-framework Accelerate'
sudo port install fftw-3
# macOS: for LAPACK, link to the system '-framework Accelerate'
```
To install the develop branch:
```bash
pip install git+https://github.com/SHTOOLS/SHTOOLS@develop
```
Alternatively, clone the shtools repo and then install:
then clone the shtools repo and install manually:
```bash
git clone https://github.com/SHTOOLS/SHTOOLS.git
cd shtools
git checkout develop
pip install . # install into the active python environment lib folder, or
pip install -e . # install into the SHTOOLS/pyshtools folder and link to the active python environment
pip install -e . # install into the shtools folder and link to the active python environment
```
#### Fortran Library ####
Clone the shtools repo, and then execute one of the following commands in the shtools directory:
#### SHTOOLS (for Fortran 95) ####
Clone the shtools repo, and then execute one (or both) of the following commands in the shtools directory:
```bash
make fortran
make fortran-mp # for OpenMP Fortran routines
```
Or use the [brew](http://brew.sh/) package manager (macOS):
Alternatively, use the [brew](http://brew.sh/) package manager (macOS)
```bash
brew tap shtools/shtools
brew install shtools
brew install shtools --with-openmp # to install shtools with the OpenMP components.
brew install shtools --with-openmp # to install shtools with the OpenMP components.
```
or the [macports](https://www.macports.org/) package manager (macOS)
```bash
sudo port install shtools
```
More installation instructions and options can be found in the [web documentation](https://shtools.github.io/SHTOOLS/).
Further installation instructions and options can be found in the [web documentation](https://shtools.github.io/SHTOOLS/).
### 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 allow simple access to the fortran-compiled routines. A variety of Python notebooks and example files are included that demonstrate the major features of the library.
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, check out the following Python tutorial notebooks:
To get started, check out the following Python tutorials:
* [Introduction to Grids and Spherical Harmonic Coefficients](https://shtools.github.io/SHTOOLS/pages/mydoc/notebooks/Introduction-1.html)
* [Introduction to Localization Windows and Spectral Analysis](https://shtools.github.io/SHTOOLS/pages/mydoc/notebooks/Introduction-2.html)
* [Introduction to Gravity and Magnetic Fields](https://shtools.github.io/SHTOOLS/pages/mydoc/notebooks/Introduction-3.html)
* [Introduction to Plotting Maps](https://shtools.github.io/SHTOOLS/pages/mydoc/notebooks/Introduction-4.html)
* [Spherical harmonic coefficients and grids](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/grids-and-coefficients.ipynb)
* [Localization windows and spectral analysis](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/localized-spectral-analysis.ipynb)
* [Gravity and magnetic fields](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/gravity-and-magnetic-fields.ipynb)
* [Plotting maps](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/plotting-maps.ipynb)
### DEVELOPERS ###
We work on the `develop` branch and only push releases to `master`. Please base all pull requests on `develop`.
### CITATION ###
### 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](https://doi.org/10.1029/2018GC007529).
SHTOOLS Version: 4.6.2
libfftw3-dev
libblas-dev
liblapack-dev
g++
gfortran
tcsh
name: pyshtools
channels:
- conda-forge
dependencies:
- python=3.8
- fftw>=3.3.8
- liblapack>=3.8
- openblas
- gmt>=6.1.1
- pyshtools>=4.7.0
- numpy
- scipy>=0.14.0
- matplotlib>=3.3
- astropy
- xarray
- requests
- cartopy>=0.18.0
- pygmt>=0.2.0
- pooch>=1.1
- tqdm
- jupyter
- palettable>=3.3
- pypandoc
image: ruby:2.7
image: ruby:latest
variables:
JEKYLL_ENV: production
LC_ALL: "C.UTF-8"
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
LANGUAGE: "en_US.UTF-8"
......
......@@ -2,6 +2,7 @@ source "https://rubygems.org"
# to publish on github page
gem 'github-pages', group: :jekyll_plugins
#gem 'jekyll_version_plugin', group: :jekyll_plugins
# to publich without github page
# to publish without github page
#gem "jekyll"
\ No newline at end of file
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.2.1)
activesupport (6.0.3.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
coffee-script (2.4.1)
......@@ -16,9 +16,9 @@ GEM
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.6)
dnsruby (1.61.3)
addressable (~> 2.5)
concurrent-ruby (1.1.7)
dnsruby (1.61.4)
simpleidn (~> 0.1)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
......@@ -26,14 +26,14 @@ GEM
ffi (>= 1.3.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (1.0.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.12.2)
ffi (1.13.1)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (204)
github-pages (207)
github-pages-health-check (= 1.16.1)
jekyll (= 3.8.5)
jekyll (= 3.9.0)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.6)
......@@ -67,12 +67,13 @@ GEM
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.11.1)
kramdown (= 1.17.0)
kramdown (= 2.3.0)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.10.4, < 2.0)
rouge (= 3.13.0)
rouge (= 3.19.0)
terminal-table (~> 1.4)
github-pages-health-check (1.16.1)
addressable (~> 2.3)
......@@ -80,20 +81,20 @@ GEM
octokit (~> 4.0)
public_suffix (~> 3.0)
typhoeus (~> 1.3)