; $Id: rslice_allchunks.pro,v 1.5 2016/07/21 12:43:47 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) ; ichunk=0 nt_per_chunk=32L nt_per_chunk=4096L nt_per_chunk=1024L it1=0 it2=it1+nt_per_chunk-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 if it ge it1 and it le it2 then begin if it eq it1 then begin tt=t xt=xy_slice(ix1:ix2) print,'initialized: it,t=',it,t wait,1 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 eq it2 then begin nt=n_elements(tt) xt=reform(xt,nx,nt) print,'save chunk: it,t=',it,t wait,1 wfile='chunk'+str(ichunk)+'.sav' save,file=wfile,xt,tt it1=it2+1 it2=it1+nt_per_chunk-1 ichunk=ichunk+1 print,'AXEL: it1,it2=',it1,it2 wait,.1 end it=it+1L end close,1 ; END