#!/bin/csh
#SBATCH -p singlepe
#SBATCH -t 24:00:00
#SBATCH -n 1
#SBATCH -c 1
#SBATCH --gid=romo
#SBATCH --account=romo



setenv ALT_AGL 1  #1=above ground level 0=above sea level

setenv GRID 36US3
setenv YEAR 2023

foreach CASE ( base2023  )

set OUTDIR = /work/ROMO/lrt/cmaq/$GRID/postp/$CASE
set INDIR = $OUTDIR

foreach mon ( 01 02 03 04 05 06 07 08 09 10 11 12 )


# =====================================================================
#> CALC_TMETRIC Configuration Options
# =====================================================================

#> operation to perform - SUM (default) or AVG
 setenv OPERATION AVG
# setenv OPERATION SUM

#> list of species to output - set to "ALL" to process all species from INFILE, or list species to process
#> the output variable names will have the ${OPERATION} value (SUM or AVG) appended to the input variable names
# setenv SPECIES_1 ALL
 setenv SPECIES_1 O3
 setenv SPECIES_2 PM25
 setenv SPECIES_3 FORM
 setenv SPECIES_4 PAN

 setenv M3_FILE_1  $INDIR/dailyavg.${YEAR}${mon}.$GRID.$CASE.ncf
 setenv OUTFILE $OUTDIR/tcalc.${YEAR}${mon}.$GRID.$CASE.ncf
 rm -rf $OUTFILE

/work/MOD3EVAL/kbaker/projects/cmaq/v5.5public/POST/calc_tmetric/scripts/BLD_calc_tmetric_v55_intel21.4/calc_tmetric_v55.exe

end
end

exit()
