	$Id: README.mgg,v 1.1.1.1 2000/12/28 01:23:45 gmt Exp $

README file for GMT supplemental mgg programs

AUTHORS:	Paul Wessel and Walter H. F. Smith
DATE:		15-MAR-1999
INSTALL INFO:	The mgg directory should install under GMT3.2/src

	These programs are intended for use with the marine geophysical
data base files known as GMT-files.  These GMT-files are written using
a native binary data format.  These data files are NOT supplied with
GMT, but we provide you with a program (mgd77togmt) that allows you to
create your own GMT-files from the MGD-77 standard exchange format files
provided by the National Geophysical Data Center*.  The following is a
list of the programs and a short description of what they do:

	dat2gmt		Convert an ASCII listing to a binary .gmt file
	gmt2dat		Convert a binary .gmt file to ASCII listing
	gmtinfo		Information about selected cruises
	gmtlegs		Find cruises in a given area
	gmtlist		A data extractor for .gmt files
	gmtpath		Get full pathname for .gmt files
	gmttrack	Plot .gmt file tracklines on maps
	mgd77togmt	Convert a MGD-77 file to gmtfile format

In addition, two "system-level" programs are supplied that creates and
maintains the indexfiles needed by most of the above programs:

	binlegs		Add info about new gmtfiles to the index files
	gmt2bin		Create bin-index files from gmtfiles (for binlegs)

man-files for all the above programs can be found in the manl subdirectory.

The support files carter.d and gmtfile_paths are put in the 
GMT3.2/lib/mgg subdirectory directory.

The ASCII file carter.d is used to convert two-way travel-time to
depth using the Carter correction tables.
The gmtfile_paths file gives lists of directories where the *.gmt
datafile will be stored.

To install these programs, simply type

	make install

Uses must have the environmental variable GMTHOME set which they
are likely to have if they are using GMT.

You may copy the manl/*.man files to /usr/man/manl/*.l if you wish.

The gmtfiles are unformatted, binary, direct access files with a
fixed record length of 18 bytes.  Each file has one header record
and one or more data records.  The compact file format makes these
files fast to read.  This is the structure of the files (number in 
parentheses indicates size of elements and records in bytes):

The first (header) record (18):

long int (4)	year		Year of first data point in file
long int (4)	nrecords	Number of data records to follow
char[10] (10)	info		Currently holds the leg id, e.g. c2104

Data records (18):

long int (4)	time		Seconds since 00:00:00 1-Jan-year
long int (4)	latitude	Stored in micro degrees
long int (4)	longitude	Stored in micro degrees
short int (2)	grav		FAA, in mGal * 10 (g.u.), on 1980 ellipsoid
short int (2)	mag		Regional anomaly in nTesla
short int (2)	top		Carter corrected topography in m

NB! If a particular data field is empty, the value is set to -32000.
Note that these files are not portable across platforms unless you take
care of swabbing data to account for big- and little-endian problems.

* Available on CD-ROM from NGDC (contact rrw@mail.ngdc.noaa.gov).
