/
makegridglq.1
124 lines (124 loc) · 4.76 KB
/
makegridglq.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 2.0.3
.\"
.TH "makegridglq" "1" "2016\-12\-15" "Fortran 95" "SHTOOLS 4.1"
.hy
.SH MakeGridGLQ
.PP
Create a 2D map from a set of spherical harmonic coefficients sampled on
the Gauss\-Legendre quadrature nodes.
.SH Usage
.PP
call MakeGridGLQ (\f[C]gridglq\f[], \f[C]cilm\f[], \f[C]lmax\f[],
\f[C]plx\f[], \f[C]zero\f[], \f[C]norm\f[], \f[C]csphase\f[],
\f[C]lmax_calc\f[], \f[C]exitstatus\f[])
.SH Parameters
.TP
.B \f[C]gridglq\f[] : output, real*8, dimension (\f[C]lmax\f[]+1, 2*\f[C]lmax\f[]+1)
A 2D map of the function sampled on the Gauss\-Legendre quadrature
nodes.
.RS
.RE
.TP
.B \f[C]cilm\f[] : input, real*8, dimension (2, \f[C]lmaxin\f[]+1, \f[C]lmaxin\f[]+1)
The real spherical harmonic coefficients of the function.
When evaluating the function, the maximum spherical harmonic degree
considered is the minimum of \f[C]lmax\f[], \f[C]lmaxin\f[], or
\f[C]lmax_calc\f[] (if specified).
The coefficients \f[C]C1lm\f[] and \f[C]C2lm\f[] refer to the
\[lq]cosine\[rq] (\f[C]Clm\f[]) and \[lq]sine\[rq] (\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 maximum spherical harmonic bandwidth of the function.
This determines the sampling nodes and dimensions of the output grid.
.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 used in evaluating the function.
This must be less than or equal to \f[C]lmax\f[].
.RS
.RE
.TP
.B \f[C]exitstatus\f[] : output, optional, integer
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.
# Description
.RS
.RE
.PP
\f[C]MakeGridGLQ\f[] will create a 2\-dimensional map from a set of
input spherical harmonic coefficients sampled on the Gauss\-Legendre
quadrature nodes.
This is the inverse of the routine \f[C]SHExpandGLQ\f[].
The latitudinal nodes 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.
When evaluating the function, the maximum spherical harmonic degree that
is considered is the minimum of \f[C]lmax\f[], the size of
\f[C]lmaxin\f[], or \f[C]lmax_calc\f[] (if specified).
.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 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 reconstruction of the spherical harmonic function 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]shexpandglq\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[]