units
Class for converting GRACE/GRACE-FO Level-2 data to specific units
Calling Sequence
Calculating the degree dependent factors for converting harmonic units
from gravity_toolkit.units import units
from gravity_toolkit.read_love_numbers import read_love_numbers
hl,kl,ll = read_love_numbers(love_numbers_file, REFERENCE='CF')
dfactor = units(lmax=lmax).harmonic(hl,kl,ll)
to_cmwe = dfactor.cmwe
Calculating the degree dependent factors for converting spatial units
from gravity_toolkit.units import units
from gravity_toolkit.read_love_numbers import read_love_numbers
hl,kl,ll = read_love_numbers(love_numbers_file, REFERENCE='CF')
dfactor = units(lmax=lmax).spatial(hl,kl,ll)
from_cmwe = dfactor.cmwe
General Attributes and Methods
- class gravity_toolkit.units(lmax: int | None = None, a_axis: float = 637813700.0, flat: float = 0.0033528106647474805)[source]
Class for converting spherical harmonic and spatial data to specific units
- Parameters:
- lmax: int or NoneType, default None
Upper bound of Spherical Harmonic Degrees
- a_axis: float, default 6.378137e8
semi-major axis of the Earth’s ellipsoid in cm
- flat: float, default 1.0/298.257223563
flattening of the Earth’s ellipsoid
- Attributes:
- GM: float
Gravitational Constant of the Earth in cm3/s2
- g_wmo: float
standard gravitational acceleration in cm/s2
- omega: float
Angular velocity of the Earth in radians/s
- l: int
spherical harmonic degree up to
lmax
- property b_axis: float
semi-minor axis of the Earth’s ellipsoid in cm
- property rad_e: float
average radius of the Earth in cm with the same volume as the ellipsoid
- property rho_e: float
average density of the Earth in g/cm3
- property mass: float
approximate mass of the Earth in g
- harmonic(hl, kl, ll, **kwargs)[source]
Calculates degree dependent factors for converting spherical harmonic units from [73]
- Parameters:
- hl: float
Vertical Displacement load Love numbers
- kl: float
Gravitational Potential load Love numbers
- ll: float
Horizontal Displacement load Love numbers
- include_elastic: bool, default True
Include compensation for elastic response
- include_ellipsoidal: bool, default False
Include consideration for Earth’s oblateness
- Attributes:
- norm: float
fully normalized spherical harmonics
- cmwe: float
centimeters water equivalent
- mmwe: float
millimeters water equivalent
- mmGH: float
millimeters geoid height
- mmCU: float
millimeters elastic crustal deformation (uplift)
- mmCH: float
millimeters elastic crustal deformation (horizontal)
- cmVCU: float
centimeters viscoelastic crustal uplift from [76]
- mVCU: float
meters viscoelastic crustal uplift from [76]
- microGal: float
microGal gravity perturbations
- mbar: float
millibar equivalent surface pressure
- Pa: float
pascals equivalent surface pressure
- spatial(hl, kl, ll, **kwargs)[source]
Calculates degree dependent factors for converting spatial units from [73]
- Parameters:
- hl: float
Vertical Displacement load Love numbers
- kl: float
Gravitational Potential load Love numbers
- ll: float
Horizontal Displacement load Love numbers
- include_elastic: bool, default True
Include compensation for elastic response
- Attributes:
- norm: float
fully normalized spherical harmonics
- cmwe: float
centimeters water equivalent
- mmwe: float
millimeters water equivalent
- mmGH: float
millimeters geoid height
- microGal: float
microGal gravity perturbations
- get(var: str)[source]
Get the degree dependent factors for a specific unit
- Parameters:
- var: str
Unit name for spherical harmonics or spatial fields