Skip to content

Latest commit

 

History

History
110 lines (57 loc) · 3.73 KB

plmbar_d1.pod

File metadata and controls

110 lines (57 loc) · 3.73 KB

PlmBar_d1

PlmBar_d1 -

Compute all the geodesy-normalized associated Legendre functions and first derivatives.

SYNOPSIS

SUBROUTINE PlmBar_d1 (

P, DP, LMAX, Z, CSPHASE, CNORM )

    REAL*8

    P((LMAX+1)*(LMAX+2)/2), DP((LMAX+1)*(LMAX+2)/2), Z

    INTEGER

    LMAX

    INTEGER, OPTIONAL

    CSPHASE, CNORM

DESCRIPTION

PlmBar_d1 will calculate all of the geodesy-normalized associated Legendre functions and first derivatives up to degree LMAX for a given argument. These are calculated using a standard three-term recursion formula, and in order to prevent overflows, the scaling approach of Holmes and Featherstone (2002) is utilized. These functions are accurate to about degree 2800. The index of the array corresponding to a given degree L and angular order M can be computed by a call to PlmIndex.

The integral of the squared Legendre functions over the interval [-1, 1] is 2 * (2 - delta(0,m)), where delta is the Kronecker delta function. If the optional parameter CNORM is set equal to 1, the complex normalization will be used where the integral of the squared Legendre functions over the interval [-1, 1] is 2. The default is to exclude the Condon-Shortley phase, but this can be modified by setting the optional argument CSPHASE to -1. Note that the derivative of the Legendre functions is calculated with respect to its arguement Z, and not latitude or colatitude. If Z=cos(theta), where theta is the colatitude, then it is only necessary to multiply DP by -sin(theta) to obtain the derivative with respect to theta.

ARGUMENTS

P

(output) REAL*8, DIMENSION ((LMAX+1)*(LMAX+2)/2)

An array of geodesy-normalized associated Legendre functions up to degree LMAX. The index corresponds to L*(L+1)/2 + M + 1, which can be calculated by a call to PlmIndex.

DP

(output) REAL*8, DIMENSION ((LMAX+1)*(LMAX+2)/2)

An array of the first derivatives of the geodesy-normalized associated Legendre functions up to degree LMAX. The index corresponds to L*(L+1)/2 + M + 1, which can be calculated by a call to PlmIndex.

LMAX

(input) INTEGER

The maximum degree of the associated Legendre functions to be computed. If LMAX is -1, allocated memory will be deallocated (see notes below).

Z

(input) REAL*8

The argument of the associated Legendre functions.

CSPHASE

(input) INTEGER, OPTIONAL

If 1 (default), the Condon-Shortley phase will be excluded. If -1, the Condon-Shortley phase of (-1)^m will be appended to the associated Legendre functions.

CNORM

(input) INTEGER, OPTIONAL

If 1, the complex normalization of the associated Legendre functions will be used. The default is to use the real normalization.

NOTES

This routine saves the three-term recursion factors and square roots of the integers the first time being called. If subsequent calls possess the same value of LMAX, these will not be recomputed. If you wish to deallocate this memory, which is an array of length (LMAX+1)*(LMAX+2), recall this routine with LMAX=-1.

REFERENCES

Holmes, S. A., and W. E. Featherstone, A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions, J. Geodesy, 76, 279- 299, 2002.

SEE ALSO

plbar(1), plbar_d1(1), plmbar(1), plon(1), plon_d1(1), plmon(1), plmon_d1(1), plschmidt(1), plschmidt_d1(1), plmschmidt(1), plmschmidt_d1(1), plegendre(1), plegendre_d1(1), plegendrea(1), plegendrea_d1(1), plmindex(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.