# badNA.sh
# This script moves the current day's raw and processed NA files to the Problem_Data/ folders.
# It also adds a warning to iridiumtoday.html that there is a problem with the NA data.
# It can also be used to move other day's files to the Problem_Data/ folders.
# Written By Erik Johnson 8/29/2007
# Last Modified 9/4/07
YEAR=`date -u +%Y`
YY=`date -u +%y`
DAY=`date -u +%j`
DAY=189
NAdir='/Volumes/physics_data/Ftp/MACCS_DATA/Raw/NA/Iridium/'${YEAR}'ir/'
NAAdir='/Volumes/physics_data/Ftp/MACCS_DATA/AugASCII/NA/'${YEAR}'ir/'
NAIdir='/Volumes/physics_data/Ftp/MACCS_DATA/IAGA2000/NA/'${YEAR}'ir/'
NALdir='/Volumes/physics_data/Ftp/MACCS_DATA/LinePlots/PostScript/NA/'${YEAR}'ir/'
NAL2dir='/Volumes/physics_data/Ftp/MACCS_DATA/LinePlots/PNG/NA/'${YEAR}'ir/'
NAPdir='/Volumes/physics_data/Ftp/MACCS_DATA/Raw/NA/Iridium/'${YEAR}'ir/Problem_Data/'
NAAPdir='/Volumes/physics_data/Ftp/MACCS_DATA/AugASCII/NA/'${YEAR}'ir/Problem_Data/'
NAIPdir='/Volumes/physics_data/Ftp/MACCS_DATA/IAGA2000/NA/'${YEAR}'ir/Problem_Data/'
NALPdir='/Volumes/physics_data/Ftp/MACCS_DATA/LinePlots/PostScript/NA/'${YEAR}'ir/Problem_Data/'
NAL2Pdir='/Volumes/physics_data/Ftp/MACCS_DATA/LinePlots/PNG/NA/'${YEAR}'ir/Problem_Data/'
# Move DAY's NA files to Problem_Data folders
mv ${NAdir}NA${YY}${DAY}.dat ${NAPdir}NA${YY}${DAY}.dat
mv ${NAAdir}NA${YY}${DAY}.dat ${NAAPdir}NA${YY}${DAY}.dat
mv ${NAIdir}NA${YY}${DAY}.dat ${NAIPdir}NA${YY}${DAY}.dat
mv ${NALdir}na${YY}${DAY}.ps ${NALPdir}na${YY}${DAY}.ps
mv ${NAL2dir}na${YY}${DAY}.png ${NAL2Pdir}na${YY}${DAY}.png
# Changes the iridium today website to the version with the NA warning
# Remove the comment symbols from this section if the new data is bad and the warning has not been added to the website
# Add the comment symbols back after running
# To remove the warning, run goodNAtoday.sh
# cd /Library/WebServer/Documents/space/
# mv iridiumtoday.html iridiumtoday.html.good
# mv iridiumtoday.html.badNA iridiumtoday.html

