SPHEREPACK 3.2 - A Package for Modeling Geophysical Processes

By John C. Adams (retired)
and Paul N. Swarztrauber (deceased, August 2011)

December 2011

Rendering of a scalar harmonic.

The figure above is a rendering of a scalar harmonic with order 12 and degree 6 on an 89 X 180 Gauss latitudinal grid. It was produced by the SPHEREPACK subroutine visgau.


SPHEREPACK 3.2 is a collection of FORTRAN77 programs and subroutines facilitating computer modeling of geophysical processes. The package contains subroutines for computing common differential operators including divergence, vorticity, latitudinal derivatives, gradients, the Laplacian of both scalar and vector functions, and the inverses of these operators. For example, given divergence and vorticity, the package can be used to compute velocity components, then the Laplacian inverse can be used to solve the scalar and vector Poisson equations. The package also contains routines for computing the associated Legendre functions, Gauss points and weights, multiple fast Fourier transforms, and for converting scalar and vector fields between geophysical and mathematical spherical coordinates.

Example programs are provided for solving these equations on the full sphere:

  • advection
  • Helmholz
  • shallow-water

Each program serves two purposes: as a template to guide you in writing your own codes utilizing the SPHEREPACK routines, and as a demonstration on your computer that you can correctly produce SPHEREPACK executables.

The SPHEREPACK library and programs are intended to be installed on your computer using the Makefile provided when you download the files in this distribution. The Makefile builds the library and driver executables under the compiler you specify when you run "make".

This work was partially supported by the Computer Hardware, Advanced Mathematics, and Model Physics (CHAMMP) Program which is administered by the Office of Energy Research under the Office of Health and Environmental Research in the U.S. Department of Energy, Environmental Sciences Division.

SPHEREPACK, Copyright (C) 2004-2011, Computational Information Systems Laboratory, University Corporation for Atmospheric Research