<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"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>></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"><dave.k.adams@gmail.com></a><br>Reply: <span style="color:black">David Adams</span> <a href="mailto:dave.k.adams@gmail.com" target="_blank"><dave.k.adams@gmail.com>></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"><ncl-talk@ucar.edu>></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 = "./"<br>
file_name = asciiread("file_name",-1,"string")<br>
fili ="<a href="http://goes13_4_2013_196_2315_subset.nc" target="_blank">goes13_4_2013_196_2315_subset.nc</a>"<br>
f = addfile(diri+fili,"r")<br>
new_temp =
f->new_temp
; float data(time, yc, xc) ;<br>
; data:type = "IR" ;<br>
;*********************************<br>
; Fix the variable so it has recognizable missing data<br>
;*********************************<br>
lat = f->new_lat<br>
lon = f->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 =
"ps"
; "ps", "eps", "pdf", "png"<br>
pltDir = "./"<br>
wks = gsn_open_wks(pltType, pltDir+pltName)<br>
;gsn_define_colormap(wks,"amwg")
; choose a color map<br>
gsn_define_colormap(wks,"BlAqGrYeOrReVi200"); choose a
color map<br>
res
= True<br>
res@cnFillOn
=
True
; turn on color<br>
res@cnFillMode
= "RasterFill" ; 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 =
"Always" ; use NCL default<br>
;res@lbOrientation =
"Vertical" ; 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 = "USStates" ;
turn on state boundaries<br>
;res@mpOutlineBoundarySets = "AllBoundaries"<br>
res@mpOutlineBoundarySets =
"National" ; turn on country boundaries<br>
res@trGridType
= "TriangularMesh" ; Necessary b/c lat, lon<br>
<br>
res@cnLevelSelectionMode = "ManualLevels"
;"ExplicitLevels"<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
= "helvetica-bold"<br>
txres@txFontHeightF = 0.10<br>
txid = gsn_add_text (wks,plot,"BASC",-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>