[ncl-talk] Odd Reference Vector Opacity Issue

Bassill, Nicholas nbassill at albany.edu
Tue Jun 13 12:16:09 MDT 2017


Hi Rick,
   Thanks for the reply (and compliment!) It's roughly in this order:

 gsn_csm_contour_map


;;;; this type of step many times

plots#= gsn_csm_contour(stuff)
overlay(plot,plots#)


;; done for however many winds qualify as > 25 mph

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

; done once
vector  = gsn_csm_vector(wks,udata,vdata,res_vc)
overlay(plot,vector)


I've tried flipping the order of those last two, but with no success. It's honestly not a huge issue, but I thought I would pass it along. I could pass along my script if you would like (I would here, but it's *very* long.)


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/


________________________________
From: Rick Brownrigg <brownrig at ucar.edu>
Sent: Monday, June 12, 2017 6:10 PM
To: Bassill, Nicholas
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] Odd Reference Vector Opacity Issue

Hi Nick,

I unfortunately am not able to duplicate this issue (?)  I've used 6.3.0, and I cobbled together a plot that uses, in order

gsn_csm_contour_map
gsn_add_text to the contour
gsn_csn_vector
...
overlay(plot, vector)

and I've tried to used the same resources everywhere.  Are any other opacity resources getting set in the script?

I'm not sure what to tell you...
Rick


On Fri, Jun 9, 2017 at 2:03 PM, Rick Brownrigg <brownrig at ucar.edu<mailto:brownrig at ucar.edu>> wrote:
Hi Nick,

That likely is indeed a bug and I will look into it and let you know.

That's a nice looking animation BTW!

Rick

On Fri, Jun 9, 2017 at 1:01 PM, Bassill, Nicholas <nbassill at albany.edu<mailto:nbassill at albany.edu>> wrote:

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<tel:(518)%20442-6375>

http://nysmesonet.org/

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170613/13ff1aef/attachment.html 


More information about the ncl-talk mailing list