;$Id: pvid_prof.pro,v 1.2 2009/06/15 19:55:21 brandenb Exp $ !p.charthick=2 & !p.thick=2 & !x.thick=2 & !y.thick=2 ; ; simple scrip to read in 1-D slice file ; ipng=1 pc_read_grid,o=grid pc_read_dim,o=dim ; ; x and y arrays ; xxx=grid.x(dim.l1:dim.l2) yyy=grid.y(dim.m1:dim.m2) ; ; define array, and open file ; bp=fltarr(dim.nx,dim.ny) bz=fltarr(dim.nx,dim.ny) ; close,1 close,2 openr,1,'data/proc0/slice_bb2.xy',/f77 openr,2,'data/proc0/slice_bb3.xy',/f77 ; ; loop to read all records ; set counter i=0 in the beginning ; i=0 m=dim.ny/2 fo='(f4.2)' !x.title='!8r!6' !y.title='!8B!d!7u!n!6 and !8B!dz!n!6' !p.charsize=2 while not eof(1) do begin yr=[-.4,1.05]*max(abs([bp,bz])) readu,1,bp,t readu,2,bz,t !p.title='!8t!6='+str(t,fo=fo) plot,xxx,bz(*,m),xr=[0,.95],yr=yr,back=255,col=0 oplot,xxx,bp(*,m),li=2 oplot,xxx,bz(*,m),col=122 oplot,xxx,bp(*,m),col=55 oplot,xxx,xxx*0.,col=0 tvscl,bz i=i+1 if ipng eq 1 then mkpng wait,.1 end close,1 close,2 nt=i ; END