charm_integ#
Module to compute the following integrals:
a product of two fully-normalized associated Legendre functions and a sine of a co-latitude,
a product of two
fully-normalized surface spherical harmonic functions over a rectangular cell on the unit sphere,
Note
This documentation is written for double precision version of CHarm.
Functions
-
double charm_integ_pn1m1pn2m2(double cltmin, double cltmax, unsigned long n1, unsigned long m1, unsigned long n2, unsigned long m2, const charm_pnmj *pnmj, charm_err *err)#
Analytically computes the integral
The computation is based on the Fourier coefficients of the associated Legendre functions (see Eq. 33 of Pail and Plank, 2001).
References:
Pail, R., Plank, G., Schuh, W.-D. (2001) Spatially restricted data distributions on the sphere: the method of orthonormalized functions and applications. Journal of Geodesy 75:44—56
- Parameters:
cltmin – [in] Minimum co-latitude in radians.
cltmax – [in] Maximum co-latitude in radians.
n1 – [in] Harmonic degree of the first Legendre function.
m1 – [in] Harmonic order of the first Legendre function.
n2 – [in] Harmonic degree of the second Legendre function.
m2 – [in] Harmonic order of the second Legendre function.
pnmj – [in] The
charm_pnmj
structure with the Fourier coefficients of associated Legendre functions at least up to degreeCHARM_MAX(n1, n2)
. It is assumed that the structure is prepared beforehand by callingcharm_leg_pnmj_coeffs()
.err – [out] Error reported by the function (if any).
- Returns:
The value
ip
of the integral. In case of an error, returned is thenan
value and the error is written toerr
.
-
double charm_integ_yi1n1m1yi2n2m2(double cltmin, double cltmax, double lonmin, double lonmax, _Bool i1, unsigned long n1, unsigned long m1, _Bool i2, unsigned long n2, unsigned long m2, const charm_pnmj *pnmj, charm_err *err)#
Analytically computes the integral
where
- Parameters:
cltmin – [in] Minimum co-latitude in radians.
cltmax – [in] Maximum co-latitude in radians.
lonmin – [in] Minimum longitude in radians.
lonmax – [in] Maximum longitude in radians.
i1 – [in]
0
if the first spherical harmonic function is of thecos
type;1
for thesin
type.n1 – [in] Harmonic degree of the first spherical harmonic function.
m1 – [in] Harmonic order of the first spherical harmonic function.
i2 – [in]
0
if the second spherical harmonic function is of thecos
type;1
for thesin
type.n2 – [in] Harmonic degree of the second spherical harmonic function.
m2 – [in] Harmonic order of the second spherical harmonic function.
pnmj – [in] The
charm_pnmj
structure with the Fourier coefficients of associated Legendre functions at least up to degreeCHARM_MAX(n1, n2)
. It is assumed that the structure is prepared beforehand by callingcharm_leg_pnmj_coeffs()
.err – [out] Error reported by the function (if any).
- Returns:
The value
iy
of the integral. In case of an error, returned is thenan
value and the error is written toerr
.