#!/bin/bash

#set -x
ACONC_size=4374120672
Complete_day=0

year=2016
days=(31 28 31 30 31 30 31 31 30 31 30 31)

# loop for month
OUT_DIR=/glade/scratch/chengpin/CMAQ_REPO/data/output/201601_rkp/201601_R225/
cd ${OUT_DIR}
for day in $(seq -f "%02g" 1 31)
do
    acsize=$(stat -c%s CCTM_ACONC_v532_intel_TW2020_201601${day}_R225.nc)
    if [ "${acsize}" -eq "${ACONC_size}" ]; then
        Complete_day=$((Complete_day+1))
    else
        echo "File size does not match on 201601${day}_R225 ..."
        break;
    fi
done
    
if [ "$Complete_day" -eq "31" ]; then
    echo "201601_R225 simulations finished successfully!"
fi
