[ncl-talk] Cannot Find error in gsn_add_text

Sebastian Otarola-Bustos Sebastian.F.Otarola-Bustos.1 at nd.edu
Sat Apr 4 21:58:06 MDT 2015


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.

Best Regards,
Sebastián.

  srcFileName = "/afs/
crc.nd.edu/user/s/sotarola/WRF/Santiago/Sim/1/wrfout_d03_2011-06-01_00:00:00.nc
"
sfile       = addfile(srcFileName,"r")

 lat        = wrf_user_getvar(sfile,"lat",-1)
 lon        = wrf_user_getvar(sfile,"lon",-1)

 opt = True
 loc = wrf_user_ll_to_ij(sfile,-70.71263323,-33.479181,opt)
 loc=loc-1

 do n=0,ntimes-1
      wks = gsn_open_wks("png","animate"+sprinti("%02i",n))    ;
animate_00.png, animate_01.png, etc
      gsn_define_colormap(wks,"gui_default")
      print("Trabajando en el tiempo: " + times(n))
      res at gsnRightString  = " Velocity(m/s):  "+ times(n)
      res at gsnLeftString = " "
      plotB =gsn_csm_vector_map(wks,u(n,:,:),v(n,:,:),res)
      txres = False
      text =
gsn_add_text(wks,plotB,"Cerrillos",lon(1,loc(1),loc(0)),lat(1,loc(1),loc(0)),txres)
      delete(wks)   ; Make sure PNG file is closed
  end do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150404/ece343ce/attachment.html 


More information about the ncl-talk mailing list