#! /bin/csh

set input  = 250m_1346-345_1356-350.dat
set output = 250m_1346-345_1356-350_relief.ps
set lonmin = 134.6
set lonmax = 135.6
set latmin =  34.5
set latmax =  35.0
set scale  = 20
set xshift = 4.0
set yshift = 4.0

set dlon   =  0.00312500
set dlat   =  0.00208333
set angle  = 30.
set tmp1   = 250m.grd
set tmp2   = 250m.grad
set tmp3   = 250m.hst1
set tmp4   = 250m.hst2
set fcolor = color1.cpt

surface $input -G$tmp1 -R$lonmin/$lonmax/$latmin/$latmax -I$dlon/$dlat\
 -T0.0 -Ll-9.0

grdgradient $tmp1 -A$angle -G$tmp2 -V
grdhisteq $tmp2 -G$tmp3 -N -V
grdmath $tmp3 3. / = $tmp4

grdimage $tmp1 -Jm$scale -R$lonmin/$lonmax/$latmin/$latmax -Ba0.50.f0.25\
 -C$fcolor -I$tmp4 -X$xshift -Y$yshift >! $output

\rm $tmp1
\rm $tmp2
\rm $tmp3
\rm $tmp4


