pyTMD.earth

  • Calculates Earth reference and deformation parameters

  • Provides gravitational and ellipsoidal parameters from Hofmann-Wellenhof and Moritz [43], Petit and Luzum [77]

Source code

General Methods

class pyTMD.earth.EarthDatum(**kwargs)[source]

Class for gravitational and ellipsoidal parameters [43, 104]

Parameters:
ellipsoid: str, default ‘WGS84’

Reference ellipsoid name

  • 'CLK66': Clarke 1866

  • 'CLK80': Clarke 1880

  • 'GRS67': Geodetic Reference System 1967

  • 'GRS80': Geodetic Reference System 1980

  • 'HGH80': Hughes 1980 Ellipsoid

  • 'WGS60': World Geodetic System 1960

  • 'WGS66': World Geodetic System 1966

  • 'WGS72': World Geodetic System 1972

  • 'WGS84': World Geodetic System 1984

  • 'ATS77': Quasi-earth centred ellipsoid for ATS77

  • 'NAD27': North American Datum 1927

  • 'NAD83': North American Datum 1983

  • 'INTER': International

  • 'KRASS': Krassovsky (USSR)

  • 'SGS90': Soviet Geodetic System 1990

  • 'HLMRT': Helmert 1906 Ellipsoid

  • 'HOUGH': Hough 1960 Ellipsoid

  • 'AIRY': Airy (1830)

  • 'MAIRY': Modified Airy (1849)

  • 'MERIT': MERIT 1983 ellipsoid

  • 'TOPEX': TOPEX/POSEIDON ellipsoid

  • 'EGM96': EGM 1996 gravity model

  • 'IAG75': International Association of Geodesy (1975)

  • 'IAU64': International Astronomical Union (1964)

  • 'IAU76': International Astronomical Union (1976)

  • 'IERS89': IERS Numerical Standards (1989)

  • 'IERS': IERS Numerical Standards (2010)

units: str, default `MKS`

Output units

  • 'MKS': meters, kilograms, seconds

  • 'CGS': centimeters, grams, seconds

Attributes:
a_axis: float

Semi-major axis of the ellipsoid

flat: float

Flattening of the ellipsoid

omega: float

Angular velocity of the Earth

GM: float

Geocentric gravitational constant

property rad_e: float

Average radius of the Earth with same volume as ellipsoid

property b_axis: float

Semi-minor axis of the ellipsoid

property ratio: float

Ratio between ellipsoidal axes

property rad_p: float

Polar radius of curvature

property ecc: float

Linear eccentricity

property ecc1: float

First numerical eccentricity

property ecc2: float

Second numerical eccentricity

property m: float

\(m\) Parameter

property f2: float

\(f_2\) component

property f4: float

\(f_4\) component

property q: float

\(q\) Parameter

property q0: float

\(q_0\) Parameter

property J2: float

Oblateness \(J_2\) coefficient

property C20: float

Normalized \(C_{20}\) harmonic

property gamma_a: float

Normal gravity at the equator

property gamma_b: float

Normal gravity at the pole

gamma_0(theta: float | ndarray) → float[source]

Normal gravity at colatitudes

Parameters:
theta: float

Colatitudes (radians)

gamma_h(theta: float | ndarray, height: float | ndarray) → float[source]

Normal gravity at colatitudes and heights

Parameters:
theta: float

Colatitudes (radians)

height: float

Height above ellipsoid (same as units)

property dk: float

Ratio between gravity at pole versus gravity at equator

property U0: float

Normal potential at the ellipsoid

property area: float

Surface area of the ellipsoid

property volume: float

Volume of the ellipsoid

property rho_e: float

Average density

pyTMD.earth.love_numbers(omega: ndarray, model: str = 'PREM', **kwargs)[source]

Compute the body tide Love/Shida numbers for a given frequency [59, 107, 108, 110]

Parameters:
omega: np.ndarray

Angular frequency (radians per second)

model: str, default ‘PREM’

Earth model to use for Love numbers

  • ‘1066A’

  • ‘1066A-N’ (neutral)

  • ‘1066A-S’ (stable)

  • ‘PEM-C’

  • ‘C2’

  • ‘PREM’

astype: np.dtype, default np.float64

Data type for the output Love numbers

Returns:
h2: float

