#!/bin/bash #------------------------------------------------------------------------------ # Harvard University Atmospheric Chemistry Modeling Group ! #------------------------------------------------------------------------------ #BOP # # !MODULE: copy_1yr_rnpbbe # # !DESCRIPTION: Copy the 1-year Rn-Pb-Be benchmark run directory so that it can # be copied to the permanent storage site on gcgrid. #\\ #\\ # !CALLING SEQUENCE: # ./copy_1yr_rnpbbe VERSION RUN# # # # !EXAMPLE: # ./copy_1yr_rnpbbe v11-02e RnPbBePasv-Run0 # # !REMARKS: # # !REVISION HISTORY: # 25 Jan 2018 - M. Sulprizio- Initial version #EOP #------------------------------------------------------------------------------ #BOC # Make sure the version string is passed if [ $# != 2 ]; then echo "Usage: copy_1mon VERSION Run#" exit 0 fi # Set variables version=$1 run=$2 dir="/n/holylfs/EXTERNAL_REPOS/GEOS-CHEM/gcgrid/geos-chem/1yr_benchmarks/v11-02/$version/" # Make the directory if it does not exist if [ ! -d $dir ]; then echo "Creating $dir" mkdir $dir chgrp jacob_gcst $dir chmod 775 $dir fi echo "=======================================================================" echo "Copying 1-year Rn-Pb-Be-Pasv benchmark run directory to $dir" echo "=======================================================================" echo " " # Copy entire contents of 1-month benchmark run directory cp -avL ../../$run $dir # Change group name of new directories and files chgrp jacob_gcst $dir$run chgrp jacob_gcst $dir$run/* chgrp jacob_gcst $dir$run/*/* chgrp jacob_gcst $dir$run/*/output/* # Change permissions of new directories and files chmod 775 $dir$run chmod 775 $dir$run/* chmod 664 $dir$run/*/* chmod 775 $dir$run/*/output chmod 664 $dir$run/*/output/* chmod 775 $dir$run/*/*_1yr_rnpbbe echo " " echo "===========================================================" echo "Done copying Rn-Pb-Be-Pasv 1-year benchmark run directory" echo " " echo "*** REMINDER ***" echo " - Update README file to reflect version updates" echo "===========================================================" # Exit normally exit 0 #EOC