grdbarb¶
grdbarb - Plot wind barb field from two component grids
grdbarb compx.nc compy.nc -Jparameters [ -A ] [ -B[p|s]parameters ] [ -Ccpt ] [ -Gfill ] [ -I[x]dx[/dy] ] [ -K ] [ -N ] [ -O ] [ -P ] [ -Qparameters ] [ -Rregion ] [ -T ] [ -U[stamp] ] [ -Wpen ] [ -Xx_offset ] [ -Yy_offset ] [ -Z ] [ -fflags ] [ -pflags ] [ -ttransp ]
Note: No space is allowed between the option flag and the associated arguments.
grdbarb reads two 2-D grid files which represents the x- and y-components of a wind field and produces a wind field plot by drawing wind barbs with orientation and barbs according to the information in the files. Alternatively, polar coordinate r, theta grids may be given instead.
compx.nc
Contains the x-components of the wind field.
compy.nc
Contains the y-components of the wind field. (See GRID FILE FORMATS below.)
-Jparameters (more ...)
Select map projection.
-A
The grid files contain (speed, theta) wind components instead of (u, v) components [Default is (u, v)].
-B[p|s]parameters (more ...)
Set map boundary frame and axes attributes.
-C[cpt]
Use cpt to assign colors based on wind speed. Alternatively, supply the name of a GMT color master dynamic CPT [rainbow] to automatically determine a continuous CPT from the grid’s 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 colorn can be a r/g/b triplet, a color name, or an HTML hexadecimal color (e.g. #aabbcc ).
-Gfill
Sets color or shade for wind barb interiors [Default is no fill].
-I[x]dx[/dy]
Only plot wind barbs at nodes every x_inc, y_inc apart (must be multiples of original grid spacing). Append m for arc minutes or s for arc seconds. Alternatively, use -Ix to specify the multiples multx[/multy] directly [Default plots every node].
-K (more ...)
Do not finalize the PostScript plot.
-N
Do NOT clip wind barbs at map boundaries [Default will clip].
-O (more ...)
Append to existing PostScript plot.
-P (more ...)
Select “Portrait” plot orientation.
-Qparameters
Modify wind barb parameters. Append wind barb length [Default is 0.2i]. See WIND BARB ATTRIBUTES for specifying additional attributes.
-Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
Specify the region of interest. Specify a subset of the grid.
-T
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).
-U[[just]/dx/dy/][c|label] (more ...)
Draw GMT time stamp logo on plot.
-V[level] (more ...)
Select verbosity level [c].
-Wpen
Set pen attributes used for wind barb outlines [Default: width = default, color = black, style = solid].
-X[a|c|f|r][x-shift[u]]
-Y[a|c|f|r][y-shift[u]] (more ...)
Shift plot origin.
-Z
The theta grid provided contains azimuths rather than directions (implies -A).
-f[i|o]colinfo (more ...)
Specify data types of input and/or output columns.
-p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
Select perspective view.
-t[transp] (more ...)
Set PDF transparency level in percent.
-^ or just -
Print a short message about the syntax of the command, then exits (NOTE: on Windows just use -).
-+ or just +
Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exits.
-? or no arguments
Print a complete usage (help) message, including the explanation of all options, then exits.
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 ...)
Several modifiers may be appended to the windbarb-producing options to specify the placement of barbs, their shapes, and the justification of the wind barb. Below, left and right refers to the side of the wind barb line when viewed from the start point to the end point of the segment:
+aangle sets the angle of the wind barb [120].
+g-|fill turns off wind barb fill (if -) or sets the wind barb fill [Default fill is used, which may be no fill].
+p[-][pen] sets the wind barb pen attributes. If pen has a leading - then the outline is not drawn. [Default pen is used, and outline is drawn]
+jjust determines how the input x,y point relates to the wind barb. Choose from beginning [default], end, or center.
+s to set the wind speed which corresponds to a long barb [default 5]
+w to set the width of wind barbs
To draw the wind field given by the files r.nc and theta.nc on a barb plot with 0.1 inch length and centered on the node locations, run
gmt grdbarb r.nc theta.nc -Jx5c -A -Q0.1i+jc > gradient.ps
To plot a geographic data sets given the files comp_x.nc and comp_y.nc, and only plot every 3rd node in either direction, try
gmt grdbarb comp_x.nc comp_y.nc -Ix3 -JH0/20c -Q0.1i+jc > globe.ps
gmt, gmtcolors, grdvector, psbarb