#!/bin/bash #------------------------------------------------------------------------------ # Harvard University Atmospheric Chemistry Modeling Group ! #------------------------------------------------------------------------------ #BOP # # !MODULE: copy_1yr_transport_bm # # !DESCRIPTION: Copy the 1-year Transport Tracers benchmark run directory so # that it can be copied to the permanent storage site on gcgrid. #\\ #\\ # !CALLING SEQUENCE: # ./copy_1yr_transport_bm VERSION # # # !EXAMPLE: # ./copy_1yr_transport_bm GC_12.2.0 # # !REMARKS: # # !REVISION HISTORY: # 25 Jan 2018 - M. Sulprizio- Initial version #EOP #------------------------------------------------------------------------------ #BOC # Make sure the version string is passed if [ $# != 1 ]; then echo "Usage: copy_1mon VERSION" exit 0 fi # Set variables version=$1 run='TransportTracers' dir="/n/holylfs/EXTERNAL_REPOS/GEOS-CHEM/gcgrid/geos-chem/1yr_benchmarks/GC_12/$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 Tracer Transport 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_transport_bm echo " " echo "===========================================================" echo "Done copying Tracer Transport 1-year benchmark run directory" echo " " echo "*** REMINDER ***" echo " - Update README file to reflect version updates" echo "===========================================================" # Exit normally exit 0 #EOC