NAME
grdsample - Resample a grd file onto a new grid
SYNOPSIS
grdsample in_grdfile - Gout_grdfile [ - F ] [ -
Idx[m|c][/dy[m|c]] ] [ - L ] [ - Nnx/ny ] [ -Q ] [ -
Rwest/east/south/north[r] ] [ -T ] [ -V ]
DESCRIPTION
grdsample reads a 2-D binary grd file and resamples it on a
new grid specified by either a new number of nodes or a new
grid-spacing. A sub-region may also be selected. A bicubic
[Default] or bilinear interpolation is used to sample the
grid. Free boundary conditions are assumed (curvature and
3rd normal derivative is zero). grdsample is mostly used to
resample a grid onto a finer grid. Going the other way will
introduce aliasing and is better done using grdfft or
grdfilter.
in_grdfile
The name of the input 2-D binary grd file.
-G The name of the output grd file.
OPTIONS
No space between the option flag and the associated argu-
ments.
-F Force pixel registration. [Default is grid registra-
tion].
-I x_inc [and optionally y_inc] is the grid spacing.
Append m to indicate minutes or c to indicate seconds.
-L Indicates that the input grdfile is a geographical
grid.
-Q Quick mode, use bilinear rather than bicubic interpo-
lation.
-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.
-T Translates between pixel registration and gridline
registration. If input data is gridline registered,
then output will be a pixel grid, and vice versa. The
input file's -R and -I are used so no other options are
necessary (except possibly -Q).
-V Selects verbose mode, which will send progress reports
to stderr [Default runs "silently"].
EXAMPLES
To resample the 5 x 5 minute grid in hawaii_5by5_topo.grd
onto a 1 minute grid, try
grdsample hawaii_5by5_topo.grd -I1m -Ghawaii_1by1_topo.grd
To translate the gridline-registered file surface.grd to
pixel registration, try
grdsample surface.grd -T -Gpixel.grd
SEE ALSO
gmt, grdfft, grdfilter
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.