/
shexpandglq.1
124 lines (124 loc) · 4.75 KB
/
shexpandglq.1
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
.\" Automatically generated by Pandoc 1.17.2
.\"
.TH "shexpandglq" "1" "2016\-08\-11" "Fortran 95" "SHTOOLS 3.4"
.hy
.SH SHExpandGLQ
.PP
Expand a 2D grid sampled on the Gauss\-Legendre quadrature nodes into
spherical harmonics.
.SH Usage
.PP
call SHExpandGLQ (\f[C]cilm\f[], \f[C]lmax\f[], \f[C]gridglq\f[],
\f[C]w\f[], \f[C]plx\f[], \f[C]zero\f[], \f[C]norm\f[],
\f[C]csphase\f[], \f[C]lmax_calc\f[])
.SH Parameters
.TP
.B \f[C]cilm\f[] : output, real*8, dimension (2, \f[C]lmax\f[]+1, \f[C]lmax\f[]+1) or (2, \f[C]lmax_calc\f[]+1, \f[C]lmax_calc\f[]+1)
The real spherical harmonic coefficients of the function.
The coefficients \f[C]C1lm\f[] and \f[C]C2lm\f[] refer to the "cosine"
(\f[C]Clm\f[]) and "sine" (\f[C]Slm\f[]) coefficients, respectively,
with \f[C]Clm=cilm(1,l+1,m+1)\f[] and \f[C]Slm=cilm(2,l+1,m+1)\f[].
.RS
.RE
.TP
.B \f[C]lmax\f[] : input, integer
The spherical harmonic bandwidth of the grid.
If \f[C]lmax_calc\f[] is not specified, this also corresponds to the
maximum spherical harmonic degree of the coefficients \f[C]cilm\f[].
.RS
.RE
.TP
.B \f[C]gridglq\f[] : input, real*8, dimension (\f[C]lmax\f[]+1, 2*\f[C]lmax\f[]+1)
A 2D grid of data sampled on the Gauss\-Legendre quadrature nodes.
The latitudinal nodes correspond to the zeros of the Legendre polynomial
of degree LMAX+1, and the longitudinal nodes are equally spaced with an
interval of \f[C]360/(2*lmax+1)\f[] degrees.
See also \f[C]GLQGridCoord\f[].
.RS
.RE
.TP
.B \f[C]w\f[] : input, real*8, dimension (\f[C]lmax\f[]+1)
The Gauss\-Legendre quadrature weights used in the integration over
latitude.
These are obtained from a call to \f[C]SHGLQ\f[].
.RS
.RE
.TP
.B \f[C]plx\f[] : input, optional, real*8, dimension (\f[C]lmax\f[]+1, (\f[C]lmax\f[]+1)*(\f[C]lmax\f[]+2)/2)
An array of the associated Legendre functions calculated at the
Gauss\-Legendre quadrature nodes.
These are determined from a call to \f[C]SHGLQ\f[].
Either \f[C]plx\f[] or \f[C]zero\f[] must be present, but not both.
.RS
.RE
.TP
.B \f[C]zero\f[] : input, optional, real*8, dimension (\f[C]lmax\f[]+1)
The nodes used in the Gauss\-Legendre quadrature over latitude,
calculated by a call to \f[C]SHGLQ\f[].
Either \f[C]plx\f[] or \f[C]zero\f[] must be present, but not both.
.RS
.RE
.TP
.B \f[C]norm\f[] : input, optional, integer, default = 1
1 (default) = Geodesy 4\-pi normalized harmonics; 2 = Schmidt
semi\-normalized harmonics; 3 = unnormalized harmonics; 4 = orthonormal
harmonics.
.RS
.RE
.TP
.B \f[C]csphase\f[] : input, optional, integer, 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)^m to the associated Legendre functions.
.RS
.RE
.TP
.B \f[C]lmax_calc\f[] : input, optional, integer, default = \f[C]lmax\f[]
The maximum spherical harmonic degree calculated in the spherical
harmonic expansion.
.RS
.RE
.SH Description
.PP
\f[C]SHExpandGLQ\f[] will expand a 2\-dimensional grid of data sampled
on the Gauss\-Legendre quadrature nodes into spherical harmonics.
This is the inverse of the routine \f[C]MakeGridGLQ\f[].
The latitudinal nodes of the input grid correspond to the zeros of the
Legendre polynomial of degree \f[C]lmax+1\f[], and the longitudinal
nodes are equally spaced with an interval of \f[C]360/(2*lmax+1)\f[]
degrees.
It is implicitly assumed that the function is bandlimited to degree
\f[C]lmax\f[].
If the optional parameter \f[C]lmax_calc\f[] is specified, the spherical
harmonic coefficients will be calculated up to this degree, instead of
\f[C]lmax\f[].
.PP
The employed spherical harmonic normalization and Condon\-Shortley phase
convention can be set by the optional arguments \f[C]norm\f[] and
\f[C]csphase\f[]; if not set, the default is to use geodesy 4\-pi
normalized harmonics that exclude the Condon\-Shortley phase of (\-1)^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 only accurate 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[C]SHGLQ\f[].
However, given that this array contains on the order of \f[C]lmax\f[]**3
entries, this is only feasible for moderate values of \f[C]lmax\f[].
.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
\f[C]makegridglq\f[], \f[C]shexpandglqc\f[], \f[C]makegridglqc\f[],
\f[C]shexpanddh\f[], \f[C]makegriddh\f[], \f[C]shexpanddhc\f[],
\f[C]makegriddhc\f[], \f[C]shexpandlsq\f[], \f[C]glqgridcoord\f[],
\f[C]shglq\f[]