#! /bin/csh -f

set subDir = grd

set dir1 = /Users/jbecker/Desktop/SRTM15+V7/$subDir
set dir2 = /Volumes/ucsdBathymetryCode/jj\ original\ from\ Speedy\ Chef/Desktop/SRTM15+/SRTM15+V7/$subDir
set dir2 = /Users/jbecker/Desktop/topex

echo "$dir1"
echo "$dir2"

foreach file1 (`ls $dir1/*.grd`)
	set stem = `basename $file1`
#	echo $stem
	grdmath $dir1/$stem $dir1/$stem SUB = /tmp/$stem.diff.grd
	grdinfo /tmp/$stem.diff.grd | grep z_min
end
