-
Notifications
You must be signed in to change notification settings - Fork 103
/
plmschmidt_d1.html
85 lines (74 loc) · 6.78 KB
/
plmschmidt_d1.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>SHTOOLS - Legendre functions</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../css/sh.css">
<link rel="icon" type="image/vnd.microsoft.icon" href="../../images/favicon.ico">
</head>
<body>
<div class="main">
<p class="centeredimage"><img src="../../images/logo.jpg" width=894 height=135 alt="SHTOOLS --- Tools for working with spherical harmonics"></p>
<table class="menu">
<tbody>
<tr>
<td><a href="../../../index.html">HOME</a></td>
<td><a href="https://github.com/SHTOOLS/SHTOOLS/releases">DOWNLOAD</a></td>
<td class="selected"><a href="../../documentation.html">DOCUMENTATION</a></td>
<td><a href="../../faq.html">FAQ</a> </td>
</tr>
</tbody>
</table>
<p class="dir">
> <a href="../../../index.html" class="dir">Home</a> > <a href="../../documentation.html" class="dir">Documentation</a> > <a href="../../f95-routines.html" class="dir">Fortran 95</a> > <a href="../../legendre.html" class="dir">Legendre Functions</a></p>
<h1 id="plmschmidt_d1">PlmSchmidt_d1</h1>
<p>Compute all the Schmidt semi-normalized associated Legendre functions and first derivatives.</p>
<h1 id="usage">Usage</h1>
<p>call PlmSchmidt_d1 (<code>p</code>, <code>dp</code>, <code>lmax</code>, <code>z</code>, <code>csphase</code>, <code>cnorm</code>, <code>exitstatus</code>)</p>
<h1 id="parameters">Parameters</h1>
<dl>
<dt><code>p</code> : output, real*8, dimension ((<code>lmax</code>+1)*(<code>lmax</code>+2)/2)</dt>
<dd>An array of Schmidt-normalized associated Legendre functions up to degree <code>lmax</code>. The index corresponds to <code>l*(l+1)/2+m+1</code>, which can be calculated by a call to <code>PlmIndex</code>.
</dd>
<dt><code>dp</code> : output, real*8, dimension ((<code>lmax</code>+1)*(<code>lmax</code>+2)/2)</dt>
<dd>An array of the first derivatives of the Schmidt-normalized associated Legendre functions up to degree <code>lmax</code>. The index corresponds to <code>l*(l+1)/2+m+1</code>, which can be calculated by a call to <code>PlmIndex</code>.
</dd>
<dt><code>lmax</code> : input, integer</dt>
<dd>The maximum degree of the associated Legendre functions to be computed. If <code>lmax</code> is -1, allocated memory will be deallocated.
</dd>
<dt><code>z</code> : input, real*8</dt>
<dd>The argument of the associated Legendre functions.
</dd>
<dt><code>csphase</code> : input, optional, integer, default = 1</dt>
<dd>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.
</dd>
<dt><code>cnorm</code> : input, optional, integer, default = 0</dt>
<dd>If 1, the complex normalization of the associated Legendre functions will be used. The default is to use the real normalization.
</dd>
<dt><code>exitstatus</code> : output, optional, integer</dt>
<dd>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.
</dd>
</dl>
<h1 id="description">Description</h1>
<p><code>PlmSchmidt_d1</code> will calculate all of the Schmidt-normalized associated Legendre functions and first derivatives up to degree <code>lmax</code> 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 <code>l</code> and angular order <code>m</code> corresponds to <code>l*(l+1)/2+m+1</code>, which can be calculated by a call to <code>PlmIndex</code>.</p>
<p>The integral of the squared Legendre functions over the interval [-1, 1] is <code>2*(2-delta(0,m))/(2l+1)</code>, where delta is the Kronecker delta function. If the optional parameter <code>cnorm</code> 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 <code>2/(2l+1)</code>. The default is to exclude the Condon-Shortley phase, but this can be modified by setting the optional argument <code>csphase</code> to -1. Note that the derivative of the Legendre functions is calculated with respect to its arguement <code>z</code>, and not latitude or colatitude. If <code>z=cos(theta)</code>, where <code>theta</code> is the colatitude, then it is only necessary to multiply <code>dp</code> by <code>-sin(theta)</code> to obtain the derivative with respect to <code>theta</code>.</p>
<p>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 <code>lmax</code>, these will not be recomputed. If you wish to deallocate this memory, which is an array of length <code>(lmax+1)*(lmax+2)</code>, recall this routine with <code>lmax</code>=-1.</p>
<h1 id="references">References</h1>
<p>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.</p>
<h1 id="see-also">See also</h1>
<p><a href="plbar.html"><code>plbar</code></a>, <a href="plbar_d1.html"><code>plbar_d1</code></a>, <a href="plmbar.html"><code>plmbar</code></a>, <a href="plmbar_d1.html"><code>plmbar_d1</code></a>, <a href="plon.html"><code>plon</code></a>, <a href="plon_d1.html"><code>plon_d1</code></a>, <a href="plmon.html"><code>plmon</code></a>, <a href="plmon_d1.html"><code>plmon_d1</code></a>, <a href="plschmidt.html"><code>plschmidt</code></a>, <a href="plmschmidt.html"><code>plmschmidt</code></a>, <a href="plmschmidt_d1.html"><code>plmschmidt_d1</code></a>, <a href="plegendre.html"><code>plegendre</code></a>, <a href="plegendre_d1.html"><code>plegendre_d1</code></a>, <a href="plegendrea.html"><code>plegendrea</code></a>, <a href="plegendrea_d1.html"><code>plegendrea_d1</code></a>, <a href="plmindex.html"><code>plmindex</code></a></p>
<p class="dir">
> <a href="../../../index.html" class="dir">Home</a> > <a href="../../documentation.html" class="dir">Documentation</a> > <a href="../../f95-routines.html" class="dir">Fortran 95</a> > <a href="../../legendre.html" class="dir">Legendre Functions</a></p>
<table class="footer2">
<tbody>
<tr>
<td class="c1"><a href="https://lagrange.oca.eu/?lang=en">Laboratoire Lagrange</a></td>
<td class="c2"><a href="https://www.oca.eu/?lang=en">Observatoire de la Côte d'Azur</a></td>
<td class="c3">© 2017 <a href="https://github.com/SHTOOLS">SHTOOLS</a></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>