least_squares_mascons.py

  • Reads in an index of spherical harmonic coefficient files

  • Filters and smooths data with specified processing algorithms [12, 25]

  • Calculates regional mass anomalies through a least-squares mascon procedure following Jacob et al. [11], Tiwari et al. [27]

Source code

Calling Sequence

usage: least_squares_mascons.py [-h] [--output-directory OUTPUT_DIRECTORY]
                                [--file-prefix FILE_PREFIX] [--date]
                                [--lmin LMIN] [--lmax LMAX] [--mmax MMAX]
                                [--love {0,1,2,3,4}] [--reference {CF,CM,CE}]
                                [--radius RADIUS] [--destripe]
                                [--format FORMAT] [--mascon-file MASCON_FILE]
                                [--mascon-format {ascii,netCDF4,HDF5}]
                                [--redistribute-mascons] [--fit-method {1,2}]
                                [--solver {inv,lstsq,gelsd,gelsy,gelss}]
                                [--redistribute-mass] [--harmonic-errors]
                                [--mask MASK] [--log] [--verbose]
                                [--mode MODE]
                                infile

Positional Arguments

infile

Input index file with spherical harmonic data files

Named Arguments

--output-directory, -O

Output directory for mascon files

--file-prefix, -P

Prefix string for mascon files

--date, -D

Model harmonics are a time series

--lmin

Minimum spherical harmonic degree

--lmax, -l

Maximum spherical harmonic degree

--mmax, -m

Maximum spherical harmonic order

--love, -n

Possible choices: 0, 1, 2, 3, 4

Treatment of the Load Love numbers

  • 0: Han and Wahr (1995) values from PREM [8]

  • 1: Gegout (2005) values from PREM [6]

  • 2: Wang et al. (2012) values from PREM [30]

  • 3: Wang et al. (2012) values from PREM with hard sediment [30]

  • 4: Wang et al. (2012) values from PREM with soft sediment [30]

--reference

Possible choices: CF, CM, CE

Reference frame for load Love numbers

  • 'CF': Center of Surface Figure

  • 'CM': Center of Mass of Earth System

  • 'CE': Center of Mass of Solid Earth

--radius, -R

Gaussian smoothing radius (km)

--destripe, -d

Use decorrelation (destriping) filter

--format, -F

Possible choices: ascii, netCDF4, HDF5, index-ascii, index-netCDF4, index-HDF5

Input data format

--mascon-file

Index file of mascons spherical harmonics

--mascon-format

Possible choices: ascii, netCDF4, HDF5

Input data format for mascon files

--redistribute-mascons

Redistribute mascon mass over the ocean

--fit-method

Possible choices: 1, 2

Method for fitting sensitivity kernel to harmonics

  • 1: mass coefficients

  • 2: geoid coefficients

--solver, -s

Least squares solver for degree one solutions

  • 'inv': matrix inversion

  • 'lstsq': least squares solution

  • 'gelsy': complete orthogonal factorization solution

  • 'gelss': singular value decomposition (SVD) solution

  • 'gelsd': singular value decomposition (SVD) solution with a divide and conquer method

--redistribute-mass

Redistribute total mass over the ocean

--harmonic-errors

Input spherical harmonic fields are data errors

--mask

Land-sea mask for redistributing mascon mass and land water flux

--log

Output log file for each job

--verbose, -V

Verbose output of processing run

--mode, -M

permissions mode of output files