Skip to content

Latest commit

 

History

History
116 lines (58 loc) · 2.87 KB

shmultiply.pod

File metadata and controls

116 lines (58 loc) · 2.87 KB

SHMultiply

SHMultiply -

Multiply two functions and determine the resulting spherical harmonic coefficients.

SYNOPSIS

SUBROUTINE SHMultiply (

SHOUT, SH1, LMAX1, SH2, LMAX2, PRECOMP, NORM, CSPHASE )

    REAL*8

    SHOUT(2, LMAX1+LMAX2+1, LMAX1+LMAX2+1), SH1(2, LMAX1+1, LMAX1+1), SH2(2, LMAX2+1, LMAX2+1)

    INTEGER

    LMAX1, LMAX2

    INTEGER, OPTIONAL

    PRECOMP, NORM, CSPHASE

DESCRIPTION

SHMultiply will take two sets of spherical harmonic coefficients, multiply them in the space domain, and expand the resulting field in spherical harmonics using SHExpandGLQ. The spherical harmonic bandwidth of the resulting field is LMAX1+LMAX2, where LMAX1 and LMAX2 are the bandwidths of the input fields. If the optional parameter PRECOMP is set, then the Legendre functions will be precomputed on the Gauss-Legendre quadrature nodes (these are thus calculated only once, as opposed to three times).

The employed spherical harmonic normalization and Condon-Shortley phase convention can be set by the optional arguments NORM and CSPHASE; if not set, the default is to use geodesy 4-pi normalized harmonics that exclude the Condon-Shortley phase of (-1)^m.

ARGUMENTS

SHOUT

(output) REAL*8, DIMENSION (2, LMAX1+LMAX2+1, LMAX1+LMAX2+1)

The real spherical harmonic coefficients of the space domain mulitplication of SH1 and SH2.

SH1

(input) REAL*8, DIMENSION (2, LMAX1+1, LMAX1+1)

The spherical harmonic coefficients of the first function.

LMAX1

(input) INTEGER

The spherical harmonic bandwidth of SH1.

SH2

(input) REAL*8, DIMENSION (2, LMAX2+1, LMAX2+1)

The spherical harmonic coefficients of the second function.

LMAX2

(input) INTEGER

The spherical harmonic bandwidth of SH2.

PRECOMP

(input) INTEGER

If 1, the Legendre functions will be precomputed on the Gauss-Legendre quadrature nodes. If 0, they will not be precomputed.

NORM

(input) INTEGER, OPTIONAL

1 (default) = Geodesy 4-pi normalized harmonics; 2 = Schmidt semi-normalized harmonics; 3 = unnormalized harmonics; 4 = orthonormal harmonics.

CSPHASE

(input) INTEGER, OPTIONAL

1 (default) = do not apply the Condon-Shortley phase factor to the associated Legendre functions; -1 = append the Condon-Shortley phase factor of (-1)^m to the associated Legendre functions.

NOTES

This routine makes use of the Gauss-Legendre quadrature routines MakeGridGLQ and SHExpandGLQ. While these could be substituted by MakeGridDH and SHExpandDH, the routines would be twice as slow.

SEE ALSO

shexpandglq(1), makegridglq(1), precompute(1)

http://shtools.ipgp.fr/

COPYRIGHT AND LICENSE

Copyright 2012 by Mark Wieczorek <wieczor@ipgp.fr>.

This is free software; you can distribute and modify it under the terms of the revised BSD license.