#!/bin/csh
#
# This script runs the Movesmrg report post-processor, which takes the daily onroad reports
# output by Movesmrg and creates a series of monthly and annual reports by state, county,
# state/SCC, and county/SCC.

# Root directory where you unzipped all .zips
setenv INSTALL_DIR "/sol/work/EMIS/users/cvy/for_package"

setenv BASE_YEAR 2014
setenv GRID 12US2
setenv EMF_SPC cmaq_cb6cmaq
setenv CASE 2014fa_nata_cb6cmaq_14j
setenv PROJECT_ROOT $INSTALL_DIR/$CASE
setenv DAYS_PER_RUN 1 # How many days were in each Movesmrg instance? Set to same setting that was used when running onroad

# Molecular weight file for converting moles to mass
setenv MW $INSTALL_DIR/smoke4.5/scripts/annual_report/parameter_file_${EMF_SPC}.txt

mkdir -p $PROJECT_ROOT/reports/annual_report

setenv SECTOR onroad_ca_adj_cb6orig

./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPH -l -w $MW
./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPP -l -w $MW
./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPV -l -w $MW
./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPD -l -w $MW

setenv SECTOR onroad_cb6orig

./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPH -l -w $MW
./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPP -l -w $MW
./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPV -l -w $MW
./smoke_moves2014_reports_smk40_12apr2016.py -d $DAYS_PER_RUN -r RPD -l -w $MW
