-
Notifications
You must be signed in to change notification settings - Fork 104
/
shexpandglqc.3
131 lines (131 loc) · 5.35 KB
/
shexpandglqc.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.\" 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 "shexpandglqc" "1" "2021-02-15" "Fortran 95" "SHTOOLS 4.11"
.hy
.SH SHExpandGLQC
.PP
Expand a 2D grid sampled on the Gauss-Legendre quadrature nodes into
spherical harmonics.
.SH Usage
.PP
call SHExpandGLQC (\f[V]cilm\f[R], \f[V]lmax\f[R], \f[V]gridglq\f[R],
\f[V]w\f[R], \f[V]plx\f[R], \f[V]zero\f[R], \f[V]norm\f[R],
\f[V]csphase\f[R], \f[V]lmax_calc\f[R], \f[V]exitstatus\f[R])
.SH Parameters
.TP
\f[V]cilm\f[R] : output, complex(dp), dimension (2, \f[V]lmax\f[R]+1, \f[V]lmax\f[R]+1) or (2, \f[V]lmax_calc\f[R]+1, \f[V]lmax_calc\f[R]+1)
The complex spherical harmonic coefficients of the complex function.
The first index specifies the coefficient corresponding to the positive
and negative order of \f[V]m\f[R], respectively, with
\f[V]Clm=cilm(1,l+1,m+1)\f[R] and \f[V]Cl,-m =cilm(2,l+1,m+1)\f[R].
.TP
\f[V]lmax\f[R] : input, integer(int32)
The spherical harmonic bandwidth of the grid.
If \f[V]lmax_calc\f[R] is not specified, this also corresponds to the
maximum spherical harmonic degree of the coefficients \f[V]cilm\f[R].
.TP
\f[V]gridglq\f[R] : input, complex(dp), dimension(\f[V]lmax\f[R]+1, 2*\f[V]lmax\f[R]+1)
A 2D grid of complex data sampled on the Gauss-Legendre quadrature
nodes.
The latitudinal nodes correspond to the zeros of the Legendre polynomial
of degree \f[V]lmax+1\f[R], and the longitudinal nodes are equally
spaced with an interval of \f[V]360/(2*lmax+1)\f[R] degrees.
See also \f[V]GLQGridCoord>\f[R].
.TP
\f[V]w\f[R] : input, real(dp), dimension (\f[V]lmax\f[R]+1)
The Gauss-Legendre quadrature weights used in the integration over
latitude.
These are obtained from a call to \f[V]SHGLQ\f[R].
.TP
\f[V]plx\f[R] : input, optional, real(dp), dimension (\f[V]lmax\f[R]+1, (\f[V]lmax\f[R]+1)*(\f[V]lmax\f[R]+2)/2)
An array of the associated Legendre functions calculated at the
Gauss-Legendre quadrature nodes.
These are determined from a call to \f[V]SHGLQ\f[R] with the option
\f[V]cnorm=1\f[R].
Either \f[V]plx\f[R] or \f[V]zero\f[R] must be present, but not both.
.TP
\f[V]zero\f[R] : input, optional, real(dp), dimension (\f[V]lmax\f[R]+1)
The nodes used in the Gauss-Legendre quadrature over latitude,
calculated by a call to \f[V]SHGLQ\f[R].
Either \f[V]plx\f[R] or \f[V]zero\f[R] must be present, but not both.
.TP
\f[V]norm\f[R] : input, optional, integer(int32), default = 1
1 (default) = 4-pi (geodesy) normalized harmonics; 2 = Schmidt
semi-normalized harmonics; 3 = unnormalized harmonics; 4 = orthonormal
harmonics.
.TP
\f[V]csphase\f[R] : input, optional, integer(int32), default = 1
1 (default) = do not apply the Condon-Shortley phase factor to the
associated Legendre functions; -1 = append the Condon-Shortley phase
factor of (-1)\[ha]m to the associated Legendre functions.
.TP
\f[V]lmax_calc\f[R] : input, optional, integer(int32), default = \f[V]lmax\f[R]
The maximum spherical harmonic degree calculated in the spherical
harmonic expansion.
.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]SHExpandGLQC\f[R] will expand a 2-dimensional grid of complex data
sampled on the Gauss-Legendre quadrature nodes into complex spherical
harmonics.
This is the inverse of the routine \f[V]MakeGridGLQC\f[R].
The latitudinal nodes of the input grid correspond to the zeros of the
Legendre polynomial of degree \f[V]lmax+1\f[R], and the longitudinal
nodes are equally spaced with an interval of \f[V]360/(2*lmax+1)\f[R]
degrees.
It is implicitly assumed that the function is bandlimited to degree
\f[V]lmax\f[R].
If the optional parameter \f[V]lmax_calc\f[R] is specified, the
spherical harmonic coefficients will be calculated up to this degree,
instead of \f[V]lmax\f[R].
.PP
The employed spherical harmonic normalization and Condon-Shortley phase
convention can be set by the optional arguments \f[V]norm\f[R] and
\f[V]csphase\f[R]; if not set, the default is to use geodesy 4-pi
normalized harmonics that exclude the Condon-Shortley phase of
(-1)\[ha]m.
The normalized legendre functions are calculated in this routine using
the scaling algorithm of Holmes and Featherstone (2002), which are
accurate to about degree 2800.
The unnormalized functions are accurate only to about degree 15.
.PP
The spherical harmonic transformation may be speeded up by precomputing
the Legendre functions on the Gauss-Legendre quadrature nodes in the
routine \f[V]SHGLQ\f[R] with the optional parameter \f[V]cnorm\f[R] set
to 1.
However, given that this array contains on the order of
\f[V]lmax\f[R]**3 entries, this is only feasible for moderate values of
\f[V]lmax\f[R].
.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
makegridglqc, shexpandglq, makegridglq, shexpanddh, makegriddh,
shexpanddhc, makegriddhc, shexpandlsq, glqgridcoord, shglq