;$Id: ryzslice.pro,v 1.7 2006/12/19 07:23:00 brandenb Exp $ ; ; reads yz slices, takes the data from one particular height, ; corresponding to level n, and puts them into a yt space-time array ; field='uy' field='uu2' datadir='data' file_slice4=datadir+'/slice_'+field+'.yz' ; ; read grid ; pc_read_grid,obj=obj,dim=dim zzz=obj.z(dim.n1:dim.n2) yyy=obj.y(dim.m1:dim.m2) n=223 ;(corresponding to z=0.9) itn=100 ;(plot frequency) ; ny=dim.ny nz=dim.nz yz=fltarr(ny,nz) ; ; open file ; it=0 close,4 & openr,4,file_slice4,/f77 while not eof(4) do begin readu,4,yz,t,slice_xpos if (it mod itn) eq 0 then begin print,t plot,yyy,yz(*,n),yr=[-1,1]*.3 endif ; ; put into arrays ; if it eq 0 then begin tt=t yt=yz(*,n) endif else begin tt=[tt,t] yt=[yt,yz(*,n)] endelse ; it=it+1 endwhile nt=it yt=reform(yt,ny,nt) save,file=field+'_ytslice.sav',yt,yyy,tt ; close,4 END