sh2xyz : Forward calculation of topographic or gravitational data using spherical harmonic coefficients.

22 Nov 2018

Installation

You need to compile the executable file sh2xyz using the makefile. Please change the variable CC in the makefile to the compiler you use. Parallel computing is enable using the -fopenmp flag, delete it if you don’t want the parallel computing.

CC = g++-8 -fopenmp

If you don’t have gcc installed.

brew install gcc
apt-get install gcc

After the gcc is installed. Use make the compile the program. Then move or symlink the executable file sh2xyz to any directory included in your $PATH, for instance, /usr/local/bin.

Usage

sph2xyz -t<table> -r<lonmin>/<lonmax>/<latmin>/<latmax>[/<altitude>] -i<dlon>/<dlat> -d<type> -f<ln>/<lm>/<hn>/<hm> [-p<loc-file>] [-s<refr>/<refR>] [-g<GM>/<R>] [-n<type>] [-c<col1>,<col2>,<col3>,<col4>] [-z<alti-file>[+d<col1>,<col2>,<col3>]] [-h] > out-file

Options

Examples

To forward calculating an example.SHcoeffs which maximal degree/order are both 360.

sh2xyz -t example.SHcoeffs -r -180/180/-90/90/0 -i 0.5/0.5 -f 0/0/360/360 -s 10000/10000 > example.txt

The calculated data is shown as below: sh2xyz example