# --- 08/05/96 -------- EXRW0.SH SCRIPT ----------------------------
#
set +x
#  Document the HISTORY of script modifications

echo  "REVISED: TUESDAY June 9,  1997  - initial implementation."
echo  "REVISED: August 07, 1997 - Added the dump of data at 00-21"
echo  "                           every three hours."
echo  "REVISED: 30 July 1998 - Removed definition of PDY, this is"
echo  "                        now done in the J-job."
set -x
 
cd $DATA
 
set +x
echo '------------------------------------------------------'
echo "              IBM SP $envir PROCESSING                "
echo "      `date`      "
echo "     JOB WW0CARD$cyc   CYCLE TIME IS  ... $cycle"
echo ' '
echo ' $VARIABLE info for this execution:'
echo " Processing executable environment is ............ $envir"
echo " Temporary processing file directory is .......... $DATA"
echo " unique machine processing id is ................. $pid"
echo "________________________________________________"
set -x
 
cd $DATA   

#################################################################
# For the first set of times of this case statement, we are
# executing a dump of data 65 minutes after data time.
# This dump will be used by the surface analysis script 
# RW1, RW2, RW3, and RW4 to use 1 hour old data when there 
# is insufficient current data.

# For the second set of times of this case statement, we execute
# the cardinal utility that prepares an inventory of 00Z/12Z
# upper air reports. This cardinal script runs in RW1, RW2, and RW0
# at certain times as below.
#################################################################
set -x

case $ztime in

 00|03|06|09|12|15|18|21)  $USHutil/exrwdump.sh $cyc
                           ;;
                   01|13)  sh $USHutil/cardinal.sh $MAPHOUR
                           ;;
                       *)  echo "Problems in CASE statement"
                           ;;
esac

############################################3
msg='JOB COMPLETED NORMALLY'
postmsg "$jlogfile" "$msg"
############################################3

set +x
echo " ***** RAW $cyc PROCESSING COMPLETED NORMALLY *****"
echo " ***** RAW $cyc PROCESSING COMPLETED NORMALLY *****"
set -x

# ---------------END OF EXCARD SCRIPT ----------------------------
