<div dir="ltr"><div><div>Thank Alan, Rick<br></div>yes, that´s exactly what I needed to do.<br><br></div>Dave<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 11, 2014 at 3:13 PM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="margin:0px"><div style="margin:0px"><font color="#222222" face="Helvetica">Think you just need to set gsnDraw and gsnFrame = False, then draw(plot) and frame(wks) after you add the text to the plot.   </font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><br></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnDraw" target="_blank">https://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnDraw</a></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnFrame" target="_blank">https://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnFrame</a></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><br></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/draw.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/draw.shtml</a></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/frame.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/frame.shtml</a></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><br></font></div><div style="margin:0px"><font color="#222222" face="Helvetica"><br></font></div><div style="margin:0px"><font color="#222222" face="Helvetica">Good Luck, </font></div><div style="margin:0px"><font color="#222222" face="Helvetica">Alan. </font></div><div style="margin:0px"><font color="#222222" face="arial"><br></font></div><div style="margin:0px"><font color="#222222" face="arial"><br></font></div><div style="margin:0px"><font color="#222222" face="arial"><br></font></div></div> <div><div style="font-family:helvetica,arial;font-size:13px">-- <br>Alan Brammer<br>PhD Candidate — African Easterly Waves and TC genesis</div><div style="font-family:helvetica,arial;font-size:13px">University At Albany, NY</div><div style="font-family:helvetica,arial;font-size:13px"><a href="http://www.atmos.albany.edu/student/abrammer" target="_blank">www.atmos.albany.edu/student/abrammer</a></div><div style="font-family:helvetica,arial;font-size:13px"><br></div><div style="font-family:helvetica,arial;font-size:13px"><br></div></div> <div style="color:black"><br>From: <span style="color:black">David Adams</span> <a href="mailto:dave.k.adams@gmail.com" target="_blank">&lt;dave.k.adams@gmail.com&gt;</a><br>Reply: <span style="color:black">David Adams</span> <a href="mailto:dave.k.adams@gmail.com" target="_blank">&lt;dave.k.adams@gmail.com&gt;&gt;</a><br>Date: <span style="color:black">November 11, 2014 at 15:51:33</span><br>To: <span style="color:black"><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a></span> <a href="mailto:ncl-talk@ucar.edu" target="_blank">&lt;ncl-talk@ucar.edu&gt;&gt;</a><br>Subject: <span style="color:black"> [ncl-talk] Text label on map projection <br></span></div><br> <blockquote type="cite"><span><div><div></div><div><div><div class="h5">






<div dir="ltr">
<div>
<div>
<div>
<div>Hi NCLers,<br></div>
I need to add simple text to GOES image, but the text doesn´t
appear.<br></div>
It might be due to the funky 2d lat,lon coordinates of GOES
images.  Any suggestions?<br>
<br></div>
thanks,<br></div>
<div>Dave<br>
<br></div>
<div>
---------Code--------------------------------------------<br>
   diri = &quot;./&quot;<br>
  file_name = asciiread(&quot;file_name&quot;,-1,&quot;string&quot;)<br>
  fili =&quot;<a href="http://goes13_4_2013_196_2315_subset.nc" target="_blank">goes13_4_2013_196_2315_subset.nc</a>&quot;<br>
   f    = addfile(diri+fili,&quot;r&quot;)<br>
   new_temp    =
f-&gt;new_temp         
; float data(time, yc, xc) ;<br>
                          
; data:type = &quot;IR&quot; ;<br>
;*********************************<br>
; Fix the variable so it has recognizable missing data<br>
;*********************************<br>
   lat  = f-&gt;new_lat<br>
   lon  = f-&gt;new_lon<br>
   lat@_FillValue = max(lat)<br>
   lon@_FillValue = lat@_FillValue<br>
   new_temp@_FillValue   = 255.<br>
                          
; associate coordinates with variable<br>
   new_temp@lat2d =
lat           ;
(yc, xc)<br>
   new_temp@lon2d = lon<br>
