[ncl-talk] how to plot xy2 plot with 1D data

grace 313695096 at qq.com
Sat Aug 15 19:07:06 MDT 2015


Hi,all:    I am wondering how to plot xy2 plot with 1D data?
   I want to compare wrfout data with observed data in a xy2 plot with time as the X axis,
but the observed data are 1D without time  demension in a .txt file, a data per hour .
    I have  extract the wrfout data as 1D data in a .txt file :
;;;;;;;;;;;;;;;;;;;;;
ascii_file = "temp.txt"
str = new(ntimes, "string")
  do it =0, ntimes-1,1        ; TIME LOOP

t2= wrf_user_getvar(a,"T2",it)
      t2= t2-273.15
      t2 at units = "c" 
	tt2=t2(it,98, 98)
    end if
   str(it) = sprintf("%12.8f", tt2)
end do 

   asciiwrite(ascii_file, str)
;;;;;;;;;;;;;;;;;;;;;;;


How can I plot the xyplot with time as the X axis while data do not have time demension with the "plot = gsn_csm_xy2(wks,time,t2,tob,resL,resR)"


   Or do you guys have some advice?
    any information will be appreciated
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150816/56bfc6ba/attachment.html 


More information about the ncl-talk mailing list