[Thread Prev][Thread Next][Index]

Re: Vector aspect ratio with poly_vectors



Hi Bill,
Thank you for the report. The poly_vectors script was written with horizontal
components in mind, so it may well be that there are changes we need to make
to get it to work correctly with time and vertical components.

Ansley

Gustafson, William I wrote:

Dear Ferreters,

This is a two part e-mail dealing with getting the proper aspect ratio when using the poly_vectors script and then a possible bug.

Part 1:
I am trying to write a generalized script that will plot wind vectors for a time-height cross section. I would like the plot window to be tall and narrow and this creates distorted looking vectors if I use the vector command (the hammer heads discussed recently). So, I would like to use the poly_vectors script. If I understand what is happening, I have to apply aspect corrections to my u and v wind components to properly account for the unit difference between the time and height axes as well as the viewport, margin, and window settings. I think the result looks close if I use the script below. However, the aspect correction may be a little off. Can anybody offer a better way to handle this? Exact definitions to all the relevant axis and window symbols would be helpful too?

Here is the relevant part of the script:

set window/size=0.7/aspect=2
contour/set/nolab/color=white/lev=(-1000)/transpose/vlim=($vlims)/d=3 uobs,tobs,hobs
go margins 0.1 1.5 1.3 0.2
ppl xlab "Hours after ($day)-($monthstr)-2000 12Z"
ppl ylab "height (km)"
ppl labset ,0.18,0.18
ppl contour
let aspadj = `($ppl$xlen)/($ppl$ylen)`
let xadj = `(($ppl$xmax)-($ppl$xmin))`
let yadj = `(($ppl$ymax)-($ppl$ymin))*aspadj`
go poly_vectors tobs hobs uobs*xadj vobs*yadj 30 "arrow"
let colval=ysequence(uobssub[d=3])
polygon/over/nolabel/nokey/pal=green plt_x_arrow, plt_y_arrow, colval

Part 2:
Using a script similar to above, if I set ubos=2 and vobs=2 I get a 45 degree vector like I want. And, if I set uobs=2 and vobs=0, I get horizontal vectors, again like I want. However, if I set uobs=0 and vobs=2, the vectors get extremely small. So, either I have totally misunderstood how to set the aspect ratio in part 1 above, or there might be a bug in the poly_vector script.
Thanks for any suggestions.

-Bill


_______________________________________
William I. Gustafson Jr., Ph.D.
Pacific Northwest National Laboratory
P.O. Box 999, MSIN K9-30
Richland, WA 99352, USA
Voice & Msg: (509)372-6110
FAX: (509)372-6168
http://www.pnl.gov/atmos_sciences




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement