#! /bin/sh

if [ -z "$1"  ]
then echo 'usage: ttime.sh [run number]'
     exit 1
fi

grep 'TIME=' exout | sed 's/TIME=//' > fort.13
grep 'External source of thermal energy' exout | sed 's/External source of thermal energy   =//' >> fort.13

ln -s $1.prof.0 fort.50
ln -s $1.prof.3600 fort.51
ln -s $1.prof.7200 fort.52
ln -s $1.prof.10800 fort.53
ln -s $1.prof.14400 fort.54
ln -s $1.prof.18000 fort.55
ln -s $1.prof.21600 fort.56
ln -s $1.prof.25200 fort.57
ln -s $1.prof.28800 fort.58
ln -s $1.prof.32400 fort.59
ln -s $1.prof.36000 fort.60
ln -s $1.prof.39600 fort.61
ln -s $1.prof.43200 fort.62
ln -s $1.prof.46800 fort.63
ln -s $1.prof.50400 fort.64
ln -s $1.prof.54000 fort.65
ln -s $1.prof.57600 fort.66
ln -s $1.prof.61200 fort.67
ln -s $1.prof.64800 fort.68
ln -s $1.prof.68400 fort.69
ln -s $1.prof.72000 fort.70
ln -s $1.prof.75600 fort.71
ln -s $1.prof.79200 fort.72
ln -s $1.prof.82800 fort.73
ln -s $1.prof.86400 fort.74

./qvtend

rm fort*

exit 0





