# UTILITY SCRIPT NAME : mkprsdiff.sh
#              AUTHOR : Bill Facey
#
# ABSTRACT : This utility script creates a 12 hr mean sea level pressure 
#            Redbook graphic for AWIPS from the current and previous nam 
#            analysis.
#
set -x

export pgm=prsdiff 
. prep_step

export XLFUNIT_12=grb5fmm12
export XLFUNIT_22=grb5fmm12i
export XLFUNIT_13=grb5fm00                     
export XLFUNIT_23=grb5fm00i                   
export XLFUNIT_51=prsdiff_gribfile

startmsg
$EXECgraph/prsdiff >> $pgmout 2>errfile
export err=$?;err_chk

/nwprod/util/exec/grbindex prsdiff_gribfile prsdiff_igribfile
export err=$?;err_chk

AFOSTHOUT=afos.eta_12hrmslp_chng
#
export pgm=afosmakr
. prep_step

export XLFUNIT_11=prsdiff_gribfile
export XLFUNIT_30=$PARMgraph/graph_afosmakr.prsdiff.$job
export XLFUNIT_31=prsdiff_igribfile
export XLFUNIT_47=ncepdate
export XLFUNIT_48=$FIXgraph/graph_pillist1
export XLFUNIT_49=$FIXgraph/graph_awpseed
export XLFUNIT_51=afostemp
export XLFUNIT_61=$AFOSTHOUT

startmsg
$EXECgraph/afosmakr >> $pgmout  2> errfile
export err=$?;err_chk

##########################################################
#  Convert the AFOS 90C to Redbook graphics and send to
#  AWIPS
##########################################################
export futilities=$USHutil
export member=afstoawp.sh
pils='90C'
$USHutil/afstoawp.sh $AFOSTHOUT "${pils}"

exit

