Ignore everything below this for now.

The files below are MATLAB programs to calculate spherical harmonics.

The program spharm.m calculates a single spherical harmonic function.

The program spharm_example.m shows how to use spharm.m.

The functions schmit.f and schmit.m calculate the Schmidt-normalized harmonics. They are mostly useful if you want to use FORTRAN or want to see how they are calculated, because it is easier in MATLAB to use the built-in LEGENDRE function. The program runschmit.f shows how to call schmit.m.

The four files below are used to calculate the geoid heights or gravity anomalies based on the EGM96 gravity field. EGM96 is a gravity field model complete to degree and order 360 developed jointly by NASA and NIMA.

Filename Description
geoidheight.m Calculates geoid heights from EGM model, complete to selected degree
gravanom_harmonic.m Calculates gravity anomalies from EGM model, complete to selected degree
readEGM96.m Reads coefficients for EGM model from file (see next item)
egm96_to360.ascii File with coefficients for EGM model