1GRDVECTOR(1)                 Generic Mapping Tools                GRDVECTOR(1)
2
3
4

NAME

6       grdvector - Plot vector fields from grid files
7

SYNOPSIS

9       grdvector compx.grd compy.grd -Jparameters [ -A ] [ -B[p|s]parameters ]
10       [ -Ccptfile ] [ -E ] [ -Gfill ] [ -Ixinc[unit][=|+][/yinc[unit][=|+]] ]
11       [   -K   ]   [   -N   ]   [   -O   ]   [   -P  ]  [  -Qparameters  ]  [
12       -Rwest/east/south/north[r]   ]   [   -S[l]scale   ]   [    -T    ]    [
13       -U[just/dx/dy/][c|label] ] [ -V ] [ -Wpen ] [ -X[a|c|r][x-shift[u]] ] [
14       -Y[a|c|r][y-shift[u]] ] [ -Z ] [ -ccopies ] [ -f[i|o]colinfo ]
15

DESCRIPTION

17       grdvector reads two 2-D grid files which represents the x- and y-compo‐
18       nents  of  a  vector  field and produces a vector field plot by drawing
19       vectors with orientation and length according to the information in the
20       files.   Alternatively,  polar  coordinate  components  may be used (r,
21       theta).  grdvector is basically a  short-hand  for  using  2  calls  to
22       grd2xyz and pasting the output through psxy -SV.
23
24       compx.grd
25              Contains the x-component of the vector field.
26
27       compy.grd
28              Contains  the  y-component  of the vector field.  (See GRID FILE
29              FORMATS below.)
30
31       -J     Selects the map projection. Scale is  UNIT/degree,  1:xxxxx,  or
32              width  in  UNIT  (upper case modifier).  UNIT is cm, inch, or m,
33              depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
34              can be overridden on the command line by appending c, i, or m to
35              the scale/width  value.   When  central  meridian  is  optional,
36              default  is  center  of  longitude  range on -R option.  Default
37              standard parallel is the equator.  For map  height,  max  dimen‐
38              sion,  or min dimension, append h, +, or - to the width, respec‐
39              tively.
40              More details can be found in the psbasemap man pages.
41
42              CYLINDRICAL PROJECTIONS:
43
44              -Jclon0/lat0/scale (Cassini)
45              -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
46              -Jj[lon0/]scale (Miller)
47              -Jm[lon0/[lat0/]]scale (Mercator)
48              -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
49              lel)
50              -Jo[a]lon0/lat0/azimuth/scale  (Oblique  Mercator  -  point  and
51              azimuth)
52              -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
53              -Joclon0/lat0/lonp/latp/scale  (Oblique  Mercator  -  point  and
54              pole)
55              -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
56              -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
57              -Juzone/scale (UTM - Universal Transverse Mercator)
58              -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
59
60              CONIC PROJECTIONS:
61
62              -Jblon0/lat0/lat1/lat2/scale (Albers)
63              -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
64              -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
65              -Jpoly/[lon0/[lat0/]]scale ((American) Polyconic)
66
67              AZIMUTHAL PROJECTIONS:
68
69              -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
70              -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
71              -Jflon0/lat0[/horizon]/scale (Gnomonic)
72              -Jglon0/lat0[/horizon]/scale (Orthographic)
73              -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
74              (General Perspective).
75              -Jslon0/lat0[/horizon]/scale (General Stereographic)
76
77              MISCELLANEOUS PROJECTIONS:
78
79              -Jh[lon0/]scale (Hammer)
80              -Ji[lon0/]scale (Sinusoidal)
81              -Jkf[lon0/]scale (Eckert IV)
82              -Jk[s][lon0/]scale (Eckert VI)
83              -Jn[lon0/]scale (Robinson)
84              -Jr[lon0/]scale (Winkel Tripel)
85              -Jv[lon0/]scale (Van der Grinten)
86              -Jw[lon0/]scale (Mollweide)
87
88              NON-GEOGRAPHICAL PROJECTIONS:
89
90              -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
91              -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]]  (Linear,  log,
92              and power scaling)
93

OPTIONS

