File: node65.html

package info (click to toggle)
gmt-doc 3.4-1.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,756 kB
  • ctags: 1,800
  • sloc: makefile: 30
file content (214 lines) | stat: -rw-r--r-- 7,423 bytes parent folder | download | duplicates (2)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>3.2.3 Preprocessing</TITLE>
<META NAME="description" CONTENT="3.2.3 Preprocessing">
<META NAME="keywords" CONTENT="tutorial">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="tutorial.css">

<LINK REL="previous" HREF="node64.html">
<LINK REL="up" HREF="node61.html">
<LINK REL="next" HREF="node66.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html1343"
  HREF="node66.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> 
<A NAME="tex2html1337"
  HREF="node61.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> 
<A NAME="tex2html1333"
  HREF="node64.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> 
<A NAME="tex2html1339"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A> 
<A NAME="tex2html1341"
  HREF="node79.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1344"
  HREF="node66.html">3.3 Exercises</A>
<B> Up:</B> <A NAME="tex2html1338"
  HREF="node61.html">3.2 Gridding of arbitrarily</A>
<B> Previous:</B> <A NAME="tex2html1334"
  HREF="node64.html">3.2.2 Gridding with Splines</A>
 &nbsp <B>  <A NAME="tex2html1340"
  HREF="node1.html">Contents</A></B> 
 &nbsp <B>  <A NAME="tex2html1342"
  HREF="node79.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION00523000000000000000">
3.2.3 Preprocessing</A>
</H2>

<P>
The <A NAME="tex2html223"
  HREF="../surface.html"><I><B>surface</B></I></A><A NAME="3026"></A> program assumes that the data have been
preprocessed to eliminate aliasing, hence we must ensure that
this step is completed prior to gridding.  <A NAME="tex2html224"
  HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> comes with
three preprocessors, called <A NAME="tex2html225"
  HREF="../blockmean.html"><I><B>blockmean</B></I></A><A NAME="3038"></A>, <A NAME="tex2html226"
  HREF="../blockmedian.html"><I><B>blockmedian</B></I></A><A NAME="3047"></A>,
and <A NAME="tex2html227"
  HREF="../blockmode.html"><I><B>blockmode</B></I></A><A NAME="3056"></A>.  The first averages values inside the
grid-spacing boxes, the second returns median values, wile the
latter returns modal values.  As a rule of thumb, we use means for
most smooth data (such as potential fields) and medians (or modes)
for rough, non-Gaussian data (such as topography).  In addition
to the required <B>-R</B> and <B>-I</B> switches, these preprocessors
takes the same options:

<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1348"></A>
<TABLE>
<CAPTION><STRONG>Table 3.4:</STRONG>
Some of the preprocessing options</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><FONT SIZE="-1">
<I>Option</I></FONT></TD>
<TD ALIGN="CENTER" COLSPAN=1><FONT SIZE="-1"> <I>Purpose</I></FONT></TD>
</TR>
<TR><TD ALIGN="LEFT"><FONT SIZE="-1">   
</FONT><FONT SIZE="-1"><B>-N</B> </FONT></TD>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Choose pixel registration [Default is gridline] </FONT></TD>
</TR>
<TR><TD ALIGN="LEFT"><FONT SIZE="-1">  
</FONT><FONT SIZE="-1"><B>-W</B>[</FONT><FONT SIZE="-1"><B>i</B><IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img1.gif"
 ALT="$\vert$"></FONT><FONT SIZE="-1"><B>o</B>] </FONT></TD>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Append </FONT><FONT SIZE="-1"><B>i</B> or </FONT><FONT SIZE="-1"><B>o</B> to read or write weights in the 4th column </FONT></TD>
</TR>
</TABLE><FONT SIZE="-1">

<A NAME="tbl:preprocess"></A></FONT></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
With respect to our ship data we preprocess it using the median method:

<P>
<PRE>
blockmedian -R245/255/20/30 -I5m -V ship.xyz &gt;! ship_5m.xyz
</PRE> 

<P>
The output data can now be used with surface:

<P>
<PRE>
surface ship_5m.xyz -R245/255/20/30 -I5m -Gship.grd -V
</PRE> 

<P>
If you rerun <A NAME="tex2html228"
  HREF="../grdcontour.html"><I><B>grdcontour</B></I></A><A NAME="3069"></A> on the new grid file (try it!)
you will notice a big difference compared to the grid made by
<A NAME="tex2html229"
  HREF="../nearneighbor.html"><I><B>nearneighbor</B></I></A><A NAME="3078"></A>: since <A NAME="tex2html230"
  HREF="../surface.html"><I><B>surface</B></I></A><A NAME="3087"></A> is a global method
it will evaluate the solution at all nodes, even if there are no
data constraints.  There are numerous options available to us at
this point:

<P>

<OL>
<LI>We can reset all nodes too far from a data constraint to the
NaN value.

<P>
</LI>
<LI>We can pour white paint over those regions where contours
are unreliable.

<P>
</LI>
<LI>We can plot the landmass which will cover most (but not all)
of the unconstrained areas.

<P>
</LI>
<LI>We can set up a clip path so that only the contours in the
constrained region will show.

<P>
</LI>
</OL>

<P>
Here we have only time to explore the latter approach.  The <A NAME="tex2html231"
  HREF="../psmask.html"><I><B>psmask</B></I></A><A NAME="3096"></A>
program can read the same preprocessed data and set up a contour mask
based on the data distribution.  Once the clip path is activated we can
contour the final grid; we finally deactivate the clipping with a second
call to <A NAME="tex2html232"
  HREF="../psmask.html"><I><B>psmask</B></I></A><A NAME="3105"></A>.  Here's the recipe:

<P>
<PRE>
psmask -R245/255/20/30 -I5m ship_5m.xyz -JM6i -B2 -P -K -V &gt;! map.ps
grdcontour ship.grd -JM -O -K -C250 -A1000 &gt;&gt; map.ps
psmask -C -O &gt;&gt; map.ps
</PRE>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1343"
  HREF="node66.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> 
<A NAME="tex2html1337"
  HREF="node61.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> 
<A NAME="tex2html1333"
  HREF="node64.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> 
<A NAME="tex2html1339"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A> 
<A NAME="tex2html1341"
  HREF="node79.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1344"
  HREF="node66.html">3.3 Exercises</A>
<B> Up:</B> <A NAME="tex2html1338"
  HREF="node61.html">3.2 Gridding of arbitrarily</A>
<B> Previous:</B> <A NAME="tex2html1334"
  HREF="node64.html">3.2.2 Gridding with Splines</A>
 &nbsp <B>  <A NAME="tex2html1340"
  HREF="node1.html">Contents</A></B> 
 &nbsp <B>  <A NAME="tex2html1342"
  HREF="node79.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>