NAME

     grd2xyz - Converting a grdfile to an ASCII or binary table


SYNOPSIS

     grd2xyz grdfile [ -H ] [ -Rwest/east/south/north[r] [ -S ] [
     -Z ] [ -b[d] ]


DESCRIPTION

     grd2xyz reads a binary  2-D  grdfile  and  writes  out  xyz-
     triplets  in  ASCII  [or  binary] format to standard output.
     The ASCII file can be edited using any text editor.  You can
     modify  the  precision of the ASCII output format by editing
     the D_FORMAT parameter in your .gmtdefaults file, or you may
     choose  binary  output  using  single  or  double  precision
     storage.  As an option you may output the  z-values  without
     the (x,y) pair assuming scanline orientation.

     grdfile
          The 2-D binary file to be converted.


OPTIONS

     -H    Input file(s) has Header record(s).  Number of  header
          records  can  be  changed  by editing your .gmtdefaults
          file.  If used, GMT default is 1 header record.

     -R    west, east, south, and north  specify  the  Region  of
          interest.  To specify boundaries in degrees and minutes
          [and seconds], use the dd:mm[:ss] format.  Append r  if
          lower  left  and  upper right map coordinates are given
          instead of wesn.

     -S    Suppress output for nodes  whose  z-value  equals  NaN
          [Default outputs all nodes].

     -Z    Only write a 1-column ASCII [or  binary]  table  using
          the scanline ordering convention.

     -b    Selects binary output mode [Default is ASCII].  Append
          d for double precision [Default is single].


EXAMPLES

     To edit individual values in the  5'  by  5'  hawaii_grv.grd
     file, try

     grd2xyz hawaii_grv.grd > hawaii_grv.xyz

     To write a single precision  binary  file  without  the  x,y
     positions from the file raw_data.grd file, try

     grd2xyz raw_data.grd -Z -b > hawaii_grv.b



SEE ALSO

     gmtdefaults, gmt, grdedit, xyz2grd


REFERENCES

     Wessel, P., and W. H. F. Smith, 1995,  The  Generic  Mapping
     Tools  (GMT)  version  3.0  Technical  Reference & Cookbook,
     SOEST/NOAA.
     Wessel, P., and W. H. F. Smith, 1995,  New  Version  of  the
     Generic Mapping Tools Released, EOS Trans. AGU, 76, p. 329.
     Wessel, P., and W. H. F. Smith, 1995,  New  Version  of  the
     Generic           Mapping           Tools          Released,
     http://www.agu.org/eos_elec/95154e.html, Copyright  1995  by
     the American Geophysical Union.
     Wessel, P., and W. H. F. Smith, 1991,  Free  Software  Helps
     Map and Display Data, EOS Trans. AGU, 72, p. 441.