#!/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/holylfs/EXTERNAL_REPOS/GEOS-CHEM/gcgrid/geos-chem/1mo_benchmarks/GC_12/$version/GCC/" echo "=======================================================================" echo "Copying 1-month benchmark output to $dir" echo "=======================================================================" echo " " # Copy entire contents of 1-month benchmark run directory cp -av ../../GC_$version/* $dir # Remove files and directories not needed for permanent storage rm -v $dir/geos.mp rm -v $dir/validate.pl rm -rf $dir/CodeDir # 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/Plots/* chgrp jacob_gcst $dir/Plots/*/* # 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/Plots/* chmod 664 $dir/Plots/*/* chmod 664 $dir/Plots/*pdf chmod 664 $dir/Plots/*txt chmod 664 $dir/Plots/*json chmod 664 $dir/Plots/input.1mon chmod 664 $dir/Plots/*results* chmod 775 $dir/getRunInfo chmod 775 $dir/Makefile chmod 775 $dir/$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 " - Copy results files from UT to output directory" echo "=======================================================================" # Clear variables unset version unset dir # Exit normally exit 0 #EOC