Features
SHTOOLS/pyshtools is extremely versatile:

All standard normalizations of the spherical harmonic functions are supported: 4π normalized, Schmidt seminormalized, orthonormalized, and unnormalized.

Both real and complex spherical harmonics are supported, and one can choose to either use or exclude the CondonShortley phase factor of (1)^{m}.

Spherical harmonic transforms are calculated by exact quadrature rules using either the sampling theorem of Driscoll and Healy (1994) or GaussLegendre quadrature.

The spherical harmonic transforms are fast and accurate to approximately degree 2800.

Localized multitaper spectral analyses and expansions of functions in localized Slepian bases are easily performed.

Standard operations on global gravitational and magnetic field data are supported.

The Fortran routines are OpenMP compatible and OpenMP threadsafe.

Standard data formats such as xarray and netcdf are supported.
Installation
The Python components of SHTOOLS can be installed using the Python package manager pip
. Binaries are prebuilt for linux and macOS architectures, and you need only to execute one of the following commands in a unix terminal:
pip install pyshtools
pip install upgrade pyshtools # to upgrade a preexisting installation
To install the Fortran 95 components for use in your Fortran programs, execute one or both of the following commands in the SHTOOLS directory
make fortran
make fortranmp # for OpenMP support
or alternatively install using the macOS package manager brew
brew tap shtools/shtools
brew install shtools
Using
SHTOOLS/pyshtools can be called from any Fortran 95 or Python program. The core software is written in Fortran 95, and Python wrappers allow simple access to the fortrancompiled routines. A variety of Python notebooks and example files are included that demonstrate the major features of the library. When building from source, it will be necessary to link to LAPACK, BLAS, and FFTW compatible libraries. SHTOOLS is open source software (3clause BSD license).
Reference
Mark A. Wieczorek and Matthias Meschede (2018). SHTools — Tools for working with spherical harmonics, Geochemistry, Geophysics, Geosystems, 19, 25742592, doi:10.1029/2018GC007529.
Edit me