#!/bin/csh
#
#  Example:
#     restart-new-dir ../hydro256e
#
#  copies all files necessary for restarting into the
#  existing directory tree underneath $1
#
#  save name of old directory
#
set olddir=`pwd`
set newdir=$1
#
#  goto new directory and prepare data/allprocs
#
cd $newdir/data
mkdir allprocs
(echo "restart-new-dir: from " $olddir; /bin/date) >> data/new_from.dir
cd $olddir
(echo "restart-new-dir: to " $newdir; /bin/date) >> data/new_to.dir
#
#  copy from old to new run directory
#
cp data/param* $1/data
cp data/allprocs/grid.dat $1/data/allprocs
pc_copyvar v v $newdir -s -e