There is a newer version of this record available.

Software Open Access

SHTOOLS - Tools for working with spherical harmonics (v2.9.1)

Mark A. Wieczorek

SHTOOLS is an archive of fortran 95 based software that can be used to perform spherical harmonic transforms and reconstructions, rotations of data expressed in spherical harmonics, and multitaper spectral analyses on the sphere.

While several collections of code exist for working with data expressed in spherical harmonics, this one is unique for several reasons:

  • It can accommodate any standard normalization of the spherical harmonic functions ("geodesy" 4π normalized, Schmidt semi-normalized, orthonormalized, and unnormalized).

  • Both real and complex spherical harmonics are supported.

  • Spherical harmonic transforms are calculated by exact quadrature rules using either (1) the sampling theorem of Driscoll and Healy (1994) where data are equally sampled (or spaced) in latitude and longitude, or (2) Gauss-Legendre quadrature. A least squares inversion routine for irregularly sampled data is included.

  • One can choose to use or exclude the Condon-Shortley phase factor of (-1)m with the associated Legendre functions.

  • The spherical harmonic transforms are proven to be accurate to approximately degree 2800, corresponding to a spatial resolution of better than 4 arc minutes.

  • Routines are included for performing localized multitaper spectral analyses.

  • Routines are included for performing standard gravity and magnetic field calculations, such as computation of the geoid and the determination of the potential associated with finite-amplitude topography.

  • The routines are fast. Spherical harmonic transforms and reconstructions take on the order of 1 second for bandwidths less than 600 and about 3 minutes for bandwidths close to 2800.

SHTOOLS is invoked by standard subroutine and function calls in your fortran 90/95 program. For some routines, it will be necessary to have installed the freely available Fourier transform package FFTW, and the linear algebra packages LAPACK and BLAS.

This is a minor patch that fixes some incompatibility issues that arose when using alternative makes (make all2 and make all3).
Files (2.0 MB)
Name Size
2.0 MB Download


Cite as