#####################################################################
echo "------------------------------------------------"
echo "NAM/GFS postprocessing"
echo "------------------------------------------------"
echo "History: July 2007 - First implementation of this new script."
#####################################################################

set -x

msg="Begin job for $job"
postmsg "$jlogfile" "$msg"

cd $DATA

        # Call snmap to generate the GIF image for this map background and level.

        $GEMEXE/snmap << EOF_SNMAP
        CLEAR=YES
        DATTIM=${cyc}00
        SNFILE=snedit.gem
	AREA=dset
        GAREA=${garea}
        SNPARM=BRBK;TMPC;;STDZ;;DPDC;STNM
        LEVELS=${level}
        VCOORD=PRES
        COLORS=26;2;7;22;18
        MAP=1//0.75
        MSCALE=0
        PROJ=MER//0;3;0;3
        DEVICE=gif | ${giffil} | 1280; 1024
        LATLON=${latlon}/2/0.75
        TITLE=1/0/${footer_date} NOAA/NWS/NCEP
        TEXT=.8/2/2/c/sw
        r

        e
EOF_SNMAP

        # Call snmap a second time to add the title to the GIF image.

        $GEMEXE/snmap << EOF_SNMAP
        CLEAR=NO
        SNPARM=
        LATLON=0
        TITLE=1/2/~ ${model_caps} ${level} MB ${title_caps}
        TEXT=.8/2/2/c/sw
        r

        e
EOF_SNMAP

        $GEMEXE/gpend

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

msg="HAS COMPLETED NORMALLY!"
echo $msg
postmsg "$jlogfile" "$msg"

############## END OF SCRIPT #######################
