NAME

       gmtconvert  -  Converts, Pastes, and/or Extracts columns from ASCII and
       binary 1-D tables


SYNOPSIS

       gmtconvert [ inputfiles] [ -A ] [ -E ] [-FfIcolsfP ] [ -H[nrec] ] [  -L
       ] [ -I ] [ -M[flag] ] [ -S"search string" ] [ -V ] [ -: ] [ -bi[s]n ] [
       -bo[s][n] ] [ -f[i|o]colinfo ]


DESCRIPTION

       gmtconvert reads its standard input [or inputfiles] and writes out  the
       desired  information  to  standard  output.  It can do a combination of
       three things: (1) convert between binary and  ASCII  data  tables,  (2)
       paste corresponding records from multiple files into a single file, (3)
       extract a subset of the columns, (4) only extract segments whose header
       matches  a  text pattern search, (5) just list all multisegment headers
       and no data records, and (6) extract first and  last  data  record  for
       each  segment. Input (and hence output) may have multiple subheaders if
       -M is selected, and ascii tables may have regular headers as well.

       datafile(s)
              ASCII (or binary, see -bi) file(s)  holding  a  number  of  data
              columns.


OPTIONS

       -A     The  records from the input files should be paSted horizontally,
              not appended vertically. [Default  processes  one  file  at  the
              time].  Note  for  binary input, all the files you want to paste
              must have the same number of columns (as set with -bi).   TP  -E
              Only  extract  the  first  and  last  record for each segment of
              interest [Default extracts all records].

       -F     Give a comma-separated list of desired columns or ranges  (0  is
              first column) [Default outputs all columns].

       -H     Input file(s) has Header record(s). Number of header records can
              be changed by editing your  .gmtdefaults4  file.  If  used,  GMT
              default  is  1  header record. Use -Hi if only input data should
              have header records [Default will write out  header  records  if
              the input data have them].

       -I     Invert  the  order  of  rows,  i.e., output the final records in
              reverse order, starting with the last and  ending  up  with  the
              first input row [Default goes forward].

       -L     Only  output a listing of all multisegment header records and no
              data records (requires -M and ascii data).

       -M     Multiple segment file(s). Segments are separated  by  a  special
              record.   For  ASCII  files  the  first  character  must be flag
              [Default is ’>’].  For binary files all fields must be  NaN  and
              -bo[s]n must set the number of output columns explicitly.

       -S     Only  output  those  segments  whose  header record contains the
              specified text string [Default output all segments].

       -V     Selects verbose mode, which will send progress reports to stderr
              [Default runs "silently"].

       -:     Toggles  between  (longitude,latitude)  and (latitude,longitude)
              input and/or output. [Default is (longitude,latitude)].   Append
              i  to  select  input  only  or o to select output only. [Default
              affects both].

       -bi    Selects binary input. Append s for single precision [Default  is
              double].   Append  n  for  the  number  of columns in the binary
              file(s).

       -bo    Selects binary output. Append s for single precision [Default is
              double].   Append  n  for  the  number  of columns in the binary
              file(s).

       -f     Special formatting of input and output  columns  (time  or  geo-
              graphical  data)  Specify  i(nput)  or o(utput) [Default is both
              input and output].  Give one or more columns (or column  ranges)
              separated by commas.  Append T (Absolute calendar time), t (time
              relative to chosen TIME_EPOCH), x (longitude), y  (latitude),  g
              (geographic coordinate), or f (floating point) to each column or
              column range item.


EXAMPLES

       To convert the binary file test.b (single precision) with 4 columns  to
       ASCII:

       gmtconvert test.b -bis4 > test.dat

       To  convert  the multiple segment ASCII table test.d to a double preci-
       sion binary file:

       gmtconvert test.d -M -bo > test.b

       You have an ASCII table with 6 columns and you want to  plot  column  5
       versus column 0. Try

       gmtconvert table.d -F5,0 | psxy ...

       If  the  file  instead is the binary file results.b which has 9 single-
       precision values per record, we extract the last column and columns 4-6
       and write ASCII with the command

       gmtconvert results.b -F8,4-6 -bi9s | psxy ...

       You  want  to  plot  the 2nd column of the file left.d versus the first
       column of file right.d:

       gmtconvert left.d right.d -S -F1,2 | psxy ...
       To extract all segments in the file big_file.d  whose  headers  contain
       the string "RIDGE AXIS", try

       gmtconvert big_file.d -S"RIDGE AXIS" > subset.d


SEE ALSO

       gmt(l), minmax(l)



GMT4.0                            1 Oct 2004                     GMTCONVERT(l)

Man(1) output converted with man2html