-
Notifications
You must be signed in to change notification settings - Fork 104
/
plmbar_d1.3
110 lines (110 loc) · 4.36 KB
/
plmbar_d1.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "plmbar_d1" "1" "2021-02-15" "Fortran 95" "SHTOOLS 4.11"
.hy
.SH PlmBar_d1
.PP
Compute all the 4-pi (geodesy) normalized associated Legendre functions
and first derivatives.
.SH Usage
.PP
call PlmBar_d1 (\f[V]p\f[R], \f[V]dp\f[R], \f[V]lmax\f[R], \f[V]z\f[R],
\f[V]csphase\f[R], \f[V]cnorm\f[R], \f[V]exitstatus\f[R])
.SH Parameters
.TP
\f[V]p\f[R] : output, real(dp), dimension ((\f[V]lmax\f[R]+1)*(\f[V]lmax\f[R]+2)/2)
An array of 4-pi (geodesy) normalized associated Legendre functions up
to degree \f[V]lmax\f[R].
The index corresponds to \f[V]l*(l+1)/2+m+1\f[R], which can be
calculated by a call to \f[V]PlmIndex\f[R].
.TP
\f[V]dp\f[R] : output, real(dp), dimension ((\f[V]lmax\f[R]+1)*(\f[V]lmax\f[R]+2)/2)
An array of the first derivatives of the 4-pi (geodesy) normalized
associated Legendre functions up to degree \f[V]lmax\f[R].
The index corresponds to \f[V]l*(l+1)/2+m+1\f[R], which can be
calculated by a call to \f[V]PlmIndex\f[R].
.TP
\f[V]lmax\f[R] : input, integer(int32)
The maximum degree of the associated Legendre functions to be computed.
If \f[V]lmax\f[R] is -1, allocated memory will be deallocated.
.TP
\f[V]z\f[R] : input, real(dp)
The argument of the associated Legendre functions.
.TP
\f[V]csphase\f[R] : input, optional, integer(int32), default = 1
If 1 (default), the Condon-Shortley phase will be excluded.
If -1, the Condon-Shortley phase of (-1)\[ha]m will be appended to the
associated Legendre functions.
.TP
\f[V]cnorm\f[R] : input, optional, integer(int32), default = 0
If 1, the complex normalization of the associated Legendre functions
will be used.
The default is to use the real normalization.
.TP
\f[V]exitstatus\f[R] : output, optional, integer(int32)
If present, instead of executing a STOP when an error is encountered,
the variable exitstatus will be returned describing the error.
0 = No errors; 1 = Improper dimensions of input array; 2 = Improper
bounds for input variable; 3 = Error allocating memory; 4 = File IO
error.
.SH Description
.PP
\f[V]PlmBar_d1\f[R] will calculate all of the 4-pi (geodesy) normalized
associated Legendre functions and first derivatives up to degree
\f[V]lmax\f[R] 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 \f[V]l\f[R] and
angular order \f[V]m\f[R] corresponds to \f[V]l*(l+1)/2+m+1\f[R], which
can be computed by a call to \f[V]PlmIndex\f[R].
.PP
The integral of the squared Legendre functions over the interval [-1, 1]
is \f[V]2*(2-delta(0,m))\f[R], where delta is the Kronecker delta
function.
If the optional parameter \f[V]cnorm\f[R] 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 \f[V]csphase\f[R] to -1.
Note that the derivative of the Legendre functions is calculated with
respect to its arguement \f[V]z\f[R], and not latitude or colatitude.
If \f[V]z=cos(theta)\f[R], where \f[V]theta\f[R] is the colatitude, then
it is only necessary to multiply \f[V]dp\f[R] by \f[V]-sin(theta)\f[R]
to obtain the derivative with respect to \f[V]theta\f[R].
.PP
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 \f[V]lmax\f[R], these will
not be recomputed.
If you wish to deallocate this memory, which is an array of length
\f[V](lmax+1)*(lmax+2)\f[R], recall this routine with \f[V]lmax\f[R]=-1.
.SH References
.PP
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.
.SH See also
.PP
plbar, plbar_d1, plmbar, plon, plon_d1, plmon, plmon_d1, plschmidt,
plschmidt_d1, plmschmidt, plmschmidt_d1, plegendre, plegendre_d1,
plegendrea, plegendrea_d1, plmindex