1GRDVECTOR(1)                          GMT                         GRDVECTOR(1)
2
3
4

NAME

6       grdvector - Plot vector field from two component grids
7

SYNOPSIS

9       grdvector compx.nc compy.nc -Jparameters [  -A ] [  -B[p|s]parameters ]
10       [  -Ccpt ] [  -Gfill ] [  -I[x]dx[/dy] ] [  -K ] [  -N ] [  -O ] [   -P
11       ]  [   -Qparameters  ]  [   -Rregion  ]  [   -S[i|l]scale  ]  [  -T ] [
12       -U[stamp] ] [  -Wpen ] [  -Xx_offset ]  [   -Yy_offset  ]  [   -Z  ]  [
13       -fflags ] [ -pflags ] [ -ttransp ]
14
15       Note:  No  space  is allowed between the option flag and the associated
16       arguments.
17

DESCRIPTION

19       grdvector reads two 2-D grid files which represents the x- and y-compo‐
20       nents  of  a  vector  field and produces a vector field plot by drawing
21       vectors with orientation and length according to the information in the
22       files.  Alternatively,  polar  coordinate  r,  theta grids may be given
23       instead.
24

REQUIRED ARGUMENTS

26       compx.nc
27              Contains the x-components of the vector field.
28
29       compy.nc
30              Contains the y-components of the vector field.  (See  GRID  FILE
31              FORMATS below.)
32
33       -Jparameters (more ...)
34              Select map projection.
35

OPTIONAL ARGUMENTS

