.\" Man page generated from reStructuredText. . .TH "GRDVECTOR" "1gmt" "Jan 10, 2019" "5.4.5" "GMT" .SH NAME grdvector \- Plot vector field from two component grids . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBgrdvector\fP \fIcompx.nc\fP \fIcompy.nc\fP \fB\-J\fP\fIparameters\fP [ \fB\-A\fP ] [ \fB\-B\fP[\fBp\fP|\fBs\fP]\fIparameters\fP ] [ \fB\-C\fP\fIcpt\fP ] [ \fB\-G\fP\fIfill\fP ] [ \fB\-I\fP[\fBx\fP]\fIdx\fP[/\fIdy\fP] ] [ \fB\-K\fP ] [ \fB\-N\fP ] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-Q\fP\fIparameters\fP ] [ \fB\-R\fP\fIregion\fP ] [ \fB\-S\fP[\fBi\fP|\fBl\fP]\fIscale\fP ] [ \fB\-T\fP ] [ \fB\-U\fP[\fIstamp\fP] ] [ \fB\-W\fP\fIpen\fP ] [ \fB\-X\fP\fIx_offset\fP ] [ \fB\-Y\fP\fIy_offset\fP ] [ \fB\-Z\fP ] [ \fB\-f\fPflags ] [ \fB\-p\fPflags ] [ \fB\-t\fPtransp ] .sp \fBNote:\fP No space is allowed between the option flag and the associated arguments. .SH DESCRIPTION .sp \fBgrdvector\fP reads two 2\-D grid files which represents the \fIx\fP\- and \fIy\fP\-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 \fIr\fP, \fItheta\fP grids may be given instead. .SH REQUIRED ARGUMENTS .INDENT 0.0 .TP .B \fIcompx.nc\fP Contains the x\-components of the vector field. .TP .B \fIcompy.nc\fP Contains the y\-components of the vector field. (See GRID FILE FORMATS below.) .UNINDENT .INDENT 0.0 .TP \fB\-J\fP\fIparameters\fP (more ...) Select map projection. .UNINDENT .SH OPTIONAL ARGUMENTS .INDENT 0.0 .TP \fB\-A\fP The grid files contain polar (r, theta) components instead of Cartesian (x, y) [Default is Cartesian components]. .UNINDENT .INDENT 0.0 .TP \fB\-B\fP[\fBp\fP|\fBs\fP]\fIparameters\fP (more ...) Set map boundary frame and axes attributes. .UNINDENT .INDENT 0.0 .TP \fB\-C\fP[\fIcpt\fP] Use \fIcpt\fP to assign colors based on vector length. Alternatively, supply the name of a GMT color master dynamic CPT [rainbow] to automatically determine a continuous CPT from the grid\(aqs z\-range. If the dynamic CPT has a default range then that range will be imposed instead. Yet another option is to specify \-Ccolor1,color2[,color3,...] to build a linear continuous cpt from those colors automatically. In this case \fIcolor\fP\fBn\fP can be a r/g/b triplet, a color name, or an HTML hexadecimal color (e.g. #aabbcc ). .UNINDENT .INDENT 0.0 .TP \fB\-G\fP\fIfill\fP Sets color or shade for vector interiors [Default is no fill]. .UNINDENT .INDENT 0.0 .TP \fB\-I\fP[\fBx\fP]\fIdx\fP[/\fIdy\fP] Only plot vectors at nodes every \fIx_inc\fP, \fIy_inc\fP apart (must be multiples of original grid spacing). Append \fBm\fP for arc minutes or \fBs\fP for arc seconds. Alternatively, use \fB\-Ix\fP to specify the multiples \fImultx\fP[/\fImulty\fP] directly [Default plots every node]. .UNINDENT .INDENT 0.0 .TP \fB\-K\fP (more ...) Do not finalize the PostScript plot. .UNINDENT .INDENT 0.0 .TP \fB\-N\fP Do NOT clip vectors at map boundaries [Default will clip]. .UNINDENT .INDENT 0.0 .TP \fB\-O\fP (more ...) Append to existing PostScript plot. .UNINDENT .INDENT 0.0 .TP \fB\-P\fP (more ...) Select "Portrait" plot orientation. .UNINDENT .INDENT 0.0 .TP \fB\-Q\fP\fIparameters\fP Modify vector parameters. For vector heads, append vector head \fIsize\fP [Default is 0, i.e., stick\-plot]. See VECTOR ATTRIBUTES for specifying additional attributes. .UNINDENT .INDENT 0.0 .TP \fB\-R\fP\fIxmin\fP/\fIxmax\fP/\fIymin\fP/\fIymax\fP[\fB+r\fP][\fB+u\fP\fIunit\fP] (more ...) Specify the region of interest. Specify a subset of the grid. .UNINDENT .INDENT 0.0 .TP \fB\-S\fP[\fBi\fP|\fBl\fP]\fIscale\fP Sets scale for Cartesian vector length in data units per distance measurement unit [1]. Append \fBc\fP, \fBi\fP, or \fBp\fP to indicate the measurement unit (cm, inch,or point). Prepend \fBl\fP to indicate a fixed length for all vectors. For Geographic data, give scale in data units per km. Use \fB\-Si\fP if it is simpler to give the reciprocal scale in measurement unit per data unit or km per data unit. .UNINDENT .INDENT 0.0 .TP \fB\-T\fP Means the azimuths of Cartesian data sets should be adjusted according to the signs of the scales in the x\- and y\-directions [Leave alone]. This option can be used to convert vector azimuths in cases when a negative scale is used in one of both directions (e.g., positive down). .UNINDENT .INDENT 0.0 .TP \fB\-U\fP[[\fIjust\fP]/\fIdx\fP/\fIdy\fP/][\fBc\fP|\fIlabel\fP] (more ...) Draw GMT time stamp logo on plot. .UNINDENT .INDENT 0.0 .TP \fB\-V\fP[\fIlevel\fP] (more ...) Select verbosity level [c]. .UNINDENT .INDENT 0.0 .TP \fB\-W\fP\fIpen\fP Set pen attributes used for vector outlines [Default: width = default, color = black, style = solid]. .UNINDENT .sp \fB\-X\fP[\fBa\fP|\fBc\fP|\fBf\fP|\fBr\fP][\fIx\-shift\fP[\fBu\fP]] .INDENT 0.0 .TP \fB\-Y\fP[\fBa\fP|\fBc\fP|\fBf\fP|\fBr\fP][\fIy\-shift\fP[\fBu\fP]] (more ...) Shift plot origin. .UNINDENT .INDENT 0.0 .TP \fB\-Z\fP The theta grid provided contains azimuths rather than directions (implies \fB\-A\fP). .UNINDENT .INDENT 0.0 .TP \fB\-f\fP[\fBi\fP|\fBo\fP]\fIcolinfo\fP (more ...) Specify data types of input and/or output columns. .UNINDENT .INDENT 0.0 .TP \fB\-p\fP[\fBx\fP|\fBy\fP|\fBz\fP]\fIazim\fP[/\fIelev\fP[/\fIzlevel\fP]][\fB+w\fP\fIlon0\fP/\fIlat0\fP[/\fIz0\fP]][\fB+v\fP\fIx0\fP/\fIy0\fP] (more ...) Select perspective view. .UNINDENT .INDENT 0.0 .TP \fB\-t\fP[\fItransp\fP] (more ...) Set PDF transparency level in percent. .UNINDENT .INDENT 0.0 .TP \fB\-^\fP or just \fB\-\fP Print a short message about the syntax of the command, then exits (NOTE: on Windows just use \fB\-\fP). .TP \fB\-+\fP or just \fB+\fP Print an extensive usage (help) message, including the explanation of any module\-specific option (but not the GMT common options), then exits. .TP \fB\-?\fP or no arguments Print a complete usage (help) message, including the explanation of all options, then exits. .UNINDENT .SH GRID FILE FORMATS .sp By default GMT writes out grid as single precision floats in a COARDS\-complaint netCDF file format. However, GMT is able to produce grid files in many other commonly used grid file formats and also facilitates so called "packing" of grids, writing out floating point data as 1\- or 2\-byte integers. (more ...) .SH VECTOR ATTRIBUTES .sp Several modifiers may be appended to the vector\-producing options to specify the placement of vector heads, their shapes, and the justification of the vector. Below, left and right refers to the side of the vector line when viewed from the start point to the end point of the segment: .INDENT 0.0 .INDENT 3.5 \fB+a\fP\fIangle\fP sets the angle of the vector head apex [30]. .sp \fB+b\fP places a vector head at the beginning of the vector path [none]. Optionally, append \fBt\fP for a terminal line, \fBc\fP for a circle, \fBa\fP for arrow [Default], \fBi\fP for tail, \fBA\fP for plain arrow, and \fBI\fP for plain tail. Further append \fBl\fP|\fBr\fP to only draw the left or right side of this head [both sides]. .sp \fB+e\fP places a vector head at the end of the vector path [none]. Optionally, append \fBt\fP for a terminal line, \fBc\fP for a circle, \fBa\fP for arrow [Default], \fBi\fP for tail, \fBA\fP for plain arrow, and \fBI\fP for plain tail. Further append \fBl\fP|\fBr\fP to only draw the left or right side of this head [both sides]. .sp \fB+g\fP\-|\fIfill\fP turns off vector head fill (if \-) or sets the vector head fill [Default fill is used, which may be no fill]. .sp \fB+h\fP\fIshape\fP sets the shape of the vector head (range \-2/2). Default is controlled by MAP_VECTOR_SHAPE [0]. .sp \fB+l\fP draws half\-arrows, using only the left side of specified heads [both sides]. .sp \fB+m\fP places a vector head at the mid\-point the vector path [none]. Append \fBf\fP or \fBr\fP for forward or reverse direction of the vector [forward]. Optionally, append \fBt\fP for a terminal line, \fBc\fP for a circle, or \fBa\fP for arrow head [Default]. Further append \fBl\fP|\fBr\fP to only draw the left or right side of this head [both sides]. Cannot be combined with \fB+b\fP or \fB+e\fP\&. .sp \fB+n\fP\fInorm\fP scales down vector attributes (pen thickness, head size) with decreasing length, where vectors shorter than \fInorm\fP will have their attributes scaled by length/\fInorm\fP [arrow attributes remains invariant to length]. .sp \fB+o\fP\fIplon\fP/\fIplat\fP specifies the oblique pole for the great or small circles. Only needed for great circles if \fB+q\fP is given. .sp \fB+p\fP[\-][\fIpen\fP] sets the vector pen attributes. If \fIpen\fP has a leading \- then the head outline is not drawn. [Default pen is used, and head outline is drawn] .sp \fB+q\fP means the input \fIangle\fP, \fIlength\fP data instead represent the \fIstart\fP and \fIstop\fP opening angles of the arc segment relative to the given point. .sp \fB+r\fP draws half\-arrows, using only the right side of specified heads [both sides]. .sp \fB+t\fP[\fBb\fP|\fBe\fP]\fItrim\fP will shift the beginning or end point (or both) along the vector segment by the given \fItrim\fP; append suitable unit. If the modifiers \fBb\fP|\fBe\fP are not used then \fItrim\fP may be two values separated by a slash, which is used to specify different trims for the two ends. Positive trims will shorted the vector while negative trims will lengthen it [no trim]. .UNINDENT .UNINDENT .sp In addition, all but circular vectors may take these modifiers: .INDENT 0.0 .INDENT 3.5 \fB+j\fP\fIjust\fP determines how the input \fIx\fP,\fIy\fP point relates to the vector. Choose from \fBb\fPeginning [default], \fBe\fPnd, or \fBc\fPenter. .sp \fB+s\fP means the input \fIangle\fP, \fIlength\fP are instead the \fIx\fP, \fIy\fP coordinates of the vector end point. .UNINDENT .UNINDENT .sp Finally, Cartesian vectors may take these modifiers: .INDENT 0.0 .INDENT 3.5 \fB+z\fP\fIscale\fP[\fIunit\fP] expects input \fIdx\fP,\fIdy\fP vector components and uses the \fIscale\fP to convert to polar coordinates with length in given unit. .UNINDENT .UNINDENT .SH EXAMPLES .sp To draw the vector field given by the files r.nc and theta.nc on a linear plot with scale 5 cm per data unit, using vector rather than stick plot, scale vector magnitudes so that 10 units equal 1 inch, and center vectors on the node locations, run .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt grdvector r.nc theta.nc \-Jx5c \-A \-Q0.1i+e+jc \-S10i > gradient.ps .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp To plot a geographic data sets given the files com_x.nc and comp_y.nc, using a scale of 200 km per data unit and only plot every 3rd node in either direction, try .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt grdvector comp_x.nc comp_y.nc \-Ix3 \-JH0/20c \-Q0.1i+e+jc \-S200 > globe.ps .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH SEE ALSO .sp gmt, gmtcolors, grdcontour, psxy .SH COPYRIGHT 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe .\" Generated by docutils manpage writer. .