#! /bin/csh

#copy the CGIAR files over from DEM_Copy_2
#not necessary to do every time if not changed

set cgiarPath = '/Volumes/DEM_Copy_2/DEM/CGIAR'
set cgiarPath = '/Volumes/publicSonarData/DEM/CGIAR/'

echo "copying CGIAR GRD from "$cgiarPath" to ../cgiar/grd"

if (! -d "$cgiarPath") then
       echo; echo; echo "ERROR: $cgiarPath is not mounted" ; 
		echo; echo; echo "ABORTING..."; echo; echo; exit 1
endif
 
rm -rf ../cgiar/grd
mkdir -p ../cgiar/grd
find "$cgiarPath" -name "*.grd" -exec ./renameGrd.sh '{}' ../cgiar/grd \;

