;$Id: pres.pro,v 1.24 2026/08/01 19:19:37 brandenb Exp $
if !d.name eq 'PS' then begin
  device,xsize=18,ysize=18,yoffset=3
  !p.charthick=3 & !p.thick=3 & !x.thick=3 & !y.thick=3
end
;
@parameters
!p.charsize=1.5
!x.margin=[7.6,.5]
!y.margin=[3.2,.5]
!x.range=[0,3.3]
!p.multi=[0,1,2]
xout=.091
;
file='res.txt'
a=rtable(file,18,head=1)
c=rtablec(file,142,head=1)
nu=reform(a[0,*])
ratm=reform(a[1,*])
ratm2=reform(a[2,*])
ratmd=reform(a[3,*])
genmax=reform(a[4,*])
dismax=reform(a[5,*])
dynmax=reform(a[6,*])
Nmesh=reform(a[7,*])
epsK=reform(a[8,*])
divurms=reform(a[9,*])
orms=reform(a[10,*])
knu=reform(a[11,*])
uini=reform(a[13,*])
ratdx=reform(a[14,*])
umax=reform(a[15,*])
k0=reform(a[16,*])
lupw=reform(a[17,*])
;
;A & $0.20$ & $ 2.5$ & $0.005$ & $24.2$ & $0.050$ & $1.90$ & $0.220$ & $4.1$ & $ 80$ & $0.1300$ & $0.650$ & $0.660$ & $0.63$ & $1.27$ & $0.210$ & $2048*$ \\% Hy2048b_noshock2
;B & $0.20$ & $ 2.5$ & $0.010$ & $14.4$ & $0.049$ & $1.40$ & $0.130$ & $2.0$ & $ 40$ & $0.0170$ & $0.093$ & $0.084$ & $0.69$ & $1.13$ & $0.230$ & $2048$ \\% Hy2048a_noshock
;C & $0.20$ & $ 2.5$ & $0.010$ & $14.0$ & $0.044$ & $1.30$ & $0.120$ & $3.7$ & $ 40$ & $0.0140$ & $0.092$ & $0.086$ & $0.64$ & $1.09$ & $0.190$ & $1024$ \\% Hy1024b_noshock
;D & $0.20$ & $ 2.5$ & $0.014$ & $10.9$ & $0.044$ & $1.20$ & $0.085$ & $2.6$ & $ 28$ & $0.0054$ & $0.088$ & $0.064$ & $0.69$ & $1.02$ & $0.170$ & $1024$ \\% Hy1024c_noshock
;E & $0.20$ & $ 2.5$ & $0.020$ & $ 8.4$ & $0.045$ & $1.00$ & $0.061$ & $1.8$ & $ 20$ & $0.0027$ & $0.120$ & $0.086$ & $0.66$ & $0.93$ & $0.120$ & $1024$ \\% Hy1024a_noshock
;F & $0.20$ & $ 2.5$ & $0.020$ & $ 8.4$ & $0.045$ & $1.00$ & $0.069$ & $3.5$ & $ 20$ & $0.0028$ & $0.120$ & $0.088$ & $0.63$ & $0.97$ & $0.140$ & $ 512$ \\% Hy512d_noshock
;G & $0.20$ & $ 2.5$ & $0.030$ & $ 6.2$ & $0.047$ & $0.87$ & $0.048$ & $2.2$ & $ 13$ & $0.0024$ & $0.160$ & $0.120$ & $0.61$ & $0.88$ & $0.096$ & $ 512$ \\% Hy512e_noshock
;H & $0.20$ & $ 2.5$ & $0.040$ & $ 5.1$ & $0.051$ & $0.80$ & $0.034$ & $0.9$ & $ 10$ & $0.0019$ & $0.170$ & $0.130$ & $0.60$ & $0.82$ & $0.062$ & $1024$ \\% Hy1024d_noshock
;I & $0.20$ & $ 2.5$ & $0.040$ & $ 5.1$ & $0.050$ & $0.79$ & $0.038$ & $1.7$ & $ 10$ & $0.0020$ & $0.180$ & $0.140$ & $0.60$ & $0.84$ & $0.069$ & $ 512$ \\% Hy512g_noshock
;J & $0.10$ & $ 2.5$ & $0.020$ & $ 7.3$ & $0.027$ & $0.79$ & $0.013$ & $3.5$ & $ 20$ & $0.0000$ & $0.007$ & $0.005$ & $0.73$ & $0.86$ & $0.034$ & $ 512$ \\% Hy512d_noshock_ampl01
;K & $0.05$ & $ 2.5$ & $0.020$ & $ 6.8$ & $0.020$ & $0.71$ & $0.004$ & $3.4$ & $ 20$ & $0.0000$ & $0.000$ & $0.000$ & $0.74$ & $0.87$ & $0.009$ & $ 512$ \\% Hy512d_noshock_ampl005
;L & $0.20$ & $ 2.5$ & $0.020$ & $ 6.6$ & $0.002$ & $0.75$ & $0.180$ & $1.1$ & $ 20$ & $0.0270$ & $0.440$ & $0.370$ & $0.41$ & $0.92$ & $0.250$ & $ 512$ \\% Hy512d_noshock_nopretend2
;M & $0.20$ & $ 5.0$ & $0.020$ & $ 7.3$ & $0.027$ & $0.80$ & $0.032$ & $3.4$ & $ 10$ & $0.0046$ & $0.230$ & $0.170$ & $0.33$ & $0.89$ & $0.029$ & $ 512$ \\% Hy512d_noshock_k10
;N & $0.20$ & $10.0$ & $0.020$ & $ 6.7$ & $0.019$ & $0.70$ & $0.011$ & $3.3$ & $  5$ & $0.0033$ & $0.260$ & $0.210$ & $0.09$ & $0.74$ & $0.004$ & $ 512$ \\% Hy512d_noshock_k20
;O & $0.20$ & $ 2.5$ & $0.010$ & $13.9$ & $0.043$ & $1.40$ & $0.130$ & $7.2$ & $ 40$ & $0.0079$ & $0.082$ & $0.320$ & $0.12$ & $0.52$ & $0.043$ & $ 512*$ \\% Hy512h_noshock2
;P & $0.20$ & $ 5.0$ & $0.010$ & $12.0$ & $0.024$ & $1.00$ & $0.062$ & $6.9$ & $ 20$ & $0.0180$ & $0.160$ & $0.370$ & $0.27$ & $0.51$ & $0.011$ & $ 512*$ \\% Hy512h_noshock_k10
;Q & $0.20$ & $10.0$ & $0.010$ & $10.1$ & $0.012$ & $0.78$ & $0.027$ & $6.7$ & $ 10$ & $0.0150$ & $0.240$ & $0.270$ & $0.13$ & $0.64$ & $0.007$ & $ 512*$ \\% Hy512h_noshock_k20
;
good=[0,2,3,5,6] & bad=[1,4]
good=[1,3,4,6,8] & bad=[2,5,8] & upw=[0,13,14,15] & high=[7,7]
; high means that the standard resolution is here compared with a run of higher resolution.
; bad means that it is compared with a run of lower resolution.
;
;-----------------------------------------------------------------------------
;  panel 1
;
!x.title='!6'
!y.title='!6contributions'
xr=[.006,.12]
xr=[.004,.12]
yr=[.0014,.3]
yr=[.0014,1.3]
circ_sym,1.3,0
plot_oo,nu,ratm,ps=8,xr=xr,yr=yr,/nodata
circ_sym,1.3,1
loadct,6
oplot,nu(good),genmax(good),ps=8,col=144
xyouts,siz=siz,.05,.190,'!8T!6!dgen0!n',col=144
loadct,5
oplot,nu(good),dismax(good),ps=8,col=55
oplot,nu(good),dynmax(good),ps=8,col=122
;
circ_sym,1.3,0
loadct,6
oplot,nu(bad),genmax(bad),ps=8,col=144
loadct,5
oplot,nu(bad),dismax(bad),ps=8,col=55
oplot,nu(bad),dynmax(bad),ps=8,col=122
;
ps=1 & fact=1.0 & fact3=1.03
loadct,6
oplot,nu(upw)*fact3,genmax(upw),ps=ps,col=144
loadct,5
oplot,nu(upw)*fact,dismax(upw),ps=ps,col=55
oplot,nu(upw)*fact,dynmax(upw),ps=ps,col=122
;
ps=4 & symsiz=1.4 & fact2=.96
loadct,6
oplot,nu(high)*fact2,genmax(high),ps=ps,col=144
loadct,5
oplot,nu(high)*fact2,dismax(high),ps=ps,col=55
oplot,nu(high)*fact2,dynmax(high),ps=ps,col=122
;
siz=1.6
xyouts,siz=siz,.05,.002,'!8T!6!ddyn0!n',col=122
xyouts,siz=siz,.05,.100,'!8T!6!ddis0!n',col=55
xyouts,xout,.65,siz=siz,'!6(a)'
;
;-----------------------------------------------------------------------------
;  panel 2
;
!x.title='!7m!6'
!y.title='!6ratios'
;xr=[.005,.12]
yr=[.04,1.5]
circ_sym,1.3,1
plot_oo,nu(good),ratm(good),ps=8,xr=xr,yr=yr
oplot,nu(good),ratm2(good),ps=8,col=155 & loadct,6
oplot,nu(good),ratdx(good),ps=8,col=144 & loadct,5
oplot,nu(good),ratmd(good),ps=8,col=122
circ_sym,1.3,0
oplot,nu(bad),ratm(bad),ps=8
oplot,nu(bad),ratm2(bad),ps=8,col=155 & loadct,6
oplot,nu(bad),ratdx(bad),ps=8,col=144 & loadct,5
oplot,nu(bad),ratmd(bad),ps=8,col=122
;
ps=1
oplot,nu(upw)*fact,ratm(upw),ps=ps
oplot,nu(upw)*fact,ratm2(upw),ps=ps,col=155 & loadct,6
oplot,nu(upw)*fact,ratdx(upw),ps=ps,col=144 & loadct,5
oplot,nu(upw)*fact,ratmd(upw),ps=ps,col=122
;
ps=4
oplot,nu(high)*fact2,ratm(high),ps=ps,symsiz=symsiz
oplot,nu(high)*fact2,ratm2(high),ps=ps,symsiz=symsiz,col=155 & loadct,6
oplot,nu(high)*fact2,ratdx(high),ps=ps,symsiz=symsiz,col=144 & loadct,5
oplot,nu(high)*fact2,ratmd(high),ps=ps,symsiz=symsiz,col=122
;
siz=1.6
xyouts,siz=siz,.05,.920,'!8R!6!dgen2!n',col=155
xyouts,siz=siz,.05,.660,'!8R!6!dgen1!n'
xyouts,siz=siz,.05,.050,'!8R!6!ddyn1!n',col=122 & loadct,6
xyouts,siz=siz,.05,.48,'!8R!6!ddyn2!n',col=144 & loadct,5
xx=[.008,.045] & oplot,xx,.0026/xx,col=122
xyouts,siz=siz,.025,.13,'!9A!7m!6!u-1!n',col=122
;
loadct,6
xx=[.008,.045] & oplot,xx,2.0*xx^.4,col=144,li=1
print,.6*xx^.5
xyouts,siz=siz,.025,.30,'!9A!7m!6!u0.4!n',col=144
loadct,5
xyouts,xout,1.05,siz=siz,'!6(b)'
;
;-----------------------------------------------------------------------------
;  produce table
;
urms=1. ;(sonic)
fo='(f5.3)'
fo1='(f3.1)'
fo1b='(f4.1)'
fo2='(f4.2)'
fo4='(f6.4)'
fo_int='(i4)'
fo_int2='(i3)'
for j=0,n_elements(nu)-1 do begin
  dx=4*!pi/Nmesh[j]
  print,uppercase(j), ' & ', latex_fixed(uini[j],fo2), $
                      ' & ', latex_fixed(k0[j],fo1b), $
                      ' & ', latex_fixed(nu[j],fo), $
                      ' & ', latex_fixed(knu[j],fo1b), $
                      ' & ', latex_fixed(epsK[j],fo), $
                      ' & ', latex_fixed(divurms[j],fo2), $
                      ' & ', latex_fixed(orms[j],fo), $
                      ' & ', latex_fixed(umax[j]*dx/nu[j],fo1),  $
                      ' & ', latex_fixed(urms/(nu[j]*k0[j]),fo_int2),  $
                      ' & ', latex_fixed(dynmax[j],fo4),  $
                      ' & ', latex_fixed(genmax[j],fo),  $
                      ' & ', latex_fixed(dismax[j],fo),  $
                      ' & ', latex_fixed_ordash(ratm[j],fo2,ratm[j] ge 99.),  $
                      ' & ', latex_fixed_ordash(ratm2[j],fo2,ratm2[j] ge 99.),  $
                      ' & ', latex_fixed(ratmd[j],fo),  $
                      ' & ', latex_fixed_ast(Nmesh[j],lupw[j], fo_int), $
                      ' \\% ',c[j]
endfor
;
!p.multi=0
print,"$mv idl.ps ~/Overleaf/Eva/BE_collapse/fig/pres.eps"
END
