gen_stokes

  • Converts data from the spatial domain to spherical harmonic coefficients

Calling Sequence

from gravity_toolkit.gen_stokes import gen_stokes
from gravity_toolkit.associated_legendre import plm_holmes
PLM, dPLM = plm_holmes(LMAX, np.cos(th))
Ylms = gen_stokes(data, lon, lat, UNITS=1, LMAX=LMAX, PLM=PLM, LOVE=(hl,kl,ll))

Source code

gravity_toolkit.gen_stokes(data, lon, lat, LMIN=0, LMAX=60, MMAX=None, UNITS=1, PLM=None, LOVE=None)[source]

Converts data from the spatial domain to spherical harmonic coefficients [73]

Parameters:
data: np.ndarray

data matrix

lon: np.ndarray

longitude array

lat: np.ndarray

latitude array

LMIN: int, default 0

Lower bound of Spherical Harmonic Degrees

LMAX: int, default 60

Upper bound of Spherical Harmonic Degrees

MMAX: int or NoneType, default None

Upper bound of Spherical Harmonic Orders

UNITS: int, default 1

Input data units

  • 1: cm water equivalent thickness (cm w.e., g/cm2)

  • 2: gigatonnes of mass (Gt)

  • 3: mm water equivalent thickness (mm w.e., kg/m2)

  • list: custom degree-dependent unit conversion factor

PLM: np.ndarray or NoneType, default None

Input Legendre polynomials

LOVE: tuple or NoneType, default None

Input load Love numbers up to degree LMAX (hl, kl, ll)

Returns:
clm: np.ndarray

cosine spherical harmonic coefficients

slm: np.ndarray

sine spherical harmonic coefficients

l: np.ndarray

spherical harmonic degree to LMAX

m: np.ndarray

spherical harmonic order to MMAX