#!/bin/csh

#---------------------------------------------------------------------
# This makes a regional radar composite GIF from a WSI NOWrad file.
#
# Requirements:
#
# GEMPAK
#	http://my.unidata.ucar.edu/content/software/gempak/index.html
#
# Download and install GEMPAK first.
# As with any GEMPAK program you must set some environmental
# variables before executing gpmap. 
# Locate Gemenviron file and source it.  This will tell your shell 
# where to find gpmap.
#
# For example:
#
# % source /sharp/ahijevyc/GEMPAK5.6/Gemenviron
#
#---------------------------------------------------------------------
#
# Usage: wsi_plot.csh filename
#
# For example:
#
# % wsi_plot.csh ./20040411.2200.MASTER15
#
# Creates regional radar composite GIF for 11 April, 2004, 22UTC.
#
#---------------------------------------------------------------------
#
# You may change the plot region by altering GAREA = lat1;lon1;lat2;lon2
# below. These are the lat/lon boundaries.
#
#---------------------------------------------------------------------


# Read 1st argument ($1), replacing 'MASTER15' suffix with 'gif'.
# Change 'my_region' to whatever you want, e.g. 'cent_plains'. 

set outfile = my_region`basename $1 MASTER15`gif


# Create input for gpmap.
gpmap<<END_INPUT
 MAP      = 23
 \$MAPFIL  =
 GAREA    = 24.4;-125.0; 50.3; -66.5
 PROJ     = sat
 LUTFIL   = wsi_mosaic.tbl
 SATFIL   = $1
 DEVICE   = GIF|$outfile
 STNPLT   = 
 TITLE    = 31/-2
 LATLON   = 0
 TEXT     = 1/3/1/hw
 CLEAR    = YES
 LINE     = 3
 IMBAR    = 1/ / /0.0;0.1/0.8;/|0.7/3/1/hw
r

exit
END_INPUT

# Finish job.
gpend
