File: grdreformat.html

package info (click to toggle)
gmt-doc 3.4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,756 kB
  • ctags: 1,800
  • sloc: makefile: 30
file content (130 lines) | stat: -rw-r--r-- 4,382 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
<HTML>
<HEAD>
<TITLE>grdreformat</TITLE>
</HEAD>
<BODY>
<H1>grdreformat</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
       grdreformat  -  Converting  between different grdfile for
       mats.


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>grdreformat</B> <I>ingrdfile</I>[<I>=id</I>[<I>/scale/offset</I>[<I>/nanvalue</I>]]]  <I>out</I>
       <I>grdfile</I>[<I>=id</I>[<I>/scale/offset</I>[<I>/nanvalue</I>]]]                   [
       <B>-R</B><I>west/east/south/north</I>[<B>r</B>] ] [ <B>-V</B> ]


</PRE>
<H2>DESCRIPTION</H2><PRE>
       <B>grdreformat</B> reads a grdfile in one format  and  writes  it
       out using another format. As an option the user may select
       a subset of the data to be written and to specify scaling,
       translation, and nan-value.

       <I>ingrdfile</I>
              The grdfile to be read. Append format =<I>id</I> number if
              not a standard GMT netcdf-based grdfile.  If <I>id</I>  is
              set,  you may optionally append <I>scale</I> and <I>offset</I> to
              scale the data and then add an offset. If <I>scale</I> and
              <I>offset</I>  are  supplied  you  may also append a value
              that represent 'not-a-number'  (for  floating-point
              grids  this  is  unneccesary  since the IEEE NaN is
              used; however short integers  need  a  value  which
              means no data available.)

       <I>outgrdfile</I>
              The grdfile to be written. Append format =<I>id</I> number
              if not a standard GMT netcdf-based grdfile.  If  <I>id</I>
              is  set, you may optionally append <I>scale</I> and <I>offset</I>
              to scale the data and then add an offset. If  <I>scale</I>
              and <I>offset</I> are supplied you may also append a value
              that represent 'not-a-number'  (for  floating-point
              grids  this  is  unneccesary  since the IEEE NaN is
              used; however short integers  need  a  value  which
              means  no  data available.)  For format =<I>id</I> &gt; 0 the
              size of the GMT grdheader  block  is  <I>hsize</I>  =  896
              bytes, and the total size of the file is <I>hsize</I> <I>+</I> <I>nx</I>
              <I>*</I> <I>ny</I> <I>*</I> <I>item</I><B>_</B><I>size</I>, where item_size <I>is</I>  <I>the</I>  <I>size</I>  <I>in</I>
              <I>bytes</I>  <I>of</I>  <I>each</I>  <I>element</I>  <I>(1,</I>  <I>2,</I> <I>4).</I> <I>Bit</I> <I>grids</I> <I>are</I>
              <I>stored</I> <I>using</I> <I>4-byte</I> <I>integers,</I> <I>each</I> <I>holding</I> <I>32</I> <I>bits,</I>
              <I>so</I> <I>for</I> <I>these</I> <I>files</I> <I>the</I> <I>size</I> <I>equation</I> <I>is</I> <I>modified</I> <I>by</I>
              <I>using</I> <I>ceil</I> <I>(nx</I> <I>/</I> <I>32)</I> <I>*</I> <I>4</I> <I>instead</I> <I>of</I> <I>nx.</I> <I>For</I>  <I>header</I>
              <I>and</I> <I>grid</I> <I>details,</I> <I>see</I> <I>Appendix</I> <I>B.</I>


</PRE>
<H2>OPTIONS</H2><PRE>
       <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>-V</B>     Selects  verbose  mode,  which  will  send progress
       To create a 4-byte raw floating point grid from the netcdf
       file data.grd, try

       grdreformat data.grd ras_data.b4=1 <B>-V</B>

       To  make a 2-byte short integer file, scale it by 10, sub
       tract 32000, setting NaNs to -9999, do

       grdreformat values.grd shorts.i2=2/10/-32000/-9999 <B>-V</B>

       To create a Sun standard 8-bit rasterfile for a subset  of
       the  data  file image.grd, assuming the range in image.grd
       is 0-1 and we need 0-255, try

       grdreformat image.grd <B>-R</B>-60/-40/-40/-30 image.ras8=3/255/0
       <B>-V</B>


</PRE>
<H2>SEE ALSO</H2><PRE>
       <I>gmt</I>(l), <I><A HREF="grdmath.html">grdmath</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">