#! /bin/bash # invoke gnuplot to plot selected decomp/biomass variables from 'crp1.btmp' # invocation: decomp [simulation days] # e.g. 'decomp 5000' displays output for the first 5000 days of the simulation. # 'decomp' displays output for all days of the simulation. plotfile=plot.tmp pauseval=-1 echo reset > $plotfile echo "set terminal pdf" >> $plotfile echo "set output 'decomp.pdf'" >> $plotfile pauseval=0 echo "set title 'Stem area index of all standing pools" >> $plotfile echo "set ylabel 'SAI (m2/m2)'" >> $plotfile echo "plot '${1}crp1.btmp' using 47 with lines,\\" >> $plotfile echo " '${2}crp1.btmp' using 47 with lines" >> $plotfile echo "pause $pauseval" >> $plotfile echo "set title 'Number of standing stems, all pools'" >> $plotfile echo "set ylabel 'Number of stems (#/m2)'" >> $plotfile echo "plot '${1}crp1.btmp' using 57 with lines,\\" >> $plotfile echo " '${2}crp1.btmp' using 57 with lines" >> $plotfile echo "pause $pauseval" >> $plotfile echo "set title 'Number of standing stems, pool 1'" >> $plotfile echo "set ylabel 'Number of stems (#/m2)'" >> $plotfile echo "plot '${1}crp1.btmp' using 54 with lines,\\" >> $plotfile echo " '${2}crp1.btmp' using 54 with lines" >> $plotfile echo "pause $pauseval" >> $plotfile gnuplot $plotfile rm $plotfile