GEOPOT07 takes a Spherical Harmonic Model (SHM) of the Earth's Exterior Gravitational Potential, as well as a few other required pieces of information, and yields various quantities of the gravity field (potential, gravity, geop-spherop separations, gradients) on points or grids. It also performs a few other useful computations, all based on an SHM.
A paper describing the subtleties of the program can be found in the IGeS Bulletin #8 as: Smith, D.A., 1998: There is no such thing as 'the' EGM96 geoid: subtle points on the use of a global geopotential model. IGeS Bulletin N.8, International Geoid Service, Milan, 1998, 17-28.
This is a subroutine, not a complete program. It returns the analytical solution of the integral:
This equation arises in solving certain prism attraction problems. A paper which addresses those problems is: Smith, D.A., 2000: The gravitational attraction of any polygonally shaped vertical prism with inclined top and bottom faces, accepted for publication in Journal of Geodesy