1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<HTML>
<HEAD>
<TITLE>grdsample</TITLE>
</HEAD>
<BODY>
<H1>grdsample</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
grdsample - Resample a grd file onto a new grid
</PRE>
<H2>SYNOPSIS</H2><PRE>
<B>grdsample</B> <I>in</I><B>_</B><I>grdfile</I> <B>-G</B><I>out</I><B>_</B><I>grdfile</I> [ <B>-F</B> ] [
<B>-I</B><I>dx</I>[<B>m|c</B>][/<I>dy</I>[<B>m|c</B>]] ] [ <B>-L</B><I>flag</I> ] [ <B>-N</B><I>nx/ny</I> ] [ <B>-Q</B> ] [
<B>-R</B><I>west/east/south/north</I>[<B>r</B>] ] [ <B>-T</B> ] [ <B>-V</B> ]
</PRE>
<H2>DESCRIPTION</H2><PRE>
<B>grdsample</B> reads a grdfile and interpolates it to create a
new grdfile with either: a different registration (<B>-T</B>);
or, a new grid-spacing (<B>-I</B>) or number of nodes (<B>-N</B>), and
perhaps also a new sub-region (<B>-R</B>). Interpolation is bicu
bic [Default] or bilinear (<B>-Q</B>) and uses boundary condi
tions (<B>-L</B>). Note that using (<B>-R</B>) only is equivalent to
<B><A HREF="grdcut.html">grdcut</A></B> or <B><A HREF="grdedit.html">grdedit</A></B> <B>-S</B>. <B>grdsample</B> safely creates a fine mesh
from a coarse one; the converse may suffer aliasing unless
the data are filtered using <B><A HREF="grdfft.html">grdfft</A></B> or <B><A HREF="grdfilter.html">grdfilter</A></B>.
<I>in</I><B>_</B><I>grdfile</I>
The name of the input 2-D binary grd file.
<B>-G</B> The name of the output grd file.
</PRE>
<H2>OPTIONS</H2><PRE>
No space between the option flag and the associated argu
ments.
<B>-F</B> Force pixel registration. [Default is grid regis
tration].
<B>-I</B> <I>x</I><B>_</B><I>inc</I> [and optionally <I>y</I><B>_</B><I>inc</I>] is the grid spacing.
Append <B>m</B> to indicate minutes or <B>c</B> to indicate sec
onds.
<B>-L</B> Boundary condition <I>flag</I> may be <I>x</I> or <I>y</I> or <I>xy</I> indi
cating data is periodic in range of x or y or both
set by <B>-R</B>, or <I>flag</I> may be <I>g</I> indicating geographical
conditions (x and y are lon and lat). [Default uses
"natural" conditions (second partial derivative
normal to edge is zero).]
<B>-Q</B> Quick mode, use bilinear rather than bicubic inter
polation.
<B>-R</B> <I>west,</I> <I>east,</I> <I>south,</I> and <I>north</I> specify the Region of
interest. To specify boundaries in degrees and min
utes [and seconds], use the dd:mm[:ss] format.
Append <B>r</B> if lower left and upper right map coordi
nates are given instead of wesn.
<B>-T</B> Translate between grid and pixel registration while
keeping <B>-R</B> and <B>-I</B> the same; if input is grid-regis
no other options are necessary (except possibly <B>-L</B>
or <B>-Q</B>).
<B>-V</B> Selects verbose mode, which will send progress
reports to stderr [Default runs "silently"].
</PRE>
<H2>HINTS</H2><PRE>
If an interpolation point is not on a node of the input
grid, then a NaN at any node in the neighborhood surround
ing the point will yield an interpolated NaN. Bicubic
interpolation [default] yields continuous first deriva
tives but requires a neighborhood of 4 nodes by 4 nodes.
Bilinear interpolation [<B>-Q</B>] uses only a 2 by 2 neighbor
hood, but yields only zeroth-order continuity. Use bicubic
when smoothness is important. Use bilinear to minimize the
propagation of NaNs.
</PRE>
<H2>EXAMPLES</H2><PRE>
To resample the 5 x 5 minute grid in hawaii_5by5_topo.grd
onto a 1 minute grid, try
grdsample hawaii_5by5_topo.grd <B>-I</B>1<B>m</B> <B>-G</B>hawaii_1by1_topo.grd
To translate the gridline-registered file surface.grd to
pixel registration, try
grdsample surface.grd <B>-T</B> <B>-G</B>pixel.grd
</PRE>
<H2>SEE ALSO</H2><PRE>
<I>gmt</I>(l), <I><A HREF="grdedit.html">grdedit</A></I>(l), <I><A HREF="grdfft.html">grdfft</A></I>(l), <I><A HREF="grdfilter.html">grdfilter</A></I>(l)
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
<body bgcolor="#ffffff">
|