Degree-2 Love number of vertical displacement

k2: float

Degree-2 Love number of gravitational potential

l2: float

Degree-2 Love (Shida) number of horizontal displacement

pyTMD.earth.complex_love_numbers(omega: ndarray, **kwargs)[source]

Compute the complex body tide Love/Shida numbers with in-phase and out-of-phase components for a given frequency [60, 61, 77]

Parameters:
omega: np.ndarray

Angular frequency (radians per second)

kwargs: dict

Keyword arguments for pyTMD.earth.love_numbers()

Returns:
h2: complex

Degree-2 Love number of vertical displacement

k2: complex

Degree-2 Love number of gravitational potential

l2: complex

Degree-2 Love (Shida) number of horizontal displacement

pyTMD.earth.degree_love_numbers(l: int, model: str = 'Longman', **kwargs)[source]

Extracts body tide Love/Shida numbers for a given degree [63]

Parameters:
l: int

Degree of the spherical harmonics

model: str, default “Longman”

Earth model

  • 'Longman': Longman [53]

  • 'Kaula': Kaula [48]

  • 'Takeuchi': Takeuchi [99]

Returns:
hl: float

Body tide Love number of vertical displacement

kl: float

Body tide Love number of gravitational potential

ll: float

Body tide Love (Shida) number of horizontal displacement

pyTMD.earth.load_love_numbers(filename: str | Path = PosixPath('/home/docs/checkouts/pytmd/checkouts/latest/pyTMD/data/han-wahr-lln.txt'), reference: str = 'CE', **kwargs)[source]

Read tables of Load Love/Shida numbers and applies isomorphic parameters [7, 28, 105]

Parameters:
filename: str | pathlib.Path

Elastic load Love/Shida numbers file

reference: str, default ‘CE’

Reference frame of degree 1 Love/Shida 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

lmax: int, default from file

Upper bound of spherical harmonic degrees

Returns:
hl: np.ndarray

Load Love number of vertical displacement

kl: np.ndarray

Load Love number of gravitational potential

ll: np.ndarray

Load Love (Shida) number of horizontal displacement

pyTMD.earth.adjust_load_love_numbers(omega: ndarray, **kwargs)[source]

Compute the adjustments for load Love/Shida numbers to account for free core nutation and other resonances [60, 61, 77]

Parameters:
omega: np.ndarray

Angular frequency (radians per second)

Returns:
dh21: float

Load Love number adjustments for vertical displacement

dk21: float

Load Love number adjustments for gravitational potential

dl21: float

Load Love/Shida number adjustments for horizontal displacement

pyTMD.earth.greens_function(alpha: float | ndarray, lmax: int | None = None, lln: str = 'han-wahr', reference: str = 'CE', merge_fluid: bool = False)[source]

Computes Green’s functions for vertical and horizontal displacements following Farrell [28] using the Legendre recurrence relation from Hofmann-Wellenhof and Moritz [43]

Parameters:
alpha: float or np.ndarray,

Angular distance (radians)

lmax: int or None, default None

Upper bound of spherical harmonic degrees

lln: str, default ‘han-wahr’

Name of the Load Love number dataset to use

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

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

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

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

merge_fluid: default False

Merge the outermost solid and fluid layers for estimating the asymptotic load Love numbers

Returns:
Gu: numpy.ndarray

Green’s function for vertical displacement

Gv: numpy.ndarray

Green’s function for horizontal displacement

pyTMD.earth.write_greens_function(lmax: int | None = None, lln: str = 'han-wahr', reference: str = 'CE', merge_fluid: bool = False)[source]

Creates a table of Green’s functions for vertical and horizontal displacements using reference angles from Farrell [28]

Parameters:
lmax: int or None, default None

Upper bound of spherical harmonic degrees

lln: str, default ‘han-wahr’

Name of the Load Love number dataset to use

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

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

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

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

merge_fluid: default False

Merge the outermost solid and fluid layers for estimating the asymptotic load Love numbers

pyTMD.earth.read_greens_function(lln: str = 'han-wahr', reference: str = 'CE', merge_fluid: bool = False)[source]

Read lookup table of computed Green’s functions

Parameters:
lln: str, default ‘han-wahr’

Name of the Load Love number dataset to use

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

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

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

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:
alpha: np.ndarray

