#!/bin/csh -f

## Input settings
setenv PT_OILGAS_INLN /proj/ie/proj/SMOKE/htran/training_20231003/2018gg_18j/smoke_out/2018gg_18j/12LISTOS/cmaq_cb6ae7/pt_oilgas/inln_mole_pt_oilgas_20180806_12LISTOS_cmaq_cb6ae7_2018gg_18j.ncf
setenv PT_OILGAS_STKG /proj/ie/proj/SMOKE/htran/training_20231003/2018gg_18j/smoke_out/2018gg_18j/12LISTOS/cmaq_cb6ae7/pt_oilgas/stack_groups_pt_oilgas_12LISTOS_2018gg_18j.ncf

setenv PTEGU_INLN /proj/ie/proj/SMOKE/htran/training_20231003/2018gg_18j/smoke_out/2018gg_18j/12LISTOS/cmaq_cb6ae7/ptegu/inln_mole_ptegu_20180806_12LISTOS_cmaq_cb6ae7_2018gg_18j.ncf
setenv PTEGU_STKG /proj/ie/proj/SMOKE/htran/training_20231003/2018gg_18j/smoke_out/2018gg_18j/12LISTOS/cmaq_cb6ae7/ptegu/stack_groups_ptegu_12LISTOS_2018gg_18j.ncf

setenv INTERMDIR      /proj/ie/proj/SMOKE/htran/training_20231003/2018gg_18j/intermed/mrgpt
rm -rf $INTERMDIR/*

setenv FILELIST_INLN  $INTERMDIR/FILELIST_INLN
setenv FILELIST_E     $FILELIST_INLN

if (-e $FILELIST_INLN ) rm $FILELIST_INLN
echo PTEGU_INLN     >> $FILELIST_INLN
echo PT_OILGAS_INLN >> $FILELIST_INLN

setenv FILELIST_STACK $INTERMDIR/FILELIST_STACK
setenv FILELIST_S     $FILELIST_STACK

if (-e $FILELIST_STACK) rm $FILELIST_STACK
echo PTEGU_STKG     >> $FILELIST_STACK
echo PT_OILGAS_STKG >> $FILELIST_STACK

## If using emission control, otherwise comment the next 3 lines out
setenv ADJ_FACS $INTERMDIR/ADJ_FACS
if (-e $ADJ_FACS) rm $ADJ_FACS
echo "NO, PTEGU_INLN, 1.5" >> $ADJ_FACS


## Output settings
setenv LOGFILE       $INTERMDIR/LOGFILE
setenv OUTFILE_INLN  $INTERMDIR/OUTFILE_INLN
setenv OUTFILE_E     $OUTFILE_INLN
setenv OUTFILE_STACK $INTERMDIR/OUTFILE_STACK
setenv OUTFILE_S     $OUTFILE_STACK
setenv REPMRGGRID    $INTERMDIR/REPMRGGRID
setenv REPMERG_ADJ   $INTERMDIR/REPMERG_ADJ
setenv CREATE_REPORT Y
setenv REPORT_BY_STATE $INTERMDIR/REPORT_BY_STATE

#setenv MRG_DIFF_DAYS Y # Currently has no effect

## Run program
setenv SMOKE_BIN /proj/ie/proj/SMOKE/htran/SMOKE_DEV/Linux2_x86_64ifort

setenv PROMPTFLAG  FALSE
$SMOKE_BIN/mrgpt
