;$Id: pkt2304_hel_suppl.pro,v 1.4 2019/03/07 04:44:38 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=12,yoffset=3
  !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3
end
;
; mv idl.ps ~/tex/tina/Decay/fig/pkt2304_hel_suppl_short2304pm1_kf60b_noforce.ps
; mv idl.ps ~/tex/tina/Classes/fig/pkt2304_hel_short2304pm1_kf60b_noforce.ps
;
default,iread,0
if iread eq 0 then begin
  ;power,'hel_mag','_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,'_kin','_mag',k=k,spec1=spec1,spec2=spec2,i=n,tt=t,/noplot & print,n
  iread=1
endif
;
siz=2.4
!p.multi=0
!x.title='!8k!6/!8k!6!d1!n'
!x.title='!8k!6/!8k!6!d0!n'
!y.title='!8k!6!u5/3!n!8E!6!dM!n!6(!8k,t!6) and !8k!6!u5/3!n!8E!6!dK!n!6(!8k,t!6)'
!y.title='!8E!6!dM!n!6(!8k,t!6) and !8E!6!dK!n!6(!8k,t!6)  [!8v!6!s!u2!n!r!dA0!n!8k!6!d0!n]'
!y.title='!8E!6!dM!n!6(!8k,t!6) and !8E!6!dK!n!6(!8k,t!6)'
!x.margin=[7.2,.5]
!y.margin=[3.1,.5]
!p.charsize=2.4
tilde='!9!s!aA!n!r!6'
@parameters
pc_read_param,/param2,o=param
;
;w=0.
default,w,.1
s=1./k^2.
s=k^2.5
;s=k^1.667 & yr=[2e-5,2e-0]
vA0=.15 & kM0=60.
s=1./(vA0^2*kM0) & default,yr,[2e-9,2e-2]
k0=15.
k0=60.
E=t
EK=t
D=t
II=t
IIK=t
nu=param.nu
eta=param.eta
help,s
plot_oo,k/k0,s*spec2(*,0),xr=[1,1152]/k0,yr=yr,/nodata
default,it3,80
;oplot,k,k*0+1e-2
;for it=8,n-2,it3 do begin
nit=n_elements(iit)
for i=0,nit-1 do begin
  it=iit(i)
  epsK=total(2.*nu*k^2*spec1(*,it))
  epsM=total(2.*eta*k^2*spec2(*,it))
  urms=total(2.*spec1(*,it))^.5
  vA=total(2.*spec2(*,it))^.5
  print,t(it),epsM,epsK,vA
  oplot,k/k0,s*spec2(*,it),li=0,thick=.5
  ;oplot,k,s*spec1(*,it)*k/2.,li=1,thick=.5
  oplot,k/k0,s*spec1(*,it),li=1,thick=.5
  ;oplot,k/k0,s*spec1(*,it)+s*spec2(*,it),thick=.5
  print,it,t(it)-t(0)
  Re=urms/(nu*kM)
  Lu=vA/(eta*kM)
  print,'Lu,Re=',Lu,Re
  wait,w
endfor
help,s
default,its,n-2
it=its & oplot,k/k0,s*spec2(*,it),li=0,thick=8
it=its & oplot,k/k0,s*spec1(*,it),li=2,thick=8
;
;  overplot slope
;
if nopost eq 1 then stop
@postproc2
;- xx=[1,4] & oplot,xx/k0,1.5e-8*xx^2,col=155,thick=6
;- xx=[1,4] & oplot,xx/k0,3e-8*xx^4,col=122
;xx=[12,366] & oplot,xx/k0,1.6e-3/xx^1.667,col=155
;
; 1/3 slope
;xx=[22.,466.] & oplot,xx/k0,.7e-2/xx^2.,col=122
;xx=[3.,56.] & oplot,xx/k0,3.4e-7/xx^.333,col=155,thick=6
;
; 0 slope
;- xx=[22.,466.] & oplot,xx/k0,5e-3/xx^2.,col=122
;- xx=[5.,56.] & oplot,xx/k0,2.4e-7/xx^.0,col=155,thick=6
;
;xx=[12.,34.] & oplot,xx,3e-2/xx^2.5,col=122
;xx=[1.7,6] & oplot,xx,2e-7/xx^.5,col=122
;xx=[1,6] & oplot,xx,2e-8/xx ;(for PrM=100)
;
help,s
END
