#  UTILITY SCRIPT NAME :  fsnt05tx.sh
#               AUTHOR :  Hua-Lu pan
#         DATE WRITTEN :  11/25/96
#
#  Abstract:  This utility script produces the fsnt05tx
#             bulletins, from the GFS forecast fields
#
#     Input:  none
#             This job requires the presence of the 65x65 GRIB file
#             for hour 72.  The 65x65 Grib file is produced one step
#             above this utility in job 675.
#
echo "History: SEPT    1996 - First implementation of this utility script"
#

set -xa

if test "${cycle}" = 't00z'
then

  export pgm=fsnt05tx
  . prep_step

  cp $COMIN/${RUN}.${cycle}.grb65f72 GRB65F72
  cp $COMIN/${RUN}.${cycle}.grb65if72 GRB65iF72

  export XLFUNIT_11="GRB65F72"
  export XLFUNIT_31="GRB65iF72"
  export XLFUNIT_88="fsnt5.bul"

  $EXECbulls/fsnt05tx >> $pgmout 2 > errfile
  export err=$?; err_chk

  msg="fsnt05.bul successfully made"
  postmsg "$jlogfile" "$msg"



#  fsnt5=fsnt5.bul

############################################
#  Send bulletin through dbNet
############################################

  if test "$SENDCOM" = 'YES'
  then
    cp fsnt5.bul $pcom/fsnt5.bul.$job
  fi

  if test "$SENDDBN" = 'YES'
  then
     $USHutil/make_ntc_bull.pl  WMOBH NONE KWNO NONE    \
         fsnt5.bul     $pcom/fsnt5.bul.$job 
  fi   


else
  echo "#############################"
  echo ' fsnt05tx is only run at 00Z'
  echo "#############################"
fi

exit
