1D packed-triangular index for into the output arrays of
ASSOC_LEGENDRE_ALL, DDX_ASSOC_LEGENDRE_ALL,
ASSOC_LEGENDRE_NORM_ALL, and DDX_ASSOC_LEGENDRE_NORM_ALL (all
of which only need , by conjugate/parity symmetry).
Matches the SHTOOLS PlmIndex convention.
Returns: Packed index , .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | L |
Degree, . |
||
| integer(kind=i4), | intent(in) | :: | M |
Order, . |
FUNCTION PLM_INDEX(L, M) IMPLICIT NONE INTEGER(KIND=i4), INTENT(IN) :: L INTEGER(KIND=i4), INTENT(IN) :: M INTEGER(KIND=i4) :: PLM_INDEX PLM_INDEX = L*(L+1)/2 + M + 1 END FUNCTION PLM_INDEX