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 gridded files which represents the  x-  and  y-
18       components  of a vector field and produces a vector field plot by draw‐
19       ing vectors with orientation and length according to the information in
20       the  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
66              AZIMUTHAL PROJECTIONS:
67
68              -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
69              -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
70              -Jflon0/lat0[/horizon]/scale (Gnomonic)
71              -Jglon0/lat0[/horizon]/scale (Orthographic)
72              -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
73              (General Perspective).
74              -Jslon0/lat0[/horizon][/slat]/scale (General Stereographic)
75
76              MISCELLANEOUS PROJECTIONS:
77
78              -Jh[lon0/]scale (Hammer)
79              -Ji[lon0/]scale (Sinusoidal)
80              -Jkf[lon0/]scale (Eckert IV)
81              -Jk[s][lon0/]scale (Eckert IV)
82              -Jn[lon0/]scale (Robinson)
83              -Jr[lon0/]scale (Winkel Tripel)
84              -Jv[lon0/]scale (Van der Grinten)
85              -Jw[lon0/]scale (Mollweide)
86
87              NON-GEOGRAPHICAL PROJECTIONS:
88
89              -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
90              -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]]  (Linear,  log,
91              and power scaling)
92

OPTIONS

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

GRID FILE FORMATS

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

EXAMPLES

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

SEE ALSO

258       GMT(1), grdcontour(1), psxy(1)
259
260
261
262GMT 4.3.1                         15 May 2008                     GRDVECTOR(1)
Impressum