Forward modeling of gravitational fields in spherical coordinates.
Tesseroids is a collection of command-line tools for modeling the gravitational potential, acceleration, and gradient (Marussi) tensor.
The mass models can be made of right rectangular prisms or tesseroids (spherical prisms). Computation for rectangular prisms can be made in Cartesian or spherical (geocentric) coordinates.
Tesseroids is research software made by scientists. If you use it in your research, please cite our Geophysics paper in your publications:
Uieda, L., V. Barbosa, and C. Braitenberg (2016), Tesseroids: Forward-modeling gravitational fields in spherical coordinates, GEOPHYSICS, F41-F48, doi:10.1190/geo2015-0204.1.
The easiest way to install is to download the latest compiled binary distribution from:
We offer binaries for Windows (32 and 64 bit) and GNU/Linux (32 and 64 bit).
Once downloaded, simply unpack the archive in the desired directory.
The executables will be in the
For easier access to the programs, consider
adding the bin folder to your PATH environment
Take a look at the examples in the Cookbook. They contain scripts that run Tesseroids and some Python code to plot the results.
Also, all programs accept the
-h flag to print the instructions for using
that particular program. For example:
$ tessgrd -h Usage: tessgrd [PARAMS] [OPTIONS] Make a regular grid of points. All units either SI or degrees! Output: Printed to standard output (stdout) in the format: lon1 lat1 height lon2 lat1 height ... ... ... lonNLON lat1 height lon1 lat2 height ... ... ... ... ... ... lonNLON latNLAT height * Comments about the provenance of the data are inserted into the top of the output Parameters: -r W/E/S/N: Bounding region of the grid. -b NLON/NLAT: Number of grid points in the longitudinal and latitudinal directions. -z HEIGHT: Height of the grid with respect to the mean Earth radius. -h Print instructions. --version Print version and license information. Options: -v Enable verbose printing to stderr. -lFILENAME Print log messages to file FILENAME. Part of the Tesseroids package. Project site: <http://fatiando.org/software/tesseroids> Report bugs at: <http://code.google.com/p/tesseroids/issues/list>
Compiling from source
If you want to build Tesseroids from source, you'll need:
Setting up SCons
Tesseroids uses the build tool SCons.
SConstruct file (
is used to define the compilation rules.
The advantage of SCons over Make is that it automatically detects your system
You will have to download and install SCons
in order to easily compile Tesseroids.
SCons is available for both GNU/Linux and Windows
so compiling should work the same on both platforms.
Under Windows you will have to put SCons on
PATH environment variable
in order to use it from the command line.
It is usually located in the
Scripts directory of your Python installation.
On GNU/Linux, SCons will generally use the GCC compiler to compile sources. On Windows it will search for an existing compiler. We recommend that you install GCC on Windows using MinGW.
Download a source distribution and
unpack the archive anywhere you want
C:\tesseroids or whatever).
open a terminal (or
cmd.exe on Windows)
and go to the directory where you unpacked (use the
Then, type the following and hit
If everything goes well, the compiled executables will be placed on a
To clean up the build (delete all generated files), run:
If you get any strange errors or the code doesn't compile for some reason,
please submit a bug report.
Don't forget to copy the output of running
Testing the build
After the compilation,
a program called
will be placed in the directory where you unpacked the source.
This program runs the unit tests
for Tesseroids (sources in the
To run the test suite, simply execute
tesstest with no arguments:
or on GNU/Linux:
A summary of all tests (pass or fail) will be printed on the screen.
If all tests pass,
the compilation probably went well.
If any test fail,
please submit a bug report
with the output of running