#!/bin/csh
# run a sequence of simulations 1 week 1 month 3 months and annuall
# and use extract.
echo $1
echo "spring week s4 simulation with small_office_shd_daily.cfg"
date
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p spr_s4 silent
echo "starting extact..."
date
./extract small_office_shd_spr_s4_emb.res
echo "finished spring week"
echo "  "
echo "jan-feb s4 simulation with small_office_shd_daily.cfg"
date
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p win1_s4 silent
echo "starting extact..."
date
./extract small_office_shd_jan-feb_s4_emb.res
date
echo "finished jan-feb months"
echo "  "
echo "summer s4 simulation with small_office_shd_daily.cfg"
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p sum_s4 silent
date
echo "starting extact..."
./extract small_office_shd_sum_s4_emb.res
echo "finished summer"
echo "  "
echo "annual s4 simulation with small_office_shd_daily.cfg"
date
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p annual_s4 silent
date
echo "starting extact..."
./extract small_office_shd_annual_s4_emb.res
date
echo "finished annual"
echo "Compressing results files..."
xz -v *.res
xz -v ../tmp/*.res
echo "  "
echo "jan-feb 20 tsph simulation with small_office.cfg"
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p janfeb20 silent
echo "starting extact..."
date
./extract small_office_shd_janfeb20_emb.res
date
echo "finished jan-feb months"
echo "  "
date
echo "summer 20 tsph simulation with small_office_shd_daily.cfg"
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p summer20 silent
date
echo "starting extact..."
./extract small_office_shd_summer20_emb.res
date
echo "finished summer"
echo "  "
echo "annual 20 tsph simulation with small_office_shd_daily.cfg"
date
&>/dev/null time bps -mode text -file small_office_shd_daily.cfg -p annual20 silent
date
echo "starting extact..."
./extract small_office_shd_annual20_emb.res
date
echo "finished annual"


