#!/bin/sh
#
#  UTILITY SCRIPT NAME :  exenswafs.sh.sms
#               AUTHOR :  Boi Vuong
#         DATE WRITTEN :  02/14/2002
#
# This script sets up a poe script to run in parallel to 
#      create WAFS (grid 37-44) from the Global Ensemble data. 
#

########################################
set -x
msg="Begin job for $job"
postmsg "$jlogfile" "$msg"
########################################

cd $DATA

#####################################
# Create a script to be poe script
#####################################

echo ${USHutil}/mkenswafs.sh  \"37 38\"  >> $DATA/poescript
echo ${USHutil}/mkenswafs.sh  \"39 40\"  >> $DATA/poescript
echo ${USHutil}/mkenswafs.sh  \"41 42\"  >> $DATA/poescript
echo ${USHutil}/mkenswafs.sh  \"43 44\"  >> $DATA/poescript

chmod 775 $DATA/poescript
export MP_PGMMODEL=mpmd
export MP_CMDFILE=$DATA/poescript
#
# Execute the script.
poe
export err=$?; err_chk

#####################################################################
# GOOD RUN
set +x
echo "**************JOB ENS-WAFS COMPLETED NORMALLY on the IBM-SP"
echo "**************JOB ENS-WAFS COMPLETED NORMALLY on the IBM-SP"
echo "**************JOB ENS-WAFS COMPLETED NORMALLY on the IBM-SP"
set -x
#####################################################################

exit