<br>
<br>
;*********************************<br>
; create plot<br>
;*********************************<br>
   sfx     =
get_file_suffix(fili,0)          
; use file name<br>
<br>
;  write output file name using first time record of file
list<br>
  out_file = str_get_cols(file_name(0),0,21)<br>
  output_file = out_file<br>
   pltName = output_file<br>
<br>
 pltType =
&quot;ps&quot;                            
; &quot;ps&quot;, &quot;eps&quot;, &quot;pdf&quot;, &quot;png&quot;<br>
   pltDir  = &quot;./&quot;<br>
   wks = gsn_open_wks(pltType, pltDir+pltName)<br>
 
;gsn_define_colormap(wks,&quot;amwg&quot;)            
; choose a color map<br>
   gsn_define_colormap(wks,&quot;BlAqGrYeOrReVi200&quot;); choose a
color map<br>
  
res                    
= True<br>
  
res@cnFillOn           
=
True           
; turn on color<br>
  
res@cnFillMode         
= &quot;RasterFill&quot;    ; cell mode<br>
  
res@cnLinesOn          
= False          
; Turn off contour lines<br>
   res@gsnSpreadColors     =
True           
; use full colormap<br>
  
res@gsnAddCyclic        =
False           ;
data not cyclic<br>
  
res@gsnMaximize         =
True           
; ps, pdf, pdf<br>
   res@pmTickMarkDisplayMode =
&quot;Always&quot;      ; use NCL default<br>
  ;res@lbOrientation       =
&quot;Vertical&quot;      ; vertical label bar<br>
   res@lbLabelAutoStride   =
True           
; let NCL decide spacing<br>
<br>
  
res@mpMinLatF          
= 22.50  ;    min(d@lat2d)    ;
region to zoom in on<br>
  
res@mpMaxLatF          
= 33.80  ;    max(d@lat2d)<br>
  
res@mpMinLonF          
= -115.00   ;   min(d@lon2d)<br>
  
res@mpMaxLonF          
= -102.500 ; max(d@lon2d)<br>
  
res@mpFillOn           
= False<br>
  ;res@mpOutlineBoundarySets = &quot;USStates&quot;    ;
turn on state boundaries<br>
  ;res@mpOutlineBoundarySets = &quot;AllBoundaries&quot;<br>
   res@mpOutlineBoundarySets =
&quot;National&quot;    ; turn on country boundaries<br>
  
res@trGridType         
= &quot;TriangularMesh&quot;   ; Necessary b/c lat, lon<br>
<br>
   res@cnLevelSelectionMode = &quot;ManualLevels&quot; 
;&quot;ExplicitLevels&quot;<br>
   res@cnMinLevelValF      
=
200.                           
; set the minimum contour level<br>
   res@cnMaxLevelValF      
=
300.                         
; set the maximum contour level<br>
   res@cnLevelSpacingF      =
5.0                           
; set the contour interval<br>
   res@cnRasterSmoothingOn  = True<br>
 res@lbLabelStride        =
5.0            
; every other label bar label<br>
<br>
   res@gsnLeftString      
= new_temp@type<br>
  
res@tiMainString        =
fili<br>
   plot = gsn_csm_contour_map_ce(wks,new_temp(:,:),
res)<br>
<br>
   txid =
new(1,graphic)                
; one text string<br>
<br>
  
txres              
= True<br>
   txres@txFont       
= &quot;helvetica-bold&quot;<br>
   txres@txFontHeightF = 0.10<br>
   txid = gsn_add_text (wks,plot,&quot;BASC&quot;,-108.2,28.2
,txres)<br>
<br></div>
<div>
<div><br>
<br>
<br>
<br>
<div>
<div><br>
<br></div>
</div>
</div>
</div>
</div></div></div><span class="">


_______________________________________________
<br>ncl-talk mailing list
<br>List instructions, subscriber options, unsubscribe:
<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
<br></span></div></div></span></blockquote></div></blockquote></div><br></div>