95       No space between the option flag and the associated arguments.
96
97       -A     Means  grid  files  have  polar (r, theta) components instead of
98              Cartesian (x, y).
99
100       -B     Sets map boundary annotation and  tickmark  intervals;  see  the
101              psbasemap man page for all the details.
102
103       -C     Use cptfile to assign colors based on vector length.
104
105       -E     Center vectors on grid nodes [Default draws from grid node].
106
107       -G     Sets  color  or shade for vector interiors [Default is no fill].
108              (See SPECIFYING FILL below).
109
110       -I     Only plot vectors at nodes every x_inc,  y_inc  apart  (must  be
111              multiples  of original grid spacing).  Append m for minutes or c
112              for seconds. [Default plots every node].
113
114       -K     More PostScript code will be appended later [Default  terminates
115              the plot system].
116
117       -N     Do NOT clip vectors at map boundaries [Default will clip].
118
119       -O     Selects  Overlay  plot mode [Default initializes a new plot sys‐
120              tem].
121
122       -P     Selects Portrait plotting mode [Default is Landscape, see gmtde‐
123              faults to change this].
124
125       -Q     Select vector plot [Default is stick-plot].  Optionally, specify
126              parameters which are arrowwidth/headlength/headwidth [Default is
127              0.075c/0.3c/0.25c  (or  0.03i/0.12i/0.1i)].   Append nsize which
128              will cause vectors shorter than size to  have  their  appearance
129              scaled by length/size.
130
131       -R     xmin,  xmax, ymin, and ymax specify the Region of interest.  For
132              geographic regions,  these  limits  correspond  to  west,  east,
133              south,  and north and you may specify them in decimal degrees or
134              in [+-]dd:mm[:ss.xxx][W|E|S|N] format.  Append r if  lower  left
135              and  upper  right  map coordinates are given instead of w/e/s/n.
136              The two shorthands -Rg and -Rd stand for  global  domain  (0/360
137              and  -180/+180  in longitude respectively, with -90/+90 in lati‐
138              tude).  Alternatively, specify the name of an existing grid file
139              and the -R settings (and grid spacing, if applicable) are copied
140              from the grid.  For calendar time  coordinates  you  may  either
141              give  (a) relative time (relative to the selected TIME_EPOCH and
142              in the selected TIME_UNIT; append t to -JX|x), or  (b)  absolute
143              time  of  the form [date]T[clock] (append T to -JX|x).  At least
144              one of date and clock must be present; the T is always required.
145              The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
146              calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
147              string  must  be  of the form hh:mm:ss[.xxx].  The use of delim‐
148              iters and their type and positions must be exactly as  indicated
149              (however,  input,  output and plot formats are customizable; see
150              gmtdefaults).  Specify a subset of the grid.
151
152       -S     Sets scale for vector length in data units per distance measure‐
153              ment  unit  [1].   Append c, i, m, p to indicate the measurement
154              unit (cm, inch, m, point).  Prepend l to indicate a fixed length
155              for all vectors.
156
157       -T     Means  azimuth  should  be  converted  to  angles  based  on the
158              selected map projection.
159
160       -U     Draw Unix System time stamp on plot.  By adding just/dx/dy/, the
161              user  may  specify  the justification of the stamp and where the
162              stamp should fall on the page relative to lower left  corner  of
163              the  plot.  For example, BL/0/0 will align the lower left corner
164              of the time stamp with  the  lower  left  corner  of  the  plot.
165              Optionally,  append  a  label, or c (which will plot the command
166              string.).  The  GMT  parameters  UNIX_TIME,  UNIX_TIME_POS,  and
167              UNIX_TIME_FORMAT  can affect the appearance; see the gmtdefaults
168              man page for details.  The time string will be in the locale set
169              by the environment variable TZ (generally local time).
170
171       -V     Selects verbose mode, which will send progress reports to stderr
172              [Default runs "silently"].
173
174       -W     Set pen attributes used for vector outlines  [Default:  width  =
175              0.25p,  color  =  black, texture = solid].  (See SPECIFYING PENS
176              below).
177
178       -X -Y  Shift plot origin relative to the current origin by  (x-shift,y-
179              shift)  and optionally append the length unit (c, i, m, p).  You
180              can prepend a to shift the origin back to the original  position
181              after  plotting,  or  prepend   r [Default] to reset the current
182              origin to the new location.  If -O is used then the default  (x-
183              shift,y-shift)  is  (0,0), otherwise it is (r1i, r1i) or (r2.5c,
184              r2.5c).  Alternatively, give c to align the center coordinate (x
185              or  y)  of the plot with the center of the page based on current
186              page size.
187
188       -Z     Means the angles provided are  azimuths  rather  than  direction
189              (requires -A).
190
191       -c     Specifies the number of plot copies. [Default is 1].
192
193       -f     Special  formatting of input and/or output columns (time or geo‐
194              graphical data).  Specify i or o to  make  this  apply  only  to
195              input  or  output  [Default  applies to both].  Give one or more
196              columns (or column ranges) separated by commas.  Append T (abso‐
197              lute  calendar time), t (relative time in chosen TIME_UNIT since
198              TIME_EPOCH), x (longitude), y (latitude), or f (floating  point)
199              to  each  column or column range item.  Shorthand -f[i|o]g means
200              -f[i|o]0x,1y (geographic coordinates).
201
202   SPECIFYING PENS
203       pen    The attributes of lines and symbol outlines as defined by pen is
204              a  comma  delimetered  list of width, color and texture, each of
205              which is optional.  width can be indicated as a measure (points,
206              centimeters, inches) or as faint, thin[ner|nest], thick[er|est],
207              fat[ter|test], or obese.  color specifies a gray shade or  color
208              (see  SPECIFYING  COLOR  below).   texture  is  a combination of
209              dashes `-' and dots `.'.
210
211   SPECIFYING FILL
212       fill   The attribute fill specifies the solid shade or solid color (see
213              SPECIFYING  COLOR  below)  or the pattern used for filling poly‐
214              gons.  Patterns are specified  as  pdpi/pattern,  where  pattern
215              gives the number of the built-in pattern (1-90) or the name of a
216              Sun 1-, 8-, or 24-bit raster file. The dpi sets  the  resolution
217              of  the  image.  For 1-bit rasters: use Pdpi/pattern for inverse
218              video, or append :Fcolor[B[color]] to specify  fore-  and  back‐
219              ground  colors  (use color = - for transparency).  See GMT Cook‐
220              book & Technical Reference Appendix E for information  on  indi‐
221              vidual patterns.
222
223   SPECIFYING COLOR
224       color  The  color  of  lines,  areas and patterns can be specified by a
225              valid color name; by a gray shade (in the  range  0-255);  by  a
226              decimal  color  code  (r/g/b, each in range 0-255; h-s-v, ranges
227              0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by  a  hexa‐
228              decimal  color code (#rrggbb, as used in HTML).  See the gmtcol‐
229              ors manpage for more information and a full list of color names.
230

GRID FILE FORMATS

232       GMT is able to recognize many of the commonly used grid  file  formats,
233       as  well  as the precision, scale and offset of the values contained in
234       the grid file. When GMT needs a little help with that, you can add  the
235       suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of
236       the grid type and precision, and scale and offset  are  optional  scale
237       factor  and  offset  to  be  applied to all grid values, and nan is the
238       value used to indicate missing data.  See  grdreformat(1)  and  Section
239       4.17 of the GMT Technical Reference and Cookbook for more information.
240
241       When reading a netCDF file that contains multiple grids, GMT will read,
242       by default, the first 2-dimensional grid that can find in that file. To
243       coax  GMT  into  reading another multi-dimensional variable in the grid
244       file, append ?varname to the file name, where varname is  the  name  of
245       the variable. Note that you may need to escape the special meaning of ?
246       in your shell program by putting a backslash in  front  of  it,  or  by
247       placing  the  filename and suffix between quotes or double quotes.  See
248       grdreformat(1) and Section 4.18 of  the  GMT  Technical  Reference  and
249       Cookbook  for  more information, particularly on how to read splices of
250       3-, 4-, or 5-dimensional grids.
251

EXAMPLES

253       To draw the vector field given by the files r.grd and  theta.grd  on  a
254       linear  plot  with  scale  5 cm per data unit, using vector rather than
255       stick plot, and scale vector magnitudes so that 10 units equal 1  inch,
256       run
257
258       grdvector r.grd theta.grd -Jx5c -A -Q -S10i > gradient.ps
259
260

SEE ALSO

262       GMT(1), gmtcolors(5), grdcontour(1), psxy(1)
263
264
265
266GMT 4.5.6                         10 Mar 2011                     GRDVECTOR(1)
Impressum