Re: overlay sparse wind vectors on a contour plot

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 8 Aug 2006 13:46:36 -0600 (MDT)

>I have some observations data at sparse locations. I would like to plot
>the wind vectors observed at these surface stations overlaid on a
>contour plot. The lat, lon, U and V are 1D arrays.
>It seems that the functions gsn_csm_vectors* requires more dense data or
>regular grid, or monotically lat and lon...
>I tried to reorder my data: I built 2D arrays of U and V with 1D arrays
>of increasing lat and lon. It does not work.
>I'm sure lots of people have already done this kind of graphs.
>
>Can you help me?
>_______________________________________________

[1] Draw your contour plot with

    res = True
    res_at_gsnFrame = False ; do not advance the frame
                           ; after contouring the data
         :
    plot = gsn_csm_...(...,res)
 
[2] Use wmbarb

http://www.ncl.ucar.edu/Document/Functions/Built-in/wmbarb.shtml

    If you have wind speed [WSPD] and direction [WDIR],
    change to u and v. This is array syntax.
    
              dirw = 0.017453*WDIR
              u = -WSPD*sin
              v = -WSPD*cos
              
     If the winds are located at lonW amd latW [1d arrays]
              
              wmsetp ("wdf", 1) ; meteorological dir
              wmsetp("col", "black")
              wmbarb(wks, lonW , latW, u, v )
              frame(wks)
              
              
Bon Chance!
D

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 08 2006 - 13:46:36 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 09 2006 - 08:25:35 MDT