#!/bin/bash
ncpus="32"    #hardcoded for conrad
mpiprocs="32" #set from 1-32 for conrad

whichrun=2    #1=15km, 2=02km
sim="02km.mnt2.dst2.sst1"

if [ $whichrun -eq 1 ]; then #For Initial/Hist Run, DX=15km, 432x432x50 Grid points
 walltimexfer="002:00:00"
elif [ $whichrun -eq 2 ]; then #For Initial/Hist Run, DX=2km, 950x950x50 Grid points
 walltimexfer="006:00:00"
fi

runxfer="x.runxfer."${sim}
outdir="a.${sim}"

####################################################################################
#Transfer HDF5 output files
###################################################################################
if [ -f ${runxfer} ]; then rm -f ${runxfer}; fi
cat > ${runxfer} << END
#!/bin/bash
#PBS -A ONRDC39385461
#PBS -l select=1:ncpus=1
#PBS -l walltime=${walltimexfer}
#PBS -q transfer
#PBS -N y.transfer.${sim}
#PBS -j oe
#PBS -m be
#PBS -M smsaleeb@gmail.com
cd ${WORKDIR}
rsync -avz ${outdir} smsaleeb@floyd.atmos.colostate.edu:/blizzard/smsaleeb/run.dust
END
qsub ${runxfer}
