@parameters
spawn,"sed.csh data/param2.nml"
print,"$sed.csh data/param2.nml"
;default,xr_pe,[1.0,1.6]
default,taver1,1.02
default,kf,600.
circ_sym,1.3,1
pc_read_ts,o=ts
pc_read_param,o=param,/param2
default,xr_pe,[1.,max(ts.t)]
!p.multi=[0,1,3]
;
;  kinetic or magnetic?
;
default,kin,0
if kin then EEKM=ts.EEK else EEKM=ts.EEM
good=where(ts.t ge taver1)
it2=min(good)
tend=ts.t[it2]
;
plot,ts.t,EEKM,yst=0,xr=xr_pe
imax=(where(EEKM eq max(EEKM)))[0]
n2=n_elements(EEKM)-1
EEKMmax=max(EEKM[(imax-1)>0:(imax+1)<n2])
EEKMend=EEKM[it2]
tmax=ts.t[imax]
oplot,[1,1]*tmax,[1,1]*EEKMmax,col=122,ps=8
oplot,[1,1]*tend,[1,1]*EEKMend,col=55,ps=8
;
plot,ts.t,ts.EEGW,xr=xr_pe
EEGWm=mean(ts.EEGW(good))
oplot,ts.t(good),ts.t(good)*0.+EEGWm,col=122
;
plot,ts.t,ts.hrms,xr=xr_pe
hrmsm=mean(ts.hrms(good))
oplot,ts.t(good),ts.t(good)*0.+hrmsm,col=122
;
nu=param.nu
default,lforce,1
if lforce then force=param.force else force=0.
;
cwd,run
fo="(e7.1, e8.1, e9.2, e9.2, e9.2, f6.2, i4,2x, a)"
openw,1,'.tmp'
printf,1,force,nu,EEKMmax,EEGWm,hrmsm,tmax,kf,run,fo=fo
close,1
spawn,'cat .tmp'
spawn,'cat .tmp >> ../idl/pe.txt'
print,EEKMend,fo=fo
!p.multi=0
END
