#!/bin/csh -f
#
# This command file will create a surface map for the specified forecast hour and model 
# on X windows.
#
# Philip Schumacher	12/96
#
# Check if a data has been input.  If not print instructions.
if ($1x == x || $2x == x || $3x == x || $4x == x) then
        echo "This script creates a height, temperatures and winds    "
	echo "for a map centered on North Dakota."
	echo "look_upa"
	echo " " 
	echo "Syntax:  look_upa YYMMDDHH FHR MDL LVL                         "
	echo " "
	echo "  where:                                               "
	echo "         YYMMDDHH is the year, month, day and hour of the model "
	echo "         to be examined       "
	echo " "
	echo "         FHR is the forecast hour of the map to be created " 
        echo " "
        echo "         MDL is the model to look at (in small letters)"
	echo "         ngm, ruc, avn, eta                            "
        echo " "
        echo "         LVL is the pressure level you want to look at "
        echo " " 
	echo "   Example:  look_upa 96102912 F12 eta 850                  "
	echo " "
	echo "   This create an 850 mb map from the 29th of the month at 12Z"
	exit

endif

# Set up the name of the ASCII model file.

set GEMDAT = ${2}
set GEMFIL = $METDAT/gempak/grids/${1}_${3}.gem 
#set GEMFIL = /usr2/phil/oct29/gempak/surface/${1}_sao.gem
echo ${GEMFIL}

# Now run sfmap to create quadrant 1

    
 gdplot << EOF
 res $GEMNTS/lookupa
 GDFILE   = $GEMFIL
 GDATTIM  = $GEMDAT
 GLEVEL = ${4}
 r
   
exit
exit

EOF

echo `********************************`
echo `*** TYPE gpend WHEN FINISHED ***'
echo `********************************`

exit
