From 4ef2152483e31aff29ce903701f63b0e66618aa1 Mon Sep 17 00:00:00 2001 From: George Gayno Date: Thu, 14 Oct 2021 20:10:04 +0000 Subject: [PATCH] Generalize the scripts and start testing them from chgres_cube. Fixes #574. --- reg_tests/{global_cycle => }/check.sh | 0 reg_tests/chgres_cube/25km.conus.gfs.grib2.sh | 3 +++ reg_tests/chgres_cube/25km.conus.gfs.pbgrib2.sh | 3 +++ reg_tests/chgres_cube/driver.wcoss_dell_p3.sh | 10 +++++++++- reg_tests/global_cycle/C768.fv3gfs.sh | 2 +- reg_tests/global_cycle/C768.lndincsnow.sh | 2 +- reg_tests/global_cycle/C768.lndincsoil.sh | 2 +- reg_tests/global_cycle/driver.wcoss_dell_p3.sh | 2 +- reg_tests/{global_cycle => }/update.sh | 2 +- 9 files changed, 20 insertions(+), 6 deletions(-) rename reg_tests/{global_cycle => }/check.sh (100%) rename reg_tests/{global_cycle => }/update.sh (96%) diff --git a/reg_tests/global_cycle/check.sh b/reg_tests/check.sh similarity index 100% rename from reg_tests/global_cycle/check.sh rename to reg_tests/check.sh diff --git a/reg_tests/chgres_cube/25km.conus.gfs.grib2.sh b/reg_tests/chgres_cube/25km.conus.gfs.grib2.sh index 61bbe7e50..ee0fbf97b 100755 --- a/reg_tests/chgres_cube/25km.conus.gfs.grib2.sh +++ b/reg_tests/chgres_cube/25km.conus.gfs.grib2.sh @@ -80,6 +80,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 25-KM CONUS GFS GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update.sh $HOMEreg "25km_conus_gfs_grib2" $commit_num + fi else echo "<<< 25-KM CONUS GFS GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/25km.conus.gfs.pbgrib2.sh b/reg_tests/chgres_cube/25km.conus.gfs.pbgrib2.sh index bb23c3004..5be4f3df8 100755 --- a/reg_tests/chgres_cube/25km.conus.gfs.pbgrib2.sh +++ b/reg_tests/chgres_cube/25km.conus.gfs.pbgrib2.sh @@ -79,6 +79,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 25-KM CONUS GFS PGRIB2+BGRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update.sh $HOMEreg "25km_conus_gfs_pbgrib2" $commit_num + fi else echo "<<< 25-KM CONUS GFS PGRIB2+BGRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh b/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh index 20cc13003..48b4d0135 100755 --- a/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh +++ b/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh @@ -40,9 +40,14 @@ PROJECT_CODE="${PROJECT_CODE:-GFS-DEV}" # and baseline data for each test. #----------------------------------------------------------------------------- +#export UPDATE_BASELINE="FALSE" +export UPDATE_BASELINE="TRUE" + +source ../check.sh + export HOMEufs=$PWD/../.. -export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/chgres_cube +export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/chgres_cube.test SUM_FILE=summary.log @@ -63,6 +68,9 @@ export OMP_NUM_THREADS=1 bsub -e $LOG_FILE -o $LOG_FILE -q $QUEUE -P $PROJECT_CODE -J chgres01 -W 0:05 -x -n 6 \ -R "span[ptile=6]" -R "affinity[core(${OMP_NUM_THREADS}):distribute=balance]" "$PWD/25km.conus.gfs.grib2.sh" + +exit + #----------------------------------------------------------------------------- # Initialize CONUS 3-KM USING HRRR GRIB2 file WITH GFS PHYSICS. #----------------------------------------------------------------------------- diff --git a/reg_tests/global_cycle/C768.fv3gfs.sh b/reg_tests/global_cycle/C768.fv3gfs.sh index f737e3ba7..cb724cace 100755 --- a/reg_tests/global_cycle/C768.fv3gfs.sh +++ b/reg_tests/global_cycle/C768.fv3gfs.sh @@ -71,7 +71,7 @@ if [ $test_failed -ne 0 ]; then echo "<<< C768 GLOBAL CYCLE TEST FAILED. >>>" echo "*********************************" if [ "$UPDATE_BASELINE" = "TRUE" ]; then - $BASE_GSM/reg_tests/global_cycle/update.sh $HOMEreg "c768.fv3gfs" $commit_num + $BASE_GSM/reg_tests/update.sh $HOMEreg "c768.fv3gfs" $commit_num fi else echo diff --git a/reg_tests/global_cycle/C768.lndincsnow.sh b/reg_tests/global_cycle/C768.lndincsnow.sh index 4a9313a82..fb6d88deb 100755 --- a/reg_tests/global_cycle/C768.lndincsnow.sh +++ b/reg_tests/global_cycle/C768.lndincsnow.sh @@ -76,7 +76,7 @@ if [ $test_failed -ne 0 ]; then echo "<<< C768 LANDINC SNOW CYCLE TEST FAILED. >>>" echo "****************************************" if [ "$UPDATE_BASELINE" = "TRUE" ]; then - $BASE_GSM/reg_tests/global_cycle/update.sh $HOMEreg "c768.lndincsnow" $commit_num + $BASE_GSM/reg_tests/update.sh $HOMEreg "c768.lndincsnow" $commit_num fi else echo diff --git a/reg_tests/global_cycle/C768.lndincsoil.sh b/reg_tests/global_cycle/C768.lndincsoil.sh index bb9dc2912..c06f346b8 100755 --- a/reg_tests/global_cycle/C768.lndincsoil.sh +++ b/reg_tests/global_cycle/C768.lndincsoil.sh @@ -78,7 +78,7 @@ if [ $test_failed -ne 0 ]; then echo "<<< C768 LANDINC SOILT CYCLE TEST FAILED. >>>" echo "*****************************************" if [ "$UPDATE_BASELINE" = "TRUE" ]; then - $BASE_GSM/reg_tests/global_cycle/update.sh $HOMEreg "c768.lndincsoil" $commit_num + $BASE_GSM/reg_tests/update.sh $HOMEreg "c768.lndincsoil" $commit_num fi else echo diff --git a/reg_tests/global_cycle/driver.wcoss_dell_p3.sh b/reg_tests/global_cycle/driver.wcoss_dell_p3.sh index 4ca8f6985..be3a97c2c 100755 --- a/reg_tests/global_cycle/driver.wcoss_dell_p3.sh +++ b/reg_tests/global_cycle/driver.wcoss_dell_p3.sh @@ -37,7 +37,7 @@ QUEUE="${QUEUE:-dev}" #export UPDATE_BASELINE="FALSE" export UPDATE_BASELINE="TRUE" -source check.sh +source ../check.sh DATA_DIR="${WORK_DIR}/reg-tests/global-cycle" diff --git a/reg_tests/global_cycle/update.sh b/reg_tests/update.sh similarity index 96% rename from reg_tests/global_cycle/update.sh rename to reg_tests/update.sh index d060703b4..73cee4714 100755 --- a/reg_tests/global_cycle/update.sh +++ b/reg_tests/update.sh @@ -18,7 +18,7 @@ fi mkdir -p $base_dir_commit -for files in *tile*.nc +for files in *.nc do if [ -f $files ]; then cp $files $base_dir_commit