convert_harmonics.py

  • Converts a file from the spatial domain into the spherical harmonic domain [73]

Source code

Calling Sequence

usage: convert_harmonics.py [-h] [--lmax LMAX] [--mmax MMAX]
                            [--love {0,1,2,3,4}] [--reference {CF,CM,CE}]
                            [--units {1,2,3}] [--spacing dlon [dlat ...]]
                            [--interval {1,2}] [--fill-value FILL_VALUE]
                            [--header HEADER] [--format {ascii,netCDF4,HDF5}]
                            [--date] [--verbose] [--mode MODE]
                            [infile] [outfile]

Positional Arguments

infile

Input spatial file

outfile

Output harmonic file

Named Arguments

--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 [23]

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

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

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

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

--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

--units, -U

Possible choices: 1, 2, 3

Input units of spatial fields

  • 1: cm of water thickness (cm.w.e., g/cm2)

  • 2: Gigatonnes (Gt)

  • 3: mm of water thickness (kg/m2)

--spacing, -S

Spatial resolution of input data

--interval, -I

Possible choices: 1, 2

Input grid interval (1: global, 2: centered global)

  • 1: (0:360, 90:-90)

  • 2: (degree spacing/2)

--fill-value, -f

Set fill_value for input spatial fields

--header

Number of header rows to skip in input ascii files

--format, -F

Possible choices: ascii, netCDF4, HDF5

Input and output data format

--date, -D

Input and output files have date information

--verbose, -V

Verbose output of run

--mode, -M

Permissions mode of output files