;power,'_lr','_mag',k=k,spec1=spec1,spec2=spec2,i=n,tt=t,/noplot & print,n power,'_kin','_mag',k=k,spec1=spec1,spec2=spec2,i=n,tt=t,/noplot & print,n ;power,'hel_kin','hel_mag',k=k,spec1=spec1h,spec2=spec2h,i=n,tt=t,/noplot & print,n power,'hel_kin','hel_mag',k=k,spec1=spec1h,spec2=spec2h,i=n,tt=t,/noplot & print,n ; ; $Id: ppower_all.pro,v 1.21 2022/04/17 06:46:43 brandenb Exp $ ; ; This routine is used to view all power spectra ; that were written during the run (controlled by dspec) ; The plot range yr is set to a default value. ; The time interval of plotting is "w" (default value) ; ; 5-oct-02/axel: written ; spawn,'if (! -f param.pro) touch parameters.pro' @parameters xr=[1,max(k)] default,yr,[1e-15,1e-1] istride=100 istride=1 default,w,.2 default,t1,.0 default,iover,0 default,istride,1 ampl15=3e-10 & ampl4=1e-13 ampl15=3e-6 & ampl4=1e-8 comp=k^2 comp=k^0 ; for i=0,n-2,istride do begin if(t(i) ge t1) then begin if iover eq 0 or i eq 0 then begin plot_oo,k,comp*spec1(*,i),xr=xr,yr=yr,tit='t='+str(t(i)) endif else begin oplot,k,comp*spec1(*,i),col=155 endelse oplot,k,comp*spec1(*,i),col=155 oplot,k,comp*spec2(*,i),col=188 ;oplot,k,abs(comp*spec1o(*,i))/k^2,li=2 oplot,k,abs(comp*spec1h(*,i))/k/2.,li=2,col=155 oplot,k,abs(comp*spec2h(*,i))*k/2.,li=2,col=122 oplot,k,(comp*spec2h(*,i))*k/2.,ps=1,col=188 oplot,k,-(comp*spec2h(*,i))*k/2.,ps=1,col=55 kk=[10,70] & oplot,kk,4e-1/kk^1.6667,col=188 kk=[20,270] & oplot,kk,4e-5/kk^2.,col=155 ;kk=[1,60] & oplot,kk,1e-5/kk,col=188 ;kk=[1,60.] & oplot,kk,1e-4/kk^3,col=188 ;kk=[2,40.] & oplot,kk,1e-5*kk^4,col=188 kk=[1,30.] & oplot,kk,1e-13*kk^4,col=188,li=3 kk=[1,30.] & oplot,kk,1e-10*kk^2,col=155,li=3 print,i,t(i) wait,w end end ; print,'E_K (white), E_M (red), E_T (yellow)' ; ; averages ; mspec1=total(spec1,2)/i mspec2=total(spec2,2)/i ;mspec1o=total(spec1o,2)/i mspec1h=total(spec1h,2)/i mspec2h=total(spec2h,2)/i spec1l=spec1[nn-2] ; ;save,file='mean_spec.sav',k,mspec1,mspec2,mspec1o,mspec2h save,file='mean_spec.sav',k,mspec1,mspec2,mspec1h,mspec2h save,file='last.sav',k,t,spec1l,spec2l,spec1hl,spec2hl save,file='all_spec.sav',k,t,spec1,spec2,spec1h,spec2h ; END