#!/bin/bash #------------------------------------------------------------------------------ # Harvard University Atmospheric Chemistry Modeling Group ! #------------------------------------------------------------------------------ #BOP # # !MODULE: copy_1mon # # !DESCRIPTION: Copies the 1-month benchmark run directories to GcGrid for # permanent storage. This will sync with the AS ftp site approximately every # hour so that the GEOS-Chem Steering Committee and developers can examine # outputs from the 1-month benchmark simulations in a browser. #\\ #\\ # !CALLING SEQUENCE: # ./copy_1month VERSION # # !REVISION HISTORY: # See the GEOS-Chem UnitTest git history #EOP #------------------------------------------------------------------------------ #BOC # Make sure the version string is passed if [ $# != 1 ]; then echo "Usage: copy_1mon VERSION" exit 0 fi #---------------------------------------------------------------------------- # Copy output to gcgrid for permanent storage #---------------------------------------------------------------------------- # Set variables version=$1 dir="/n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/geos-chem/1mo_benchmarks/GC_13/$version/GCClassic/" if [[ ! -d "$dir" ]]; then echo "Directory does not exist. Check path!" echo $dir exit 1 fi echo "=======================================================================" echo "Copying 1-month benchmark output to $dir" echo "=======================================================================" echo " " # Copy entire contents of 1-month benchmark run directory cp -av ../GCC_$version/* $dir # Remove files and directories not needed for permanent storage rm -v $dir/gcclassic rm -rf $dir/CodeDir # Copy select files from build process mkdir $dir/cmake_build cp $dir/build/CMakeCache.txt $dir/cmake_build/ cp $dir/build/CMakeFiles/CMakeOutput.log $dir/cmake_build/ rm -rf $dir/build mv $dir/cmake_build $dir/build # Change group name of new directories and files chgrp jacob_gcst $dir chgrp jacob_gcst $dir/* chgrp jacob_gcst $dir/OutputDir/* chgrp jacob_gcst $dir/BenchmarkPlots/* chgrp jacob_gcst $dir/BenchmarkPlots/*/* chgrp jacob_gcst $dir/build chgrp jacob_gcst $dir/build/* # Change permissions of new directory and files chmod 775 $dir chmod 664 $dir/* chmod 775 $dir/OutputDir chmod 664 $dir/OutputDir/* chmod 775 $dir/Plots chmod 775 $dir/BenchmarkResults/* chmod 664 $dir/BenchmarkResults/*/* chmod 664 $dir/BenchmarkResults/*txt chmod 664 $dir/BenchmarkResults/*yml chmod 775 $dir/build chmod 664 $dir/build/* chmod 775 $dir/getRunInfo chmod 775 $dir/GCC_$version.run # Print reminders to screen echo " " echo "=======================================================================" echo "Done copying 1-month benchmark output to $dirn" echo " " echo "*** REMINDERS ***" echo " - Update README file to reflect current version" echo "=======================================================================" # Clear variables unset version unset dir # Exit normally exit 0 #EOC