Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > fa8759c1f2240ce030f5ac6d5041a2a1 > files > 356

GMT-doc-4.5.9-1.fc18.noarch.rpm

<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Wed Jan  2 08:39:35 2013 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title>BLOCKMEDIAN</title>

</head>
<body bgcolor="#ffffff">

<h1 align=center>BLOCKMEDIAN</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#ASCII FORMAT PRECISION">ASCII FORMAT PRECISION</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<a name="NAME"></a>
<h2>NAME</h2>


<p style="margin-left:11%; margin-top: 1em">blockmedian
&minus; filter to block average (<i>x,y,z</i>) data by L1
norm.</p>

<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>



<p style="margin-left:11%; margin-top: 1em"><b>blockmedian</b>
[ <i>xyz[w]file(s)</i> ]
<b>&minus;I</b><i>xinc</i>[<i>unit</i>][<b>=</b>|<b>+</b>][/<i>yinc</i>[<i>unit</i>][<b>=</b>|<b>+</b>]]
<b>&minus;R</b><i>xmin</i>/<i>xmax</i>/<i>ymin</i>/<i>ymax</i>[<b>r</b>]
[ <b>&minus;C</b> ] [ <b>&minus;E</b>[<b>b</b>] ] [
<b>&minus;F</b> ] [ <b>&minus;H</b>[<b>i</b>][<i>nrec</i>] ]
[ <b>&minus;Q</b> ] [ <b>&minus;T</b><i>quantile</i> ] [
<b>&minus;V</b> ] [ <b>&minus;W</b>[<b>io</b>] ] [
<b>&minus;:</b>[<b>i</b>|<b>o</b>] ] [
<b>&minus;b</b>[<b>i</b>|<b>o</b>][<b>s</b>|<b>S</b>|<b>d</b>|<b>D</b>[<i>ncol</i>]|<b>c</b>[<i>var1</i><b>/</b><i>...</i>]]
] [ <b>&minus;f</b>[<b>i</b>|<b>o</b>]<i>colinfo</i> ]</p>

<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>



<p style="margin-left:11%; margin-top: 1em"><b>blockmedian</b>
reads arbitrarily located (<i>x,y,z</i>) triples [or
optionally weighted quadruples (<i>x,y,z,w</i>)] from
standard input [or <i>xyz[w]file(s)</i>] and writes to
standard output a median position and value for every
non-empty block in a grid region defined by the
<b>&minus;R</b> and <b>&minus;I</b> arguments. Either
<b><A HREF="blockmean.html">blockmean</A></b>, <b>blockmedian</b>, or <b><A HREF="blockmode.html">blockmode</A></b>
should be used as a pre-processor before running
<b><A HREF="surface.html">surface</A></b> to avoid aliasing short wavelengths. These
routines are also generally useful for decimating or
averaging (<i>x,y,z</i>) data. You can modify the precision
of the output format by editing the <b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b>
parameter in your .gmtdefaults4 file, or you may choose
binary input and/or output using single or double precision
storage. <i><br>
xyz[w]file(s)</i></p>

