Wind Barbs
NCL Home> Application examples> Special plots
Wind barbs are a vector style, so the normal vector resources
work to control the look and feel of wind barbs.
barb_1.ncl:
Demonstrates a default wind barb plot.vcGlyphStyle = "WindBarb" turns on wind barbs.
In this example, vcMinDistanceF is used to control the density of the wind barbs. The default density blacks out the entire plot. The length of the barbs is controlled by vcRefMagnitudeF and vcRefLengthF
barb_2.ncl:
Wind barbs colored by a scalar field.vcMonoWindBarbColor will color the wind barbs by the scalar field rather than plot them on top of the scalar field.
gsn_csm_vector_scalar_map_ce is the plot interface that draws either vector quantities on a scalar field, or colors those quantities by the scalar field.
barb_3.ncl:
A regional plot that demonstrates more wind barb controls.vcRefAnnoOn turns off the reference wind barb since by nature it is not needed.
vcWindBarbTickLengthF controls the length of the wind barb ticks. Default is 0.3.
vcWindBarbTickSpacingF controls the distance between the wind barb ticks. Default is 0.125.
Because this is a non-global plot, we must set gsnAddCyclic to False
mpDataBaseVersion allows the user to select the coastline data base. See the coastline example page for more details.
barb_4.ncl:
Demonstrates how to produce a wind profile plot.
gsn_csm_vector_scalar
is used to draw the wind profile, and then the plot is overlaid
on a logLin plot. The overlay is done for two reasons. First, the
logLin plot allows the expansion of the range of the X and Y axis
beyond that of the X/Y data coordinates. This allows the entire
wind barb field to be seen. Second, the logLin plot allows the
Y-axis to be changed from irregular to linear. (Optionally, this
also allows the Y-axis to be set to logarithmic by
setting trYLog = True,
although the Y-axis labels will likely need to be manually set
and the Y-axis cannot go < 0.)
Note that any plot object can be overlaid on a logLin plot to make the Y-axis linear or logarithmic. (You would not want to do this when working with certain plot types, a map plot for instance.)