; $Id: rslice_chunks.pro,v 1.2 2016/07/21 05:48:58 brandenb Exp $ if !d.name eq 'PS' then begin device,xsize=18,ysize=22,yoffset=3 !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3 end ; ; mv idl.ps ~/tex/x/x/fig/rslice_xy.ps ; ; after this, run also .r pvar (so that the x array is defined) ; and then .r pselect_last ; !p.charsize=1.7 !x.margin=[8.8,1.5] !y.margin=[3.2,.5] @parameters ; ; reads xy slices ; this routine is not very general yet and needs to be adjusted ; before it can be general purpose. ; ; find the correct file by looking for it like so: ; ls -l data/proc*/slice_uu3.xy ; spawn,'ls data/proc*/slice_uu3.xy' file_slice='data/proc2/slice_uu3.xy' file_slice='data/proc11/slice_uu3.xy' ;file_slice='data/proc11/slice_bb3.xy' ;(used as an experiment) ; nt_per_chunk=32L for ichunk=0,25 do begin wfile='chunk'+str(ichunk)+'.sav' & it1=32L*ichunk & it2=32L*(ichunk+1) print,'AXEL: it1,it2=',it1,it2 wait,.1 ; pc_read_param,obj=param pc_read_dim,obj=dim pc_read_ts,obj=ts nx=dim.nx ; prec=1d0 t=0.*prec default,w,.0 default,iplot,1 default,t1,10.0 slice_zpos=0.*prec xy_slice=fltarr(nx)*prec help,xy_slice print,'nx=',nx Lx=param.Lxyz(0) dk=2.*!pi/Lx ; it=0L ix1=0 ix2=nx-1 close,1 ;openr,1,file_slice,'unformatted',/f77 openr,1,file_slice,/f77 print,'test: t1,t2=',t1,t2 while not eof(1) do begin readu,1,xy_slice,t,slice_zpos print,'AXEL: it,t=',it,t if it ge it1 and it lt it2 then begin ; if it eq it1 then begin tt=t xt=xy_slice(ix1:ix2) endif else begin tt=[tt,t] xt=[xt,xy_slice(ix1:ix2)] endelse if (it mod 50) eq 0 then print,it,t,max(ts.t) endif if it ge it2 then begin print,'ENDING',t,t2 goto,ending end it=it+1L end ending: nt=it-it1 print,'ENDED',t,t2 ; ; save data file ; save,file=wfile,xt,tt close,1 ; END