<p style="margin-left:22%;">3 [or 4] column ASCII file(s)
[or binary, see <b>&minus;b</b>] holding
(<i>x,y,z</i>[,<i>w</i>]) data values. [<i>w</i>] is an
optional weight for the data. If no file is specified,
<b>blockmedian</b> will read from standard input.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;I</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top"><i>x_inc</i> [and
optionally <i>y_inc</i>] is the grid spacing. Optionally,
append a suffix modifier. <b>Geographical (degrees)
coordinates</b>: Append <b>m</b> to indicate arc minutes or
<b>c</b> to indicate arc seconds. If one of the units
<b>e</b>, <b>k</b>, <b>i</b>, or <b>n</b> is appended
instead, the increment is assumed to be given in meter, km,
miles, or nautical miles, respectively, and will be
converted to the equivalent degrees longitude at the middle
latitude of the region (the conversion depends on
<b><A HREF="gmtdefaults.html#ELLIPSOID">ELLIPSOID</A></b>). If /<i>y_inc</i> is given but set to 0 it
will be reset equal to <i>x_inc</i>; otherwise it will be
converted to degrees latitude. <b>All coordinates</b>: If
<b>=</b> is appended then the corresponding max <i>x</i>
(<i>east</i>) or <i>y</i> (<i>north</i>) may be slightly
adjusted to fit exactly the given increment [by default the
increment may be adjusted slightly to fit the given domain].
Finally, instead of giving an increment you may specify the
<i>number of nodes</i> desired by appending <b>+</b> to the
supplied integer argument; the increment is then
recalculated from the number of nodes and the domain. The
resulting increment value depends on whether you have
selected a gridline-registered or pixel-registered grid; see
Appendix B for details. Note: if
<b>&minus;R</b><i>grdfile</i> is used then grid spacing has
already been initialized; use <b>&minus;I</b> to override
the values.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;R</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top"><i>xmin</i>,
<i>xmax</i>, <i>ymin</i>, and <i>ymax</i> specify the Region
of interest. For geographic regions, these limits correspond
to <i>west, east, south,</i> and <i>north</i> and you may
specify them in decimal degrees or in
[+-]dd:mm[:ss.xxx][W|E|S|N] format. Append <b>r</b> if lower
left and upper right map coordinates are given instead of
w/e/s/n. The two shorthands <b>&minus;Rg</b> and
<b>&minus;Rd</b> stand for global domain (0/360 and
-180/+180 in longitude respectively, with -90/+90 in
latitude). Alternatively, specify the name of an existing
grid file and the <b>&minus;R</b> settings (and grid
spacing, if applicable) are copied from the grid. For
calendar time coordinates you may either give (a) relative
time (relative to the selected <b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b> and in the
selected <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b>; append <b>t</b> to
<b>&minus;JX</b>|<b>x</b>), or (b) absolute time of the form
[<i>date</i>]<b>T</b>[<i>clock</i>] (append <b>T</b> to
<b>&minus;JX</b>|<b>x</b>). At least one of <i>date</i> and
<i>clock</i> must be present; the <b>T</b> is always
required. The <i>date</i> string must be of the form
[-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]]
(ISO week calendar), while the <i>clock</i> string must be
of the form hh:mm:ss[.xxx]. The use of delimiters and their
type and positions must be exactly as indicated (however,
input, output and plot formats are customizable; see
<b><A HREF="gmtdefaults.html">gmtdefaults</A></b>).</p> </td>
</table>

<a name="OPTIONS"></a>
<h2>OPTIONS</h2>


