<div dir="ltr">Hi Dave, <br><br>Thank you very much for your help, It would have taken a long time for me to figure out what was going on, it worked perfectly.<br><br>Best regards,<br>Sebastián.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 5, 2015 at 1:08 AM, Dave Allured - NOAA Affiliate <span dir="ltr"><<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sebastian,<div><br></div><div>This is tricky. The use of gsn_add_text and other gsn_ annotations requires that you delay plot output until after the annotations are added to internal buffers. See the example at the bottom of the gsn_add_text function page, "conwomap_3.ncl", for how to control the output flow.</div><div><br></div><div>In particular, add these two commands BEFORE calling gsn_csm_vector_map:</div><div><br></div><div> res@gsnDraw = False ; do not draw <br> res@gsnFrame = False ; do not advance<br><div class="gmail_extra"><div class="gmail_quote"><br></div><div class="gmail_quote">Also, add these two commands AFTER calling gsn_add_text, and BEFORE delete (wks):</div><div class="gmail_quote"><br></div><div class="gmail_quote"> draw(plotB)</div><div class="gmail_quote"> frame(wks)</div><span class="HOEnZb"><font color="#888888"><div class="gmail_quote"><br></div><div class="gmail_quote">--Dave</div></font></span><div><div class="h5"><div class="gmail_quote"><br>On Sat, Apr 4, 2015 at 9:58 PM, Sebastian Otarola-Bustos <span dir="ltr"><<a href="mailto:Sebastian.F.Otarola-Bustos.1@nd.edu" target="_blank">Sebastian.F.Otarola-Bustos.1@nd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi All, I'm trying to write the names of some locations in a map throw the gsn_add_text command, but this isn't working and I can't find the error because is not throwing me any one. I only see the map after running my code without any text. I attached you some parts of my code where I use this command, it would be great if someone can help me to find my mistake.<br><br>Best Regards,<br>Sebastián.<br><br> srcFileName = "/afs/<a href="http://crc.nd.edu/user/s/sotarola/WRF/Santiago/Sim/1/wrfout_d03_2011-06-01_00:00:00.nc" target="_blank">crc.nd.edu/user/s/sotarola/WRF/Santiago/Sim/1/wrfout_d03_2011-06-01_00:00:00.nc</a>"<div>sfile = addfile(srcFileName,"r")</div><div><br><div> lat = wrf_user_getvar(sfile,"lat",-1)</div><div> lon = wrf_user_getvar(sfile,"lon",-1)</div></div><div><br><div> opt = True</div><div><span style="background-color:rgb(255,0,0)"> loc = wrf_user_ll_to_ij(sfile,-70.71263323,-33.479181,opt)</span></div><div> loc=loc-1</div></div><div><br></div><div><div> do n=0,ntimes-1</div><div> wks = gsn_open_wks("png","animate"+sprinti("%02i",n)) ; animate_00.png, animate_01.png, etc</div><div> gsn_define_colormap(wks,"gui_default")</div><div> print("Trabajando en el tiempo: " + times(n))</div><div> res@gsnRightString = " Velocity(m/s): "+ times(n)</div><div> res@gsnLeftString = " "</div><div> plotB =gsn_csm_vector_map(wks,u(n,:,:),v(n,:,:),res)</div><div> txres = False</div><div> <span style="background-color:rgb(255,0,0)">text = gsn_add_text(wks,plotB,"Cerrillos",lon(1,loc(1),loc(0)),lat(1,loc(1),loc(0)),txres)</span></div><div> delete(wks) ; Make sure PNG file is closed</div><div> end do</div></div></div></blockquote></div></div></div></div></div></div>
</blockquote></div><br></div>