4.3.2 SHTNML

1.
Function
Determines the storage area of the spectral data.

2.
Definition

In SHTLIB, the spectral data (Smn) are stored as (M+1)2 independent components - S00,S01,กฤ,S0M,  Re(S11),Re(S12),กฤ,Re(S1M), Im(S11 ),Im(S12),กฤ,Im(S1M),กฤ,Re(SMM),Im(SMM) - in the order given (as an array with length of (MM+1)**2), based on the restrictions given in "Summary." Here, Re( ) and; Im( ) represents the floating-point and imaginary parts. This subroutine determines the storage position of Re(Smn ) and Im(Smn) within the array from the cut-off wavenumber M, the total wavenumber n of Smn, and the zonal wavenumber m.

3.
Call
SHTNML(MM,N,M,LR,LI)

4.
Explanation of Parameters
MM (I) Input parameter. Cut-off wavenumber (M).
N (I) Input parameter. Total wavenumber (n)
M (I) Input parameter. Zonal wavenumber (m)
LR (I) Output parameter. Storage position of Re(Smn).
LI (I) Output parameter. Storage position of Im(Smn).

5.
Notes
(a)
Since the Im(S0n ) component does not exist, the value of LR will be returned as LI in case of M=0.