[ncl-talk] Odd Reference Vector Opacity Issue
Bassill, Nicholas
nbassill at albany.edu
Fri Jun 9 13:01:14 MDT 2017
Hi All,
I *think* I may have found a bug. For reference, I'm using NCL 6.3. Long story short, I make a complex plot in real time with lots of overlays of various variables, mostly for aid in severe weather prediction/detection, using NY Mesonet data. I denote strong wind gusts, and change their opacity to reflect how long ago they occurred. Here is a sample loop from today: http://www.atmos.albany.edu/facstaff/nbassill/live/NCLexample.gif
You'll notice the winds gusts (properly) change their opacity with time. The weird thing is that the reference vector changes its opacity with time as well, despite the fact I'm not instructing it to. The code is very long, so I'll just send the important parts of the script, below:
....
;;;; this part plots the site winds, and determines opacity based on time
size = dimsizes(sitewindtime)-1
tres = True
tres at tfPolyDrawOrder = "PostDraw"
tres at txFont = "helvetica-bold"
tres at txFontHeightF = 0.013
;tres at txFontThicknessF = 3
do n=0,size(0)-1,1
if sitewinds(n).gt.25
tres at txFontOpacityF = 1-(sitewindtime(n)/35)
stationtext = gsn_add_text(wks,plot,round(sitewinds(n),3),sitewindlons(n),sitewindlats(n),tres)
end if
end do
....
;;;; vector stuff
res_vc = res
res_vc at vcGlyphStyle = "LineArrow"
res_vc at vcLineArrowThicknessF = 5
res_vc at vcMinDistanceF = 0.01
res_vc at vcRefLengthF = 0.03
res_vc at vcRefAnnoOn = True
res_vc at vcRefMagnitudeF = 25
res_vc at vcRefAnnoString1 = "25 mph"
res_vc at vcRefAnnoSide = "Top"
res_vc at vcRefAnnoString2On = False
res_vc at vcRefAnnoPerimOn = False
res_vc at vcRefAnnoOrthogonalPosF = -0.76 ; more positive moves up
res_vc at vcRefAnnoParallelPosF = 0.94 ; more positive moves to right
res_vc at vcRefAnnoBackgroundColor = "SkyBlue"
res_vc at vcVectorDrawOrder = "PreDraw"
res_vc at vcMinAnnoFontHeightF = .012
res_vc at vcGlyphOpacityF = 1
res_vc at txFontOpacityF = 1
vector = gsn_csm_vector(wks,udata,vdata,res_vc)
overlay(plot,vector)
....
;;; next two lines were my attempt to try resetting things before drawing
tres = True
tres at txFontHeightF = 0.01
draw(plot)
-----------------
If anyone has any suggestions, please let me know.
Nick Bassill, PhD
Modeler & Meteorologist, New York State Mesonet
LC SB-28, 1400 Washington Ave.,
SUNY, University at Albany, NY 12222
(518) 442-6375
http://nysmesonet.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170609/92354d39/attachment.html
More information about the ncl-talk
mailing list