
#  UTILITY SCRIPT NAME :  mkwintem.sh
#               AUTHOR :  Hua-Lu Pan
#         DATE WRITTEN :  02/03/97
#
#  Abstract:  This utility script produces the wind temp
#             bulletins, from the GFS forecast fields.
#
#     Input:  none
#
echo "History: February 1997 - First implementation of this utility script"
#

set -xa

export pgm=wintemv
. prep_step

if test ! -f pgrbf06
then
   cp $COMIN/gfs.${cycle}.pgrbf06 pgrbf06
   cp $COMIN/gfs.${cycle}.pgrbif06 pgrbif06
fi
if test ! -f pgrbf12
then
   cp $COMIN/gfs.${cycle}.pgrbf12 pgrbf12
   cp $COMIN/gfs.${cycle}.pgrbif12 pgrbif12
fi
if test ! -f pgrbf18
then
   cp $COMIN/gfs.${cycle}.pgrbf18 pgrbf18
   cp $COMIN/gfs.${cycle}.pgrbif18 pgrbif18
fi
if test ! -f pgrbf24
then
   cp $COMIN/gfs.${cycle}.pgrbf24 pgrbf24
   cp $COMIN/gfs.${cycle}.pgrbif24 pgrbif24
fi

cp $PARMutil/bulls_wkeysb wkeysb
export XLFUNIT_11="pgrbf06"
export XLFUNIT_12="pgrbf12"
export XLFUNIT_13="pgrbf18"
export XLFUNIT_14="pgrbf24"
export XLFUNIT_31="pgrbif06"
export XLFUNIT_32="pgrbif12"
export XLFUNIT_33="pgrbif18"
export XLFUNIT_34="pgrbif24"
export XLFUNIT_51="wintemv.bul"
$EXECbulls/wintemv < wkeysb >> $pgmout 2>errfile
export err=$?; err_chk

####################################################################

  if test $SENDCOM = 'YES'
  then
    cp wintemv.bul $pcom/wintemv.tran.$job

# Add an entry to the OSO status file.

    if test $SENDDBN = 'YES'
    then
       $USHutil/make_ntc_bull.pl  WMONV NONE KWNO NONE   \
               wintemv.bul   $pcom/wintemv.tran.$job    
    fi
  fi

###################################################################