37       -A     The  grid  files  contain polar (r, theta) components instead of
38              Cartesian (x, y) [Default is Cartesian components].
39
40       -B[p|s]parameters (more ...)
41              Set map boundary frame and axes attributes.
42
43       -C[cpt]
44              Use cpt to assign colors based on vector length.  Alternatively,
45              supply  the  name of a GMT color master dynamic CPT [rainbow] to
46              automatically  determine  a  continuous  CPT  from  the   grid's
47              z-range.  If the dynamic CPT has a default range then that range
48              will be imposed instead.   Yet  another  option  is  to  specify
49              -Ccolor1,color2[,color3,...]   to  build a linear continuous cpt
50              from those colors automatically.  In this case colorn can  be  a
51              r/g/b  triplet, a color name, or an HTML hexadecimal color (e.g.
52              #aabbcc ).
53
54       -Gfill Sets color or shade for vector interiors [Default is no fill].
55
56       -I[x]dx[/dy]
57              Only plot vectors at nodes every x_inc,  y_inc  apart  (must  be
58              multiples of original grid spacing). Append m for arc minutes or
59              s for arc seconds.  Alternatively, use -Ix to specify the multi‐
60              ples multx[/multy] directly [Default plots every node].
61
62       -K (more ...)
63              Do not finalize the PostScript plot.
64
65       -N     Do NOT clip vectors at map boundaries [Default will clip].
66
67       -O (more ...)
68              Append to existing PostScript plot.
69
70       -P (more ...)
71              Select "Portrait" plot orientation.
72
73       -Qparameters
74              Modify  vector  parameters. For vector heads, append vector head
75              size [Default is 0, i.e., stick-plot]. See VECTOR ATTRIBUTES for
76              specifying additional attributes.
77
78       -Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
79              Specify the region of interest. Specify a subset of the grid.
80
81       -S[i|l]scale
82              Sets  scale  for  Cartesian vector length in data units per dis‐
83              tance measurement unit [1]. Append c, i, or p  to  indicate  the
84              measurement  unit  (cm,  inch,or point). Prepend l to indicate a
85              fixed length for all vectors.  For Geographic data,  give  scale
86              in  data  units  per  km.  Use  -Si if it is simpler to give the
87              reciprocal scale in measurement unit per data  unit  or  km  per
88              data unit.
89
90       -T     Means  the  azimuths  of  Cartesian data sets should be adjusted
91              according to the signs of the scales in the x- and  y-directions
92              [Leave  alone].   This  option  can  be  used  to convert vector
93              azimuths in cases when a negative scale is used in one  of  both
94              directions (e.g., positive down).
95
96       -U[[just]/dx/dy/][c|label] (more ...)
97              Draw GMT time stamp logo on plot.
98
99       -V[level] (more ...)
100              Select verbosity level [c].
101
102       -Wpen  Set  pen  attributes  used for vector outlines [Default: width =
103              default, color = black, style = solid].
104
105       -X[a|c|f|r][x-shift[u]]
106
107       -Y[a|c|f|r][y-shift[u]] (more ...)
108              Shift plot origin.
109
110       -Z     The theta grid provided contains azimuths rather than directions
111              (implies -A).
112
113       -f[i|o]colinfo (more ...)
114              Specify data types of input and/or output columns.
115
116       -p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
117              Select perspective view.
118
119       -t[transp] (more ...)
120              Set PDF transparency level in percent.
121
122       -^ or just -
123              Print  a  short  message  about  the syntax of the command, then
124              exits (NOTE: on Windows just use -).
125
126       -+ or just +
127              Print an extensive usage (help) message, including the  explana‐
128              tion  of  any  module-specific  option  (but  not the GMT common
129              options), then exits.
130
131       -? or no arguments
132              Print a complete usage (help) message, including the explanation
133              of all options, then exits.
134

GRID FILE FORMATS

136       By  default  GMT  writes  out  grid  as  single  precision  floats in a
137       COARDS-complaint netCDF file format. However, GMT is  able  to  produce
138       grid  files  in  many  other  commonly  used grid file formats and also
139       facilitates so called "packing" of grids, writing  out  floating  point
140       data as 1- or 2-byte integers. (more ...)
141

VECTOR ATTRIBUTES

143       Several  modifiers  may  be appended to the vector-producing options to
144       specify the placement of vector heads, their shapes, and the justifica‐
145       tion  of  the  vector.  Below, left and right refers to the side of the
146       vector line when viewed from the start point to the end  point  of  the
147       segment:
148          +aangle sets the angle of the vector head apex [30].
149
150          +b  places a vector head at the beginning of the vector path [none].
151          Optionally, append t for a terminal line, c  for  a  circle,  a  for
152          arrow  [Default],  i  for  tail,  A for plain arrow, and I for plain
153          tail.  Further append l|r to only draw the left  or  right  side  of
154          this head [both sides].
155
156          +e  places  a  vector  head  at  the  end of the vector path [none].
157          Optionally, append t for a terminal line, c  for  a  circle,  a  for
158          arrow  [Default],  i  for  tail,  A for plain arrow, and I for plain
159          tail.  Further append l|r to only draw the left  or  right  side  of
160          this head [both sides].
161
162          +g-|fill  turns  off vector head fill (if -) or sets the vector head
163          fill [Default fill is used, which may be no fill].
164
165          +hshape sets the shape of the vector head (range -2/2).  Default  is
166          controlled by MAP_VECTOR_SHAPE [0].
167
168          +l  draws  half-arrows,  using only the left side of specified heads
169          [both sides].
170
171          +m places a vector head at the mid-point  the  vector  path  [none].
172          Append  f  or r for forward or reverse direction of the vector [for‐
173          ward].  Optionally, append t for a terminal line, c for a circle, or
174          a  for  arrow  head  [Default].  Further append l|r to only draw the
175          left or right side of this head [both sides].   Cannot  be  combined
176          with +b or +e.
177
178          +nnorm scales down vector attributes (pen thickness, head size) with
179          decreasing length, where vectors shorter than norm will  have  their
180          attributes scaled by length/norm [arrow attributes remains invariant
181          to length].
182
183          +oplon/plat specifies the oblique pole for the great or  small  cir‐
184          cles.  Only needed for great circles if +q is given.
185
186          +p[-][pen]  sets  the  vector pen attributes. If pen has a leading -
187          then the head outline is not drawn. [Default pen is used,  and  head
188          outline is drawn]
189
190          +q  means  the  input angle, length data instead represent the start
191          and stop opening angles of the arc segment  relative  to  the  given
192          point.
193
194          +r  draws  half-arrows, using only the right side of specified heads
195          [both sides].
196
197          +t[b|e]trim will shift the beginning or end point  (or  both)  along
198          the  vector  segment by the given trim; append suitable unit. If the
199          modifiers b|e are not used then trim may be two values separated  by
200          a  slash, which is used to specify different trims for the two ends.
201          Positive trims will shorted the vector  while  negative  trims  will
202          lengthen it [no trim].
203
204       In addition, all but circular vectors may take these modifiers:
205          +jjust  determines  how  the  input x,y point relates to the vector.
206          Choose from beginning [default], end, or center.
207
208          +s means the input angle, length are instead the x, y coordinates of
209          the vector end point.
210
211       Finally, Cartesian vectors may take these modifiers:
212          +zscale[unit]  expects  input  dx,dy  vector components and uses the
213          scale to convert to polar coordinates with length in given unit.
214

EXAMPLES

216       To draw the vector field given by the files r.nc and theta.nc on a lin‐
217       ear  plot with scale 5 cm per data unit, using vector rather than stick
218       plot, scale vector magnitudes so that 10 units equal 1 inch, and center
219       vectors on the node locations, run
220
221              gmt grdvector r.nc theta.nc -Jx5c -A -Q0.1i+e+jc -S10i > gradient.ps
222
223       To  plot a geographic data sets given the files com_x.nc and comp_y.nc,
224       using a scale of 200 km per data unit and only plot every 3rd  node  in
225       either direction, try
226
227              gmt grdvector comp_x.nc comp_y.nc -Ix3 -JH0/20c -Q0.1i+e+jc -S200 > globe.ps
228

SEE ALSO

230       gmt, gmtcolors, grdcontour, psxy
231
233       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
234
235
236
237
2385.4.5                            Feb 24, 2019                     GRDVECTOR(1)
Impressum