#!/bin/bash #------------------------------------------------------------------------------ # Harvard University Atmospheric Chemistry Modeling Group ! #------------------------------------------------------------------------------ #BOP # # !MODULE: copy_1yr_run # # !DESCRIPTION: Copy the 1-year benchmark run directory so that it can # be copied to the permanent storage site on gcgrid. #\\ #\\ # !CALLING SEQUENCE: # ./copy_1yr_run VERSION RUN# # # # !EXAMPLE: # ./copy_1yr_run v11-02d 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 benchmark run directory to $dir$version" 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/output/* chgrp jacob_gcst $dir$run/output/*/* # Change permissions of new directories and files chmod 775 $dir$run chmod 664 $dir$run/* chmod 775 $dir$run/output chmod 775 $dir$run/output/* chmod 664 $dir$run/output/*.txt chmod 664 $dir$run/output/*/* chmod 775 $dir$run/*_1yr_run echo " " echo "===========================================================" echo "Done copying 1-year benchmark run directory" echo " " echo "*** REMINDER ***" echo " - Update README file to reflect version updates" echo "===========================================================" # Exit normally exit 0 #EOC