#!/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 || $5x == x) then
        echo "This script creates a cross-section of EPV, RH, frontogenesis"
	echo "and theta-E from the two end points specified PT1 PT2."
	echo "thta_xs."
	echo " " 
	echo "Syntax:  look_epvft YYMMDDHH FHR MDL PT1 PT2                      "
	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 "         PT1 The left point of the cross-section.  You can use a"
        echo "         station ID or a lat-lon."
        echo " "
        echo "         PT2 The right point of the cross-section."
        echo " " 
	echo "   Example:  look_epvft 96102912 F12 eta MKC YWG                "
	echo " "
	echo "   This create a cross-section from Kansas City to Winnepeg."
	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
set CXSTNS = ${4}">"${5}

echo ${CXSTNS}

    
 gdcross << EOF
 res $GEMNTS/epv2
 CXSTNS   = $CXSTNS
 GDFILE   = $GEMFIL
 GDATTIM  = $GEMDAT
 r

 res $GEMNTS/thteovly2
 CXSTNS   = $CXSTNS
 GDFILE   = $GEMFIL
 GDATTIM  = $GEMDAT
 r
    
 res $GEMNTS/frntovly2
 CXSTNS = $CXSTNS
 GDFILE = $GEMFIL
 GDATTIM = $GEMDAT
 r

 res $GEMNTS/rhovly
 CXSTNS = $CXSTNS
 GDFILE = $GEMFIL
 GDATTIM = $GEMDAT
 r

exit

EOF

echo " "
echo "********************************"
echo "*** TYPE gpend WHEN FINISHED ***"
echo "********************************"

exit