Reference anglar distances (radians)

Gu: numpy.ndarray

Reference Green’s function for vertical displacement

Gv: numpy.ndarray

Reference Green’s function for horizontal displacement

pyTMD.earth.interpolate_greens_function(alpha: float | ndarray, lln: str = 'han-wahr', reference: str = 'CE', merge_fluid: bool = False)[source]

Interpolates Green’s functions for vertical and horizontal displacements provided by a reference lookup table [28]

Parameters:
alpha: float or np.ndarray,

Angular distance (radians)

lln: str, default ‘han-wahr’

Name of the Load Love number dataset to use

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

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

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

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:
Gu: numpy.ndarray

Green’s function for vertical displacement

Gv: numpy.ndarray

Green’s function for horizontal displacement

pyTMD.earth.asymptotic_love_numbers(lln: str, merge_fluid: bool = False)[source]

Estimate asymptotic load Love numbers following Farrell [28]

Parameters:
lln: str, default ‘han-wahr’

Name of the Load Love number dataset to augment

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

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

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

merge_fluid: default False

Merge the outermost solid and fluid layers

Returns:
hinf: float

Asymptotic value of the Love number for vertical displacement

kinf: float

Asymptotic value of the Love number for gravitational potential

linf: float

Asymptotic value of the Love number for horizontal displacement

class pyTMD.earth.EarthLayer(name: str, radius: list[float], rho: ndarray, vp: ndarray, vs: ndarray)[source]

Class for estimating parameters for a layer within a 1-dimensional Earth model [25]

Parameters:
name: str

Name of the layer

radius: list[float]

Inner and outer radii of layer

rho: np.ndarray

Polynomial coefficients for density

vp: np.ndarray

Polynomial coefficients for P-wave velocities

vs: np.ndarray

Polynomial coefficients for S-wave velocities

mass(a: float = 6371000.0)[source]

Mass of the layer

Parameters:
a: float, default 6371000.0

Average radius of the Earth (m)

Returns:
M: float

Mass (kg)

volume()[source]

Volume of the layer (assuming spherical)

Returns:
V: float

Volume (kg m-3)

density(a: float = 6371000.0)[source]

Density at top of layer

Parameters:
a: float, default 6371000.0

Average radius of the Earth (m)

Returns:
rho: float

Density (kg m-3)

pwave(a: float = 6371000.0)[source]

Isotropic p-wave velocities at top of layer

Parameters:
a: float, default 6371000.0

Average radius of the Earth (m)

Returns:
vp: float

p-wave velocity (m s-1)

swave(a: float = 6371000.0)[source]

Isotropic s-wave velocity at top of layer

Parameters:
a: float, default 6371000.0

Average radius of the Earth (m)

Returns:
vs: float

s-wave velocity (m s-1)

property is_fluid

Layer cannot transmit s-waves

property is_solid

Layer can transmit s-waves

property r0

Inner radius (m)

property r1

Outer radius (m)

class pyTMD.earth.EarthModel(d)[source]

Class for estimating parameters for a 1-dimensional Earth model consisting of spherical shell layers with polynomial coefficients [25]

property mass

Total mass of the Earth

Returns:
M: float

Mass (kg)

property volume

Total encompassing volume of the Earth (assuming spherical)

Returns:
V: float

Volume (m-3)

property density

Average density of the Earth

Returns:
rho: float

Density (kg m-3)

property g

Self-consistent surface gravity

Returns:
gamma: float

Gravitational acceleration (m s-2)

asymptotic_love_numbers(merge_fluid: bool = False)[source]

Estimate asymptotic Love numbers following Farrell [28] and Guo et al. [36]

Parameters:
merge_fluid, default False

Merge the outermost solid and fluid layers

Returns:
hinf: float

Asymptotic value of the Love number for vertical displacement

kinf: float

Asymptotic value of the Love number for gravitational potential

linf: float

Asymptotic value of the Love number for horizontal displacement

pyTMD.earth._melchior_table_52(model: str)[source]

Body tide Love numbers for an Earth model provided in Table 5.2 of Melchior [63]

Parameters:
model: str

Earth model

  • 'Longman': Longman [53]

  • 'Kaula': Kaula [48]

  • 'Takeuchi': Takeuchi [99]