-
Notifications
You must be signed in to change notification settings - Fork 103
/
plegendrea_d1.html
78 lines (67 loc) · 5.54 KB
/
plegendrea_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
<!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="plegendrea_d1">PLegendreA_d1</h1>
<p>Compute all the unnormalized associated Legendre functions and first derivatives.</p>
<h1 id="usage">Usage</h1>
<p>call PLegendreA_d1 (<code>p</code>, <code>dp</code>, <code>lmax</code>, <code>z</code>, <code>csphase</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 unnormalized 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 unnormalized 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.
</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>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>PLegendreA_d1</code> will calculate all of the unnormalized 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 hence will overflow for moderate values of <code>l</code> and <code>m</code>. 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>. The integral of the associated Legendre functions over the interval [-1, 1] is <code>2*(l+m)!/(l-m)!/(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 polynomials 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>
<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="plschmidt_d1.html"><code>plschmidt_d1</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="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>