geocenter

Data class for reading and processing geocenter data

Source code

General Attributes and Methods

class gravity_toolkit.geocenter(**kwargs)[source]

Data class for reading and processing geocenter data

Attributes:
C10: np.ndarray

cosine spherical harmonics of degree 1 and order 0

C11: np.ndarray

cosine spherical harmonics of degree 1 and order 1

S11: np.ndarray

sine spherical harmonics of degree 1 and order 1

X: np.ndarray

X-component of Cartesian geocenter coordinates

Y: np.ndarray

Y-component of Cartesian geocenter coordinates

Z: np.ndarray

Z-component of Cartesian geocenter coordinates

time: np.ndarray

time variable of the spherical harmonics

month: np.ndarray

GRACE/GRACE-FO months variable of the spherical harmonics

radius: float, default 6371000.790009159

Average Radius of the Earth [mm]

case_insensitive_filename(filename)[source]

Searches a directory for a filename without case dependence

Parameters:
filename: str, io.IOBase, pathlib.Path or None

input filename

from_AOD1B(release, year, month, product='glo')[source]

Reads monthly non-tidal ocean and atmospheric variation geocenter files

Parameters:
release: str

GRACE/GRACE-FO/Swarm data release for dealiasing product

year: int

calendar year of data

month: int

calendar month of data

product: str, default ‘glo’

GRACE/GRACE-FO/Swarm dealiasing product

from_gravis(geocenter_file, **kwargs)[source]

Reads monthly geocenter spherical harmonic data files from GFZ GravIS calculated using GRACE/GRACE-FO measurements and Ocean Models of degree 1 [13]

Parameters:
geocenter_file: str

degree 1 file

header: bool, default True

file contains header text to be skipped

from_SLR(geocenter_file, **kwargs)[source]

Reads monthly geocenter files from satellite laser ranging corrected for non-tidal ocean and atmospheric variation

Reads monthly geocenter files from satellite laser ranging provided by CSR

  • RL04: GCN_RL04.txt

  • RL05: GCN_RL05.txt

New CF-CM geocenter dataset to reflect the true degree-1 mass variations

New geocenter solutions from Minkang Cheng

Parameters:
geocenter_file: str

Satellite Laser Ranging file

AOD: bool, default False

remove Atmospheric and Oceanic Dealiasing products

release: str or NoneType, default None

GRACE/GRACE-FO/Swarm data release for AOD

header: int, default 0

rows of data to skip when importing data

columns: list, default []

column names of ascii file

  • 'time': date in decimal-years

  • 'X': X-component of geocenter variation

  • 'Y': Y-component of geocenter variation

  • 'Z': Z-component of geocenter variation

  • 'X_sigma': X-component uncertainty

  • 'Y_sigma': Y-component uncertainty

  • 'Z_sigma': Z-component uncertainty

from_UCI(geocenter_file, **kwargs)[source]

Reads monthly geocenter files computed using GRACE/GRACE-FO measurements and ocean models [62] [60]

Parameters:
geocenter_file: str

input datafile with geocenter coefficients

from_swenson(geocenter_file, **kwargs)[source]

Reads monthly geocenter coefficients computed by Sean Swenson using GRACE/GRACE-FO measurements and Ocean Models of degree 1 [62]

Parameters:
geocenter_file: str

degree 1 file

header: bool, default True

file contains header text to be skipped

from_tellus(geocenter_file, **kwargs)[source]

Reads monthly geocenter spherical harmonic data files from GRACE Tellus Technical Notes (TN-13) calculated using GRACE/GRACE-FO measurements and Ocean Models of Degree 1 [58, 59, 62]

Datasets distributed by NASA PO.DAAC

Parameters:
geocenter_file: str

degree 1 file

  • CSR: TN-13_GEOC_CSR_RL06.txt

  • GFZ: TN-13_GEOC_GFZ_RL06.txt

  • JPL: TN-13_GEOC_JPL_RL06.txt

header: bool, default True

file contains header text to be skipped

JPL: bool, default True

use JPL TN-13 geocenter files with self-attraction and loading

from_netCDF4(geocenter_file, group=None, **kwargs)[source]

Reads geocenter file and extracts dates and spherical harmonic data from a netCDF4 file [60]

Parameters:
geocenter_file: str

degree 1 netCDF4 file

group: str or NoneType, default None

netCDF4 group name

compression: str or NoneType, default None

file compression type

copy(**kwargs)[source]

Copy a geocenter object to a new geocenter object

Parameters:
fields: list

default keys in geocenter object

from_dict(temp, **kwargs)[source]

Convert a dictionary object to a geocenter object

Parameters:
temp: dict

dictionary object to be converted

fields: list

default keys in dictionary

from_harmonics(temp, **kwargs)[source]

Convert a harmonics object to a geocenter object

Parameters:
temp: obj

harmonics object to be converted

fields: list

default keys in harmonics object

from_matrix(clm, slm)[source]

Converts spherical harmonic matrices to a geocenter object

Parameters:
clm: np.ndarray

cosine spherical harmonics of degree 1

slm: np.ndarray

sine spherical harmonics of degree 1

to_dict(**kwargs)[source]

Convert a geocenter object to a dictionary object

Parameters:
fields: list

default attributes in geocenter object

to_matrix()[source]

Converts a geocenter object to spherical harmonic matrices

to_cartesian(kl=0.0)[source]

Converts normalized spherical harmonics to cartesian geocenter variations

Parameters:
kl: float

gravitational load love number of degree 1

to_cmwe(kl=0.0)[source]

Converts normalized spherical harmonics to centimeters water equivalent

Parameters:
kl: float

gravitational load love number of degree 1

to_mmwe(kl=0.0)[source]

Converts normalized spherical harmonics to millimeters water equivalent

Parameters:
kl: float

gravitational load love number of degree 1

from_cartesian(kl=0.0)[source]

Converts cartesian geocenter variations to normalized spherical harmonics

Parameters:
kl: float

gravitational load love number of degree 1

from_cmwe(kl=0.0)[source]

Normalizes spherical harmonics from centimeters water equivalent (cmwe)

Parameters:
kl: float

gravitational load love number of degree 1

from_mmwe(kl=0.0)[source]

Normalizes spherical harmonics from millimeters water equivalent (mmwe)

Parameters:
kl: float

gravitational load love number of degree 1

mean(apply=False, indices=Ellipsis)[source]

Compute mean gravitational field and remove from data if specified

Parameters:
apply: bool, default False

remove the mean field from the input harmonics

indices: int, default Ellipsis

indices of input geocenter object to compute mean

add(temp)[source]

Add two geocenter objects

Parameters:
temp: obj

geocenter object to be added

subtract(temp)[source]

Subtract one geocenter object from another

Parameters:
temp: obj

geocenter object to be subtracted

multiply(temp)[source]

Multiply two geocenter objects

Parameters:
temp: obj

geocenter object to be multiplied

divide(temp)[source]

Divide one geocenter object from another

Parameters:
temp: obj

geocenter object to be divided

scale(var)[source]

Multiply a geocenter object by a constant

Parameters:
var: float

scalar value to which the geocenter object will be multiplied

power(power)[source]

Raise a geocenter object to a power

Parameters:
power: float

power to which the geocenter object will be raised

get(field: str)[source]

Get a field from the geocenter object

Parameters:
field: str

field name

Returns:
var: np.ndarray

variable for field