diff --git a/reg_tests/grid_gen/c96.uniform.sh b/reg_tests/grid_gen/c96.uniform.sh index 72e4f90f9..6811c71af 100755 --- a/reg_tests/grid_gen/c96.uniform.sh +++ b/reg_tests/grid_gen/c96.uniform.sh @@ -55,6 +55,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 UNIFORM TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "c96.uniform" $commit_num + fi else echo "<<< C96 UNIFORM TEST PASSED. >>>" fi diff --git a/reg_tests/grid_gen/driver.wcoss_dell_p3.sh b/reg_tests/grid_gen/driver.wcoss_dell_p3.sh index 3def7e696..0f1152768 100755 --- a/reg_tests/grid_gen/driver.wcoss_dell_p3.sh +++ b/reg_tests/grid_gen/driver.wcoss_dell_p3.sh @@ -35,6 +35,11 @@ export WORK_DIR="${WORK_DIR}/reg-tests/grid-gen" # Should not have to change anything below here. #----------------------------------------------------------------------------- +#export UPDATE_BASELINE="FALSE" +export UPDATE_BASELINE="TRUE" + +source ../get_hash.sh + LOG_FILE=consistency.log SUM_FILE=summary.log export home_dir=$PWD/../.. @@ -42,7 +47,7 @@ export APRUN=time export APRUN_SFC="mpirun -l" export OMP_STACKSIZE=2048m export machine=WCOSS_DELL_P3 -export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/grid_gen/baseline_data +export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/grid_gen.test/baseline_data export OMP_NUM_THREADS=24 rm -fr $WORK_DIR @@ -57,6 +62,9 @@ ulimit -s unlimited bsub -e $LOG_FILE -o $LOG_FILE -q $QUEUE -P $PROJECT_CODE -J c96.uniform -W 0:15 -x -n 24 \ -R "span[ptile=24]" -R "affinity[core(1):distribute=balance]" "$PWD/c96.uniform.sh" + +exit + #----------------------------------------------------------------------------- # C96 uniform grid using viirs vegetation type data. #----------------------------------------------------------------------------- diff --git a/reg_tests/update_baseline.sh b/reg_tests/update_baseline.sh index 73cee4714..0c4777c14 100755 --- a/reg_tests/update_baseline.sh +++ b/reg_tests/update_baseline.sh @@ -13,6 +13,9 @@ chmod 755 $base_dir if [ -d $base_dir_commit ];then chmod 777 $base_dir_commit + if [ -d $base_dir_commit/fix_sfc ]; then + chmod 777 $base_dir_commit/fix_sfc + fi rm -fr $base_dir_commit fi @@ -26,6 +29,22 @@ do fi done +# The grid_gen tests have a subdirectory for +# the surface climo fields. + +if [ -d ./fix_sfc ]; then + mkdir -p $base_dir_commit/fix_sfc + cd fix_sfc + for files in *.nc + do + if [ -f $files ]; then + cp $files $base_dir_commit/fix_sfc + chmod 444 $base_dir_commit/fix_sfc/$files + fi + done + chmod 555 $base_dir_commit/fix_sfc +fi + chmod 555 $base_dir_commit rm -f $base_dir/$test_name cd $base_dir