## SYNOPSIS

**grdvector**

*compx.grd*

*compy.grd*

**-J**

*parameters*[

**-A**] [

**-B**

*tickinfo*] [

**-C**

*cptfile*] [

**-E**] [

**-G**

*fill*] [

**-I**

*x_inc*[

**m|c**][/

*y_inc*[

**m|c**]] ] [

**-K**] [

**-N**] [

**-O**] [

**-P**] [

**-Q**

*parameters*] [

**-R**

*west/east/south/north*[

**r**] ] [

**-S**[

**l**]

*scale*] [

**-T**] [

**-U**[

*/dx/dy/*][

*label*] ] [

**-V**] [

**-W**

*contourpen*] [

**-X**

*x-shift*] [

**-Y**

*y-shift*] [

**-Z**] [

**-c**

*copies*]

## DESCRIPTION

**grdvector**reads two 2-D gridded files which represents the x- and y-components of a vector field and produces a vector field plot by drawing vectors with orientation and length according to the information in the files. Alternatively, polar coordinate components may be used (r, theta).

**grdvector**is basically a short-hand for using 2 calls to

**grd2xyz**and pasting the output through

**psxy -SV**.

*compx.grd*- Contains the x-component of the vector field.
*compy.grd*- Contains the y-component of the vector field.
**-J**-
Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier).
UNIT is cm, inch, or m, depending on the MEASURE_UNIT setting in .gmtdefaults, but this can be
overridden on the command line by appending the c, i, or m to the scale/width value.

**CYLINDRICAL PROJECTIONS:**

**-Jc***lon0/lat0/scale*(Cassini)

**-Jj***lon0/scale*(Miller)

**-Jm***scale*(Mercator - Greenwich and Equator as origin)

**-Jm***lon0/lat0/scale*(Mercator - Give meridian and standard parallel)

**-Joa***lon0/lat0/azimuth/scale*(Oblique Mercator - point and azimuth)

**-Job***lon0/lat0/lon1/lat1/scale*(Oblique Mercator - two points)

**-Joc***lon0/lat0/lonp/latp/scale*(Oblique Mercator - point and pole)

**-Jq***lon0/scale*(Equidistant Cylindrical Projection (Plate Carree))

**-Jt***lon0/scale*(TM - Transverse Mercator, with Equator as y = 0)

**-Jt***lon0/lat0/scale*(TM - Transverse Mercator, set origin)

**-Ju***zone/scale*(UTM - Universal Transverse Mercator)

**-Jy***lon0/lats/scale*(Basic Cylindrical Projection)

**AZIMUTHAL PROJECTIONS:**

**-Ja***lon0/lat0/scale*(Lambert).

**-Je***lon0/lat0/scale*(Equidistant).

**-Jf***lon0/lat0/horizon/scale*(Gnomonic).

**-Jg***lon0/lat0/scale*(Orthographic).

**-Js***lon0/lat0/*[*slat/*]*scale*(General Stereographic)

**CONIC PROJECTIONS:**

**-Jb***lon0/lat0/lat1/lat2/scale*(Albers)

**-Jd***lon0/lat0/lat1/lat2/scale*(Equidistant)

**-Jl***lon0/lat0/lat1/lat2/scale*(Lambert)

**MISCELLANEOUS PROJECTIONS:**

**-Jh***lon0/scale*(Hammer)

**-Ji***lon0/scale*(Sinusoidal)

**-Jk**[**f|s**]*lon0/scale*(Eckert IV (f) and VI (s))

**-Jn***lon0/scale*(Robinson)

**-Jr***lon0/scale*(Winkel Tripel)

**-Jv***lon0/scale*(Van der Grinten)

**-Jw***lon0/scale*(Mollweide)

**NON-GEOGRAPHICAL PROJECTIONS:**

**-Jp**[**a**]*scale*[*/origin*] (polar (theta,r) coordinates, optional**a**for azimuths and offset theta [0])

**-Jx***x-scale*[**l|p***pow*][*/y-scale*[**l|p***pow*]] (Linear, log, and power scaling)

More details can be found in the**psbasemap**manpages.

## OPTIONS

No space between the option flag and the associated arguments.**-A**- Means grdfiles have polar (r, theta) components instead of Cartesian (x, y).
**-B**-
Sets map boundary tickmark intervals. See
**psbasemap**for details. **-C**-
Use
*cptfile*to assign colors based on vector length. **-E**- Center vectors on grid nodes [Default draws from grid node].
**-G**- Sets color or shade for vector interiors [Default is no fill]. Specify the shade (0-255) or color (r/g/b, each in 0-255).
**-I**-
Only plot vectors at nodes every
*x_inc, y_inc*apart (must be multiples of original grid spacing). Append**m**for minutes or**c**for seconds. [Default plots every node]. **-K**-
More
*PostScript*code will be appended later [Default terminates the plot system]. **-N**- Do NOT clip vectors at map boundaries [Default will clip].
**-bo**-
Selects binary output. Append
**s**for single precision [Default is double]. **-P**-
Selects Portrait plotting mode [
**GMT**Default is Landscape, see gmtdefaults to change this]. **-Q**-
Select vector plot [Default is stick-plot]. Optionally, specify
*parameters*which are*arrowwidth/headlength/headwidth*[Default is 0.075**c**/0.3**c**/0.25**c**(or 0.03**i**/0.12**i**/0.1**i**)]. Append n*size*which will cause vectors shorter than*size*to have their appearence scaled by length/*size*. **-R**-
*west, east, south,*and*north*specify the Region of interest. To specify boundaries in degrees and minutes [and seconds], use the dd:mm[:ss] format. Append**r**if lower left and upper right map coordinates are given instead of wesn. Specify a subset of the grid. **-S**-
Sets scale for vector length in data units per distance measurement unit [1]. Append c, i, m, p
to indicate the measurement unit (cm, inch, m, point). Prepend
**l**to indicate a fixed length for all vectors. **-T**- Means azimuth should be converted to angles based on the selected map projection.
**-U**-
Draw Unix System time stamp on plot. User may specify where the lower left corner
of the stamp should fall on the page relative to lower left corner of plot. Optionally,
append a label, or
**c**(which will plot the command string.). The GMT parameters UNIX_TIME and UNIX_TIME_POS can affect the appearance; see the**gmtdefaults**man page for details. **-V**- Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
**-W**- Set pen attributes used for vector outlines [Default: width = 1, color = 0/0/0, texture = solid].
**-X -Y**-
Shift origin of plot by (
*x-shift,y-shift*). Prepend**a**for absolute coordinates; the default (**r**) will reset plot origin. **-Z**-
Means the angles provided are azimuths rather than direction (requires
**-A**). **-c**- Specifies the number of plot copies. [Default is 1]

## EXAMPLES

To draw the vector field given by the files r.grd and theta.grd on a linear plot with scale 5 cm per data unit, using vector rather than stick plot, and scale vector magnitudes so that 10 units equal 1 inch, try
grdvector r.grd theta.grd **-Jx**5**c** **-Q** **-S**10**i** > gradient.ps