.TH GRDTRACK l DATE
.SH NAME
grdtrack \- Sampling of a 2-D grdfile along 1-D trackline
.SH SYNOPSIS
\fBgrdtrack\fP \fIxyfile\fP \fB\-G\fP\fIgrdfile\fP [ \fB\-H\fP ] [ \fB\-L\fP ] [ \fB\-M\fP[\fIflag\fP] ] [ \fB\-Q\fP ] [ \fB\-V\fP ] [ \fB\-:\fP ]
.SH DESCRIPTION
\fBgrdtrack\fP reads a 2-D binary grdfile and an ASCII table (from file or standard input)
with (x,y) positions in the first two columns (more columns may be present). It then samples the
gridded data set at the positions in
the ASCII file and outputs the ASCII file with the sampled values added as a new column. 
A bicubic [Default] or bilinear interpolation is used to sample the grid.  Free
boundary conditions are assumed (curvature and 3rd normal derivative is zero).
.TP
\fIxyfile\fP
This is an ASCII file where the first 2 columns hold the (x,y) positions where the user wants to sample
the 2-D data set.
.TP
.B \-G
\fIgrdfile\fP is a 2-D binary grd file with the function f(x,y).
.SH OPTIONS
No space between the option flag and the associated arguments.
#include "explain_-H.txt"
.TP
.B \-L
Indicates that the x column contains longitudes, which may differ from the region
specified in \fIgrdfile\fP by [multiples of] 360 degrees [Default assumes no periodicity].
.TP
.B \-M
Multiple segment file.  Segments are separated by a record whose first character is \fI<flag>\fP.
[Default is '>'].
.TP
.B \-Q
Quick mode.  Use bilinear rather than bicubic interpolation.
#include "explain_-V.txt"
.TP
.B \-:
Toggles between (longitude,latitude) and (latitude,longitude) input/output.  [Default is (longitude,latitude)]
.SH EXAMPLES
To sample the file hawaii_topo.grd along the SEASAT track track_4.xyg (An ASCII
table containing longitude, latitude, and SEASAT-derived gravity, preceeded by one header record), try
.br
.sp
grdtrack track_4.xyg \fB\-G\fPhawaii_topo.grd \fB\-H\fP > track_4.xygt
.SH BUGS
All the peripheral nodes needed to evaluate the interpolation must be real in order to
return a sampled value.  If any of these are NaN then NaN is returned.
.SH SEE ALSO
gmt, surface, sample1d
#include "refs.i"
