Re: wmbarb

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 02 2012 - 09:21:21 MST

Thank you for sending an easy-to-run script with a small data file. I
think you just need to set wmsetp using the col option.

Change this:
do n=0,N-1,3
     wmbarb(wks,xx(n), ywnd, u(n), v(n))
     wmbarb(wks,xx(n), ywnd2, u2(n), v2(n))
end do
to this:
do n=0,N-1,3
    wmsetp("col",2)
    wmbarb(wks,xx(n), ywnd, u(n), v(n))
    wmsetp("col",7)
    wmbarb(wks,xx(n), ywnd2, u2(n), v2(n))
end do

(See the wmbarb page here:
http://www.ncl.ucar.edu/Document/Functions/Built-in/wmbarb.shtml
specifically the sentence starting with: "To set parameters to control
the appearance of a wind barb, such as its size, color, and so forth,...")

Note that 2 and 7 refer to index values of your chosen colormap. You are
not setting one, so you are using the default colormap:
http://www.ncl.ucar.edu/Document/Graphics/ColorTables/default.shtml
(2 = red, 7 = magenta)

If you are not happy with the colors in that colormap you can select one
to use from the list here:
http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml

and then load it like this after you've defined your workstation like this:
wks = gsn_open_wks ("png","xy_wind")
gsn_define_colormap(wks,"prcp_1")

Hope that helps.. Adam

On 02/02/2012 01:30 AM, nlcheng wrote:
> I have uploaded the script and data. The drawing above includes
> the simulated and monitored speed and direction of the wind!
> I want to make the direction of the wind display <app:ds:display> two
> different color .you see both the direction of the wind in the
> drawing are black!
> how can i write the command ?
> hope for your help !
> thank you very much!
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 2 09:21:35 2012

This archive was generated by hypermail 2.1.8 : Mon Feb 06 2012 - 14:24:56 MST