harmonic_gradients
Calculates the zonal and meridional gradients of a scalar field from a series of spherical harmonics
Calling Sequence
from gravity_toolkit.harmonic_gradients import harmonic_gradients
gradients = harmonic_gradients(clm,slm,lon,lat,LMAX=60)
- gravity_toolkit.harmonic_gradients(clm1, slm1, lon, lat, LMIN=0, LMAX=60, MMAX=None)[source]
Calculates the gradient of a scalar field from a series of spherical harmonics
- Parameters:
- clm1: np.ndarray
cosine spherical harmonic coefficients in output units
- slm1: np.ndarray
sine spherical harmonic coefficients in output units
- 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
- Returns:
- gradients: np.ndarray
zonal and meridional gradient fields
- gravity_toolkit.geostrophic_currents(clm1, slm1, lon, lat, LMIN=0, LMAX=60, MMAX=None, RAD=0, DENSITY=1.035, LOVE=None, PLM=None)[source]
Converts data from spherical harmonic coefficients to a spatial fields of ocean geostrophic currents following [73, 79]
- Parameters:
- clm1: np.ndarray
cosine spherical harmonic coefficients
- slm1: np.ndarray
sine spherical harmonic coefficients
- 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
- RAD: float, default 0.0
Gaussian smoothing radius (km)
- LMAX: int, default 0
Upper bound of Spherical Harmonic Degrees
- DENSITY: float, default 1.035
Average density of seawater at depth in g/cm3
- LOVE: tuple or NoneType, default None
Load Love numbers up to degree LMAX (
hl,kl,ll)- PLM: np.ndarray or NoneType, default None
Fully-normalized associated Legendre polynomials
- Returns:
- currents: np.ndarray
zonal and meridional current fields [cm/s]