[Thread Prev][Thread Next][Index]

Re: [ferret_users] Missing vector arrows



Hi Jerome,
It looks like the algorithm for drawing the arrow part of the vectors breaks down, making the arrow lie along the vector "shaft" for some vectors. Why it seems to happen for some of the vectors in your plots is not clear. We'll have to take another look at that.

One workaround for you might be the polygon vector scripts, which are available for both rectilinear and curvilinear data. If you like the look of these, they use an entirely different method of drawing, and should not have the trouble you're seeing.  They also have the advantage of the option to color the vectors according to some variable field if one wishes. Try running the script
yes? go poly_vector_demo
and see if you like the look. The demo uses a map projection to create curvilinear data, but you can use the poly_vectors.jnl script directly to plot curvilinear data; the script wants inputs containing the x and y coordinates of the vector tails in 2 dimensions which is exactly what we have in a curvilinear data set.
    ! say we have data with uwnd, vwnd, and curvilinear
    !
coordinate variables lon_array and lat_array

yes? use curvilinear_dat.nc

    ! make a vector plot as the "underlay" for the polygon command
    ! This sets up the plot scaling
yes? vector/nokey uwnd, vwnd, lon_array, lat_array

yes? go poly_vectors.jnl lon_array lat_array uwnd vwnd 5 "arrow"

   ! These lines are written by the poly_vectors.jnl script:
*** POLY_VECTORS: Issue commands such as follow to plot the vectors ***
*** POLYGON/OVER/NOLABEL/KEY/NOAXES/LINE PLT_X_ARROW, PLT_Y_ARROW, MY_VALUES[J=1:27118] ***
*** SET REGION SAVE ***

   ! Create a constant variable to color the plots with a single color
yes? let my_values = 1 + 0*ysequence(uwnd)

yes? poly/pal=blue/over/nolab/key/noax/line  PLT_X_ARROW, PLT_Y_ARROW, my_values

Note that the polygon vector plots don't automatically skip some vectors for plot readability; the polygon script discusses sub-sampling if needed.



Jerome Fiechter wrote:
Hello Ferreters,

I just ran into a problem plotting vectors on a curvilinear grid where some, but not all, arrows at the end of the vectors are missing. Has anybody seen this before or knows how to fix it? Any help would be appreciated.

Thank you,

Jerome





-- 

~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~> 

Ansley Manke, NOAA/PMEL   ansley.b.manke@noaa.gov
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement