pyTMD.solve.potential

  • Spherical harmonic expansions and summations

Source code

pyTMD.solve.ocean_harmonics(ds: Dataset, lmax: int = 696, a_axis: float = 6378137.0, flat: float = 0.0033528106647474805, GM: float = 398600441800000.0, rho_w: float | DataArray = 1025.0, lln: str = 'han-wahr', reference: str = 'CE', **kwargs)[source]

Converts ocean tide model constituents into spherical harmonic coefficients [74, 83, 102]

Parameters:
ds: xarray.Dataset

Dataset containing tidal harmonic constants

lmax: int, default 696

Upper bound of spherical harmonic degrees

a_axis: float, default 6378136.3

Semi-major axis of the Earth (meters)

flat: float, default 1.0/298.257223563

Ellipsoidal flattening

GM: float, default 3.986004418e14

Geocentric gravitational constant (m3 s-2)

rho_w: float or xarray.DataArray, default 1025.0

Density of sea water (kg m-3)

Can be spatially uniform or a grid matching the tidal dataset

lln: str, default ‘han-wahr’

name of the Load Love number dataset to use

  • 'han-wahr': Han and Wahr [35]

  • 'gegout': Gegout et al. [34]

  • 'wang-prem': Wang et al. [108]

reference: str, default ‘CE’

Reference frame of degree 1 load Love numbers

  • 'CF': Center of Surface Figure

  • 'CL': Center of Surface Lateral Figure

  • 'CH': Center of Surface Height Figure

  • 'CM': Center of Mass of Earth System

  • 'CE': Center of Mass of Solid Earth

Returns:
Ylms: xr.Dataset

Fully-normalized spherical harmonic coefficients

  • clm: cosine spherical harmonics (complex)

  • slm: sine spherical harmonics (complex)

pyTMD.solve.crustal_loading(ds: Dataset, Ylms: Dataset, lmax: int | None = None, a_axis: float = 6378137.0, flat: float = 0.0033528106647474805, lln: str = 'han-wahr', reference: str = 'CE', **kwargs)[source]

Calculates the crustal deformation induced by ocean tide loading via spherical harmonic summation [19, 81]

Parameters:
ds: xarray.Dataset

Dataset with spatial coordinates

Ylms: xarray.Dataset

Dataset with spherical harmonic coefficients

  • clm: cosine spherical harmonics (complex)

  • slm: sine spherical harmonics (complex)

lmax: int or None, default None

Upper bound of spherical harmonic degrees

a_axis: float, default 6378136.3

Semi-major axis of the Earth (meters)

flat: float, default 1.0/298.257223563

Ellipsoidal flattening

lln: str, default ‘han-wahr’

name of the Load Love number dataset to use

  • 'han-wahr': Han and Wahr [35]

  • 'gegout': Gegout et al. [34]

  • 'wang-prem': Wang et al. [108]

reference: str, default ‘CE’

Reference frame of degree 1 load Love numbers

  • 'CF': Center of Surface Figure

  • 'CL': Center of Surface Lateral Figure

  • 'CH': Center of Surface Height Figure

  • 'CM': Center of Mass of Earth System

  • 'CE': Center of Mass of Solid Earth

Returns:
ds: xr.Dataset

Dataset containing tidal harmonic constants

pyTMD.solve._seawater_density(temperature: ndarray, salinity: ndarray)[source]

Calculates the density of sea water using the EOS-80 model [28, 114]

Parameters:
temperature: np.ndarray

Sea water temperature (° C)

salinity: np.ndarray

Sea water salinity (unitness)

Returns:
rho_w: np.ndarray

Sea water density (kg/m3)