<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;C</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Use the center of
the block as the output location [Default uses the median x
and median y as location (but see <b>&minus;Q</b>)]..</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;E</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Provide Extended
report which includes <b>s</b> (the L1 scale of the median),
<b>l</b>, the lowest value, and <b>h</b>, the high value for
each block. Output order becomes
<i>x,y,z,s,l,h</i>[,<i>w</i>]. [Default outputs
<i>x,y,z</i>[,<i>w</i>]. For box-and-whisker calculation,
use <b>&minus;Eb</b> which will output
<i>x,y,z,l,q25,q75,h</i>[,<i>w</i>], where <i>q25</i> and
<i>q75</i> are the 25% and 75% quantiles, respectively. See
<b>&minus;W</b> for <i>w</i> output.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;F</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Force pixel node
registration [Default is gridline registration]. (Node
registrations are defined in <b><A HREF="GMT.html">GMT</A></b> Cookbook Appendix B
on grid file formats.) Each block is the locus of points
nearest the grid value location. For example, with
<b>&minus;R</b>10/15/10/15 and and <b>&minus;I</b>1: with
the <b>&minus;F</b> option 10 &lt;= (<i>x,y</i>) &lt; 11 is
one of 25 blocks; without it 9.5 &lt;= (<i>x,y</i>) &lt;
10.5 is one of 36 blocks.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;H</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Input file(s) has
header record(s). If used, the default number of header
records is <b><A HREF="gmtdefaults.html#N_HEADER_RECS">N_HEADER_RECS</A></b>. Use <b>&minus;Hi</b> if
only input data should have header records [Default will
write out header records if the input data have them]. Blank
lines and lines starting with # are always skipped. Not used
with binary data.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;Q</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">(Quicker) Finds
median <i>z</i> and (<i>x, y</i>) at that the median
<i>z</i> [Default finds median <i>x</i>, median <i>y</i>
independent of <i>z</i>]. Also see <b>&minus;C</b>.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;T</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Sets the
<i>quantile</i> of the distribution to be returned [Default
is 0.5 which returns the median <i>z</i>]. Here, 0 &lt;
<i>quantile</i> &lt; 1.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;V</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects verbose
mode, which will send progress reports to stderr [Default
runs &quot;silently&quot;].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;W</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Weighted
modifier[s]. Unweighted input and output has 3 columns
<i>x,y,z</i>; Weighted i/o has 4 columns <i>x,y,z,w</i>.
Weights can be used in input to construct weighted mean
values in blocks. Weight sums can be reported in output for
later combining several runs, etc. Use <b>&minus;W</b> for
weighted i/o, <b>&minus;Wi</b> for weighted inputonly,
<b>&minus;Wo</b> for weighted output only. [Default uses
unweighted i/o].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;:</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Toggles between
(longitude,latitude) and (latitude,longitude) input and/or
output. [Default is (longitude,latitude)]. Append <b>i</b>
to select input only or <b>o</b> to select output only.
[Default affects both].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;bi</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects binary
input. Append <b>s</b> for single precision [Default is
<b>d</b> (double)]. Uppercase <b>S</b> or <b>D</b> will
force byte-swapping. Optionally, append <i>ncol</i>, the
number of columns in your binary input file if it exceeds
the columns needed by the program. Or append <b>c</b> if the
input file is netCDF. Optionally, append
<i>var1</i><b>/</b><i>var2</i><b>/</b><i>...</i> to specify
the variables to be read. [Default is 3 (or 4 if
<b>&minus;Wi</b> is set)].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;bo</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects binary
output. Append <b>s</b> for single precision [Default is
<b>d</b> (double)]. Uppercase <b>S</b> or <b>D</b> will
force byte-swapping. Optionally, append <i>ncol</i>, the
number of desired columns in your binary output file.
[Default is 3 (or 4 if <b>&minus;Wo</b> is set)].
<b>&minus;E</b> adds 3 additional columns.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;f</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Special formatting
of input and/or output columns (time or geographical data).
Specify <b>i</b> or <b>o</b> to make this apply only to
input or output [Default applies to both]. Give one or more
columns (or column ranges) separated by commas. Append
<b>T</b> (absolute calendar time), <b>t</b> (relative time
in chosen <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b> since <b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b>),
<b>x</b> (longitude), <b>y</b> (latitude), or <b>f</b>
(floating point) to each column or column range item.
Shorthand <b>&minus;f</b>[<b>i</b>|<b>o</b>]<b>g</b> means
<b>&minus;f</b>[<b>i</b>|<b>o</b>]0<b>x</b>,1<b>y</b>
(geographic coordinates).</p></td>
</table>

<a name="ASCII FORMAT PRECISION"></a>
<h2>ASCII FORMAT PRECISION</h2>


<p style="margin-left:11%; margin-top: 1em">The ASCII
output formats of numerical data are controlled by
parameters in your .gmtdefaults4 file. Longitude and
latitude are formatted according to
<b><A HREF="gmtdefaults.html#OUTPUT_DEGREE_FORMAT">OUTPUT_DEGREE_FORMAT</A></b>, whereas other values are
formatted according to <b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b>. Be aware that the
format in effect can lead to loss of precision in the
output, which can lead to various problems downstream. If
you find the output is not written with enough precision,
consider switching to binary output (<b>&minus;bo</b> if
available) or specify more decimals using the
<b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b> setting.</p>

<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>


<p style="margin-left:11%; margin-top: 1em">To find 5 by 5
minute block medians from the double precision binary data
in hawaii_b.xyg and output an ASCII table, run</p>


<p style="margin-left:11%; margin-top: 1em"><b>blockmedian</b>
hawaii_b.xyg <b>&minus;R</b>198/208/18/25
<b>&minus;I</b>5<b>m &minus;bi</b>3 &gt; hawaii_5x5.xyg</p>

<p style="margin-left:11%; margin-top: 1em">To compute the
shape of a data distribution per bin via a box-and-whisker
diagram we need the 0%, 25%, 50%, 75%, and 100% quantiles.
To do so on a global 5 by 5 degree basis from the ASCII
table depths.xyz and send output to an ASCII table, run</p>


<p style="margin-left:11%; margin-top: 1em"><b>blockmedian</b>
depths.xyz <b>&minus;Rg &minus;I</b>5 <b>&minus;F
&minus;Eb</b> &gt; depths_5x5.txt</p>

<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>



<p style="margin-left:11%; margin-top: 1em"><i><A HREF="blockmean.html">blockmean</A></i>(1),
<i><A HREF="blockmode.html">blockmode</A></i>(1), <i><A HREF="GMT.html">GMT</A></i>(1), <i><A HREF="gmtdefaults.html">gmtdefaults</A></i>(1),
<i><A HREF="nearneighbor.html">nearneighbor</A></i>(1), <i><A HREF="surface.html">surface</A></i>(1),
<i><A HREF="triangulate.html">triangulate</A></i>(1)</p>
<hr>
</body>
</html>