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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
|
<!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>B.2.1 File contents</TITLE>
<META NAME="description" CONTENT="B.2.1 File contents">
<META NAME="keywords" CONTENT="GMT_Docs">
<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="GMT_Docs.css">
<LINK REL="next" HREF="node115.html">
<LINK REL="previous" HREF="node113.html">
<LINK REL="up" HREF="node113.html">
<LINK REL="next" HREF="node115.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html2650"
HREF="node115.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2644"
HREF="node113.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2638"
HREF="node113.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2646"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2648"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2651"
HREF="node115.html">B.2.2 Grid line and</A>
<B> Up:</B> <A NAME="tex2html2645"
HREF="node113.html">B.2 2-D grdfiles</A>
<B> Previous:</B> <A NAME="tex2html2639"
HREF="node113.html">B.2 2-D grdfiles</A>
  <B> <A NAME="tex2html2647"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2649"
HREF="node149.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION001721000000000000000"></A>
<A NAME="13178"></A>
<BR>
B.2.1 File contents
</H2>
<P>
The default 2-D binary netCDF grdfile in <A NAME="tex2html577"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> has several attributes.
The <A NAME="tex2html578"
HREF="../grdedit.html"><I><B>grdedit</B></I></A><A NAME="13471"></A> utility program will allow you to edit parts of
the header of an existing grdfile. The attributes listed in Table <A HREF="node114.html#tbl:grdheader">B.1</A>
are contained within the header record in the order given (except the <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-array which
is not part of the header structure, but makes up the rest of the file).
<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="13231"></A>
<TABLE>
<CAPTION><STRONG>Table B.1:</STRONG>
<A NAME="tex2html574"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> gridded file header record</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><I>Parameter</I></TD>
<TD ALIGN="CENTER" COLSPAN=1><I>Description</I></TD>
</TR>
<TR><TD ALIGN="LEFT"><B>int</B> <I>nx</I></TD>
<TD ALIGN="LEFT">Number of nodes in the <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img1.gif"
ALT="$x$">-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>int</B> <I>ny</I></TD>
<TD ALIGN="LEFT">Number of nodes in the y-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>int</B> <I>node_offset</I></TD>
<TD ALIGN="LEFT">0 for grid line registration, 1 for pixel registration</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>x_min</I></TD>
<TD ALIGN="LEFT">Minimum <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img1.gif"
ALT="$x$">-value of region</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>x_max</I></TD>
<TD ALIGN="LEFT">Maximum <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img1.gif"
ALT="$x$">-value of region</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>y_min</I></TD>
<TD ALIGN="LEFT">Minimum <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img18.gif"
ALT="$y$">-value of region</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>y_max</I></TD>
<TD ALIGN="LEFT">Maximum <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img18.gif"
ALT="$y$">-value of region</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>z_min</I></TD>
<TD ALIGN="LEFT">Minimum <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-value in data set</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>z_max</I></TD>
<TD ALIGN="LEFT">Maximum <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-value in data set</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>x_inc</I></TD>
<TD ALIGN="LEFT">Node spacing in <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img1.gif"
ALT="$x$">-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>y_inc</I></TD>
<TD ALIGN="LEFT">Node spacing in <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img18.gif"
ALT="$y$">-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>z_scale_factor</I></TD>
<TD ALIGN="LEFT">Factor to multiply <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-values after read</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>double</B> <I>z_add_offset</I></TD>
<TD ALIGN="LEFT">Offset to add to scaled <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-values</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>char</B> <I>x_units</I>[80]</TD>
<TD ALIGN="LEFT">Units of the <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img1.gif"
ALT="$x$">-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>char</B> <I>y_units</I>[80]</TD>
<TD ALIGN="LEFT">Units of the <IMG
WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img18.gif"
ALT="$y$">-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>char</B> <I>z_units</I>[80]</TD>
<TD ALIGN="LEFT">Units of the <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-dimension</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>char</B> <I>title</I>[80]</TD>
<TD ALIGN="LEFT">Descriptive title of the data set</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>char</B> <I>command</I>[320]</TD>
<TD ALIGN="LEFT">Command line that produced the grdfile</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>char</B> <I>remark</I>[160]</TD>
<TD ALIGN="LEFT">Any additional comments</TD>
</TR>
<TR><TD ALIGN="LEFT"><B>float</B> <I>z</I>[nx*ny]</TD>
<TD ALIGN="LEFT">1-D array with <IMG
WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img17.gif"
ALT="$z$">-values in scanline format</TD>
</TR>
</TABLE>
</DIV>
<P>
<DIV ALIGN="CENTER">
<A NAME="tbl:grdheader"></A></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>
<P>
<A NAME="13234"></A>
<P>
<A NAME="tex2html579"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> version 3 also allows other formats to be read. In addition to
the default netCDF format it can use binary floating points, short
integers, bytes, and bits, as well as 8-bit Sun rasterfiles (colormap
ignored). Additional formats may be used by supplying read/write
functions and linking these with the <A NAME="tex2html580"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> libraries.
The source file <U>gmt_customio.c</U> has the information that
programmers will need to augment <A NAME="tex2html581"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> to read custom grdfiles. We
anticipate that the number of pre-programmed formats will increase as
enterprising users implement what they need.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2650"
HREF="node115.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2644"
HREF="node113.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2638"
HREF="node113.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2646"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2648"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2651"
HREF="node115.html">B.2.2 Grid line and</A>
<B> Up:</B> <A NAME="tex2html2645"
HREF="node113.html">B.2 2-D grdfiles</A>
<B> Previous:</B> <A NAME="tex2html2639"
HREF="node113.html">B.2 2-D grdfiles</A>
  <B> <A NAME="tex2html2647"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2649"
HREF="node149.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>
|