#!/bin/csh -f

echo '----- hello.'
echo ''
echo '---- the setup of gcmfaces and profilesMatlabProcessing will start'
echo '---- by downloading the files from the MITgcm cvs server (in 5 sec)'
echo ''
sleep 5
#echo '---- just type cvsanon as the cvs login password'
echo 'type "return"'
 
setenv CVSROOT ":pserver:cvsanon@mitgcm.org:/u/gcmpack"
cvs login << EOF
cvsanon

EOF

cvs co -d gcmfaces MITgcm_contrib/gael/matlab_class
cvs co -d profilesMatlabProcessing MITgcm_contrib/gael/profilesMatlabProcessing

echo ''
echo '---- then we will download sample inputs to test run the codes (in 5 sec)'
sleep 5

wget http://mitgcm.org/~gforget/sample_input.tar.gz
gunzip sample_input.tar.gz
tar xvf sample_input.tar
mv sample_input gcmfaces/.
rm -f sample_input.tar

echo ''
echo '---- Your turn.'
echo ''
echo '---- To finish the initialization process, start matlab, then'
echo '---- (1) type "cd gcmfaces" and "gcmfaces_init"'
echo '---- This makes a few demo plots, that you will close afterwards.'
echo '---- (2) type "cd ../profilesMatlabProcessing" and "profiles_process_init"'
echo '---- This processes sample in-situ data files to the MITprof format.'
echo ''
echo '---- Once those two programs have run succesfully, you should be all set.'
echo ''
echo '---- To be able to use the packages in future matlab sessions, you will'
echo '---- need the lines that were added to your path during this one.'
echo '---- For example, you may want to copy those lines to your startup.m file.'

echo ''
echo ''
echo '---- bye.' 


