; $Id: rslice2.pro,v 1.2 2017/02/17 17:43:21 brandenb Exp $ ; ; show two different slices ; print,'for 1-d fields in the x-direction' ; file_slice1='data/proc0/slice_uu3.xz' file_slice2='data/proc0/slice_lnrho.xz' ; t=zero xz_slice1=one*fltarr(nx,nz) xz_slice2=one*fltarr(nx,nz) ; close,1 & openr,1,file_slice1,/f77 close,2 & openr,2,file_slice2,/f77 print,'files opened ok' ; ; set default waiting time w ; real all snapshots and plot ; l=0 default,w,.2 !p.charsize=2 !p.multi=[0,1,2] !x.margin=[15,2] xxx=x(l1:l2) zzz=z(n1:n2) ; Ma=1.0 & yru=.15 & yrlr=[-1,1]*.07 ; i=0 while not eof(1) do begin readu,1,xz_slice1,t readu,2,xz_slice2,t print,t,max(abs(xz_slice1)) ;plot_io,exp(xz_slice1(*,n));,yr=[-1,1]*1e+1 plot,zzz,xz_slice1(l,*),ytit='u',yst=3,yr=[-1,1]*yru ;plot,zzz,xz_slice2(l,*),ytit='lnrho',yst=3,yr=yrlr plot,zzz,deriv(zzz,reform(zzz+xz_slice2(l,*))),ytit='lnrho',yst=3,yr=yrlr if i eq 0 then begin tt=t slice1=reform(xz_slice1(l,*)) slice2=reform(xz_slice2(l,*)) endif else begin tt=[tt,t] slice1=[slice1,reform(xz_slice1(l,*))] slice2=[slice2,reform(xz_slice2(l,*))] endelse wait,w i=i+1 end slice1=reform(slice1,nz,i) slice2=reform(slice2,nz,i) ; !p.multi=0 close,1 close,2 END