# Shell Script: processCD.sh
# Created by Erik Johnson July 2007
# Last Modified 9/4/07 by Erik Johnson
# This script can be used to process a raw Cape Dorset data file.
# The default day is the current UTC day.
YEAR=`date -u +%Y`
YY=`date -u +%y`
DAY=`date -u +%j`
# If the day you want to process is not the current day, remove the comments from this section and change YEAR and DAY to the day you want to process.
# YEAR=2007
# DAY=242
CDdir='/Volumes/physics_data/Ftp/MACCS_DATA/Raw/CD/Iridium/'${YEAR}'ir/'
CDAdir='/Volumes/physics_data/Ftp/MACCS_DATA/AugASCII/CD/'${YEAR}'ir/'
cd $CDdir
if [ -f "CD${YY}${DAY}.dat" ]; then
echo "Processing CD${YY}${DAY}.dat"
idl << END_SCRIPT
.compile /Volumes/physics_data/Code/MACCS_Code/IridiumMaccs2.pro
IridiumMaccs2, "CD${YY}${DAY}.dat"
.compile /Volumes/physics_data/Code/MACCS_Code/IridiumMaccs3.pro
IridiumMaccs3, "CD${YY}${DAY}.dat"
exit
END_SCRIPT
cd $CDAdir
echo "Plotting ${CDAdir}CD${YY}${DAY}.dat"
idl << END_SCRIPT
.compile /Volumes/physics_data/Code/MACCS_Code/linex7.pro
linex7,"CD${YY}${DAY}.dat",0,0,0,0,0,0,"cd",0,1,1,"","","","","","",5,2,0,0
exit
END_SCRIPT
fi

