!=====================================================================
! NGSG: Spherepack, A Package for Modeling Geophysical Processes
! https://www2.cisl.ucar.edu/spherepack/documentation
!=====================================================================
!
! SPHEREPACK is a collection of FORTRAN 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.
!
!---------------------------------------------------------------------
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Colatitudinal Derivative of a Vector Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_VTSEC computes the derivative of the vector function w.r.t.
! colatitude on a equally-spaced grid using O(N**2) storage,
! initialized by NG_VTSECI.
!
! NG_VTSES computes the derivative of the vector function w.r.t.
! colatitude on a equally-spaced grid using O(N**3) storage,
! initialized by NG_VTSESI.
!
! NG_VTSGC computes the derivative of the vector function w.r.t.
! colatitude on a Gaussian grid using O(N**2) storage,
! initialized by NG_VTSGCI.
!
! NG_VTSGS computes the derivative of the vector function w.r.t.
! colatitude on a Gaussian grid using O(N**3) storage,
! initialized by NG_VTSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Gradient of a Scalar Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_GRADEC computes the gradient of a scalar function on an
! equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_GRADES computes the gradient of a scalar function on an
! equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_GRADGC computes the gradient of a scalar function on a
! Gaussian grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_GRADGS computes the gradient of a scalar function on a
! Gaussian grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Reconstruct a Scalar Function from its Gradient
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_IGRADEC computes a scalar function whose gradient is a given vector
! function on an equally spaced grid using O(N**3)storage,
! initialized by NG_SHSECI.
!
! NG_IGRADES computes a scalar function whose gradient is a given vector
! function on an equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_IGRADGC computes a scalar function whose gradient is a given vector
! function on a Gaussian grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_IGRADGS computes a scalar function whose gradient is a given vector
! function on a Gaussian grid using O(N**3) storage,
! initialized by NG_SHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Divergence of a Vector Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_DIVEC computes the divergence of a vector function on an
! equally spaced grid using O(N**2) storage,
! initialized by NG_SHSECI.
!
! NG_DIVES computes the divergence of a vector function on an
! equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_DIVGC computes the divergence of a vector function on a
! Gaussian grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_DIVGS computes the divergence of a vector function on a
! Gaussian grid using O(N**3) storage,
! initialized by NG_SHSGSI
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Reconstruct a Vector Function from its Divergence
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_IDIVEC computes an irrotational vector function whose divergence
! is given on an equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_IDIVES computes an irrotational vector function whose divergence
! is given on an equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_IDIVGC computes an irrotational vector function whose divergence
! is given on a Gaussian grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_IDIVGS computes an irrotational vector function whose divergence
! is given on a Gaussian grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Vorticity of a Vector Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_VRTEC computes the scalar vorticity of a vector function
! on an equally spaced grid using O(N**2) storage,
! initialized by NG_SHSECI.
!
! NG_VRTES computes the scalar vorticity of a vector function
! on an equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_VRTGC computes the scalar vorticity of a vector function
! on a Gaussian grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_VRTGS computes the scalar vorticity of a vector function
! on a Gaussian grid using O(N**3) storage,
! initialized by NG_SHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Reconstruct a Vector Function from its Vorticity
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_IVRTEC computes a divergence-free vector function whose vorticity
! is given on an equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_IVRTES computes a divergence-free vector function whose vorticity
! is given on an equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_IVRTGC computes a divergence-free vector function whose vorticity
! is given on a Gaussian grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_IVRTGS computes a divergence-free vector function whose vorticity
! is given on a Gaussian grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Reconstruct Vector Function from its Divergence and Vorticity
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_IDVTEC computes a vector function with given divergence and vorticity
! on an equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_IDVTES computes a vector function with given divergence and vorticity
! on an equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_IDVTGC computes a vector function with given divergence and vorticity
! on a Gaussian grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_IDVTGS computes a vector function with given divergence and vorticity
! on a Gaussian grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Laplacian of a Scalar Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_SLAPEC computes the scalar Laplacian of a scalar function
! on an equally spaced grid using O(N**2) storage,
! initialized by NG_SHSECI.
!
! NG_SLAPES computes the scalar Laplacian of a scalar function
! on an equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_SLAPGC computes the scalar Laplacian of a scalar function
! on a Gaussian grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_SLAPGS computes the scalar Laplacian of a scalar function
! on a Gaussian grid using O(N**3) storage,
! initialized by NG_SHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Invert the Laplacian of a Scalar Function or Solve the Helmholtz Equation
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_ISLAPEC computes a scalar function whose scalar Laplacian is given
! on an equally spaced grid using O(N**2) storage,
! initialized by NG_SHSECI.
!
! NG_ISLAPES computes a scalar function whose scalar Laplacian is given
! on an equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_ISLAPGC computes a scalar function whose scalar Laplacian is given
! on a Gaussian grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_ISLAPGS computes a scalar function whose scalar Laplacian is given
! on a Gaussian grid using O(N**3) storage,
! initialized by NG_SHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! The Vector Laplacian of a Vector Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_VLAPEC computes the vector Laplacian of a given vector function
! on an equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_VLAPES computes the vector Laplacian of a given vector function
! on an equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_VLAPGC computes the vector Laplacian of a given vector function
! on a Gaussian grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_VLAPGS computes the vector Laplacian of a given vector function
! on a Gaussian grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Invert the Vector Laplacian of a Vector Function
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_IVLAPEC computes a vector function whose vector Laplacian is a given
! vector function on an equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_IVLAPES computes a vector function whose vector Laplacian is a given
! vector function on an equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_IVLAPGC computes a vector function whose vector Laplacian is a given
! vector function on a Gaussian grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_IVLAPGS computes a vector function whose vector Laplacian is a given
! vector function on a Gaussian grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Stream Function and Velocity Potential
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_SFVPEC computes the stream function and velocity potential of a vector
! function on an equally spaced grid using O(N**2) storage,
! initialized by NG_SHSECI.
!
! NG_SFVPES computes the stream function and velocity potential of a vector
! function on an equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_SFVPGC computes the stream function and velocity potential of a vector
! function on a Gaussian spaced grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_SFVPGS computes the stream function and velocity potential of a vector
! function on a Gaussian spaced grid using O(N**3) storage,
! initialized by NG_SHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Invert Stream Function and Velocity Potential
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_ISFVPEC computes a vector function with a given stream function and
! velocity potential on an equally spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_ISFVPES computes a vector function with a given stream function and
! velocity potential on an equally spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_ISFVPGC computes a vector function with a given stream function and
! velocity potential on a Gaussian spaced grid using O(N**2) storage,
! initialized by NG_VHSGCI
!
! NG_ISFVPGS computes a vector function with a given stream function and
! velocity potential on a Gaussian spaced grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~
! Grid Transfers
! ~~~~~~~~~~~~~~
!
! NG_TRSSPH transfers scalar data from one spherical grid to another.
! The grids can be Gaussian or equally spaced.
!
! NG_TRVSPH transfers vector data from one spherical grid to another.
! The grids can be Gaussian or equally spaced.
!
! NG_SSHIFTE transfers scalar data on the sphere between an equally
! spaced grid that is offset by a half grid increment in
! both longitude and latitude (which excludes the poles)
! and an equally spaced grid that includes the poles,
! initialized by SSHIFTI
!
! NG_VSHIFTE transfers vector data on the sphere between an equally
! spaced grid that is offset by a half grid increment in
! both longitude and latitude (which excludes the poles)
! and an equally spaced grid that includes the poles,
! initialized by VSHIFTI
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Geophysical/Mathematical Spherical Coordinate Conversions
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_GEO2MATHS converts a scalar field from geophysical to
! mathematical spherical coordinates
!
! NG_MATH2GEOS converts a scalar field from mathematical to
! geophysical spherical coordinat
!
! NG_GEO2MATHV converts a vector field from geophysical to
! mathematical spherical coordinates
!
! NG_MATH2GEOV converts a vector field from mathematical to
! geophysical spherical coordinates
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Scalar Spherical Harmonic Analysis
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_SHAEC computes the spherical harmonic analysis on an
! equally spaced grid using O(N**2) storage,
! initialized by NG_SHAECI.
!
! NG_SHAES computes the spherical harmonic analysis on an
! equally spaced grid using O(N**3) storage,
! initialized by NG_SHAESI.
!
! NG_SHAGC computes the spherical harmonic analysis on a
! Gaussian grid using O(N**2) storage,
! initialized by NG_SHAGCI.
!
! NG_SHAGS computes the spherical harmonic analysis on a
! Gaussian grid using O(N**3) storage,
! initialized by NG_SHAGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Scalar Spherical Harmonic Synthesis
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_SHSEC computes the spherical harmonic synthesis on an
! equally spaced grid using O(N**2) storage,
! initialized by NG_SHSECI.
!
! NG_SHSES computes the spherical harmonic synthesis on an
! equally spaced grid using O(N**3) storage,
! initialized by NG_SHSESI.
!
! NG_SHSGC computes the spherical harmonic synthesis on a
! Gaussian grid using O(N**2) storage,
! initialized by NG_SHSGCI.
!
! NG_SHSGS computes the spherical harmonic synthesis on a
! Gaussian grid using O(N**3) storage,
! initialized by NG_SHSGSI.
!
! ~~~~~~~~~~~~~~~~~~
! Scalar Projections
! ~~~~~~~~~~~~~~~~~~
!
! NG_SHPE computes the spherical harmonic analysis and synthesis
! on an equally spaced grid using O(N**2) storage,
! initialized by NG_SHPEI.
!
! NG_SHPG computes the spherical harmonic analysis and synthesis
! on a Gaussian grid using O(N**2) storage,
! initialized by NG_SHPGI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Vector Spherical Harmonic Analysis
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_VHAEC computes the vector harmonic analysis on an equally
! spaced grid using O(N**2) storage,
! initialized by NG_VHAECI.
!
! NG_VHAES computes the vector harmonic analysis on an equally
! spaced grid using O(N**3) storage,
! initialized by NG_VHAESI.
!
! NG_VHAGC computes the vector harmonic analysis on a Gaussian
! grid using O(N**2) storage,
! initialized by NG_VHAGCI.
!
! NG_VHAGS computes the vector harmonic analysis on a Gaussian
! grid using O(N**3) storage,
! initialized by NG_VHAGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Vector Spherical Harmonic Synthesis
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_VHSEC computes the vector harmonic synthesis on an equally
! spaced grid using O(N**2) storage,
! initialized by NG_VHSECI.
!
! NG_VHSES computes the vector harmonic synthesis on an equally
! spaced grid using O(N**3) storage,
! initialized by NG_VHSESI.
!
! NG_VHSGC computes the vector harmonic synthesis on a Gaussian
! grid using O(N**2) storage,
! initialized by NG_VHSGCI.
!
! NG_VHSGS computes the vector harmonic synthesis on a Gaussian
! grid using O(N**3) storage,
! initialized by NG_VHSGSI.
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Associated Legendre Functions
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_ALFK computes the coefficients in the trigonometric
! series representation of Pnm( theta ).
!
! NG_LFP uses coefficients computed by routine ALFK to tabulate
! Pnm( theta ) at equally-spaced colatitudes.
!
! NG_LFPT uses coefficients computed by routine ALFK to compute
! Pnm( theta ) at a single colatitude theta.
!
! NG_LFIM given n, L,and thetai LFIM computes Pnm( thetai )
! for m=0,...,n and i=1,...,L.LFIN
!
! NG_LFIN given N, m, L and thetai LFIN computes Pnm( thetai )
! for n=m,...,N and i=1,...,L
!
! ~~~~~~~~~~~~~~~~~~~~
! Icosahedral geodesic
! ~~~~~~~~~~~~~~~~~~~~
!
! NG_IHGEOD computes the Cartesian coordinates of the points on
! the surface of the sphere corresponding to a
! twenty-sided geodesic.
!
! ~~~~~~~~~~~~~
! Multiple FFTS
! ~~~~~~~~~~~~~
!
! NG_HRFFTF multiple real forward fast fourier transforms,
! initialized by NG_HRFFTI.
!
! NG_HRFFTB multiple real backward fast fourier transforms,
! initialized by NG_HRFFTI
!
! ~~~~~~~~~~~~~~~~~~~~~~~~
! Gauss Points and Weights
! ~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_GAQD computes the Gaussian colatitudes and weights
! that are used in the Gaussian quadrature
!
! Note: Two unused arguments, "w" and "lwork", has been removed
!
! ~~~~~~~~~~~~~~~~~~~~~~~~~~
! Graphics on the 3-d Sphere
! ~~~~~~~~~~~~~~~~~~~~~~~~~~
!
! NG_VISEQU three-dimensional rendering of a scalar function
! defined on an equally-spaced latitudinal grid.
!
! NG_VISGAU three-dimensional rendering of a scalar function
! defined on a Gauss distributed latitudinal grid,
! initialized by NG_GAQD.
!
! NG_VISGEO three-dimensional rendering of a scalar function
! defined on a geodesic grid,
! initialized by NG_IHGEOD.
!
!=====================================================================
! Refer "NCAR menu" for interfacing NGSG in detail
!=====================================================================