diff --git a/reg_tests/chgres_cube/13km.conus.nam.grib2.sh b/reg_tests/chgres_cube/13km.conus.nam.grib2.sh index 7d97800db..f293f3874 100755 --- a/reg_tests/chgres_cube/13km.conus.nam.grib2.sh +++ b/reg_tests/chgres_cube/13km.conus.nam.grib2.sh @@ -82,6 +82,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 13-KM CONUS NAM GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "13km_conus_nam_grib2" $commit_num + fi else echo "<<< 13-KM CONUS NAM GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/13km.conus.rap.grib2.sh b/reg_tests/chgres_cube/13km.conus.rap.grib2.sh index 1fa10c20b..4c4f6df8b 100755 --- a/reg_tests/chgres_cube/13km.conus.rap.grib2.sh +++ b/reg_tests/chgres_cube/13km.conus.rap.grib2.sh @@ -90,6 +90,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 13-km CONUS RAP W/ GSD PHYSICS AND SFC FROM FILE GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "13km_conus_rap_grib2" $commit_num + fi else echo "<<< 13-km CONUS RAP W/ GSD PHYSICS AND SFC FROM FILE GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/13km.na.gfs.ncei.grib2.sh b/reg_tests/chgres_cube/13km.na.gfs.ncei.grib2.sh index c98df7122..b8122703c 100755 --- a/reg_tests/chgres_cube/13km.na.gfs.ncei.grib2.sh +++ b/reg_tests/chgres_cube/13km.na.gfs.ncei.grib2.sh @@ -79,6 +79,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 13-KM NA GFS NCEI GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "13km_na_gfs_ncei_grib2" $commit_num + fi else echo "<<< 13-KM NA GFS NCEI GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/25km.conus.gfs.grib2.sh b/reg_tests/chgres_cube/25km.conus.gfs.grib2.sh index 61bbe7e50..10ead8ce6 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_baseline.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..d56ebeef1 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_baseline.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/3km.conus.hrrr.gfssdf.grib2.sh b/reg_tests/chgres_cube/3km.conus.hrrr.gfssdf.grib2.sh index abfea41cb..f9cf35edc 100755 --- a/reg_tests/chgres_cube/3km.conus.hrrr.gfssdf.grib2.sh +++ b/reg_tests/chgres_cube/3km.conus.hrrr.gfssdf.grib2.sh @@ -84,6 +84,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 3-km CONUS HRRR W/ GFS PHYSICS GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "3km_conus_hrrr_gfssdf_grib2" $commit_num + fi else echo "<<< 3-km CONUS HRRR W/ GFS PHYSICS GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/3km.conus.hrrr.newsfc.grib2.sh b/reg_tests/chgres_cube/3km.conus.hrrr.newsfc.grib2.sh index de24e72b4..4f26a3f2d 100755 --- a/reg_tests/chgres_cube/3km.conus.hrrr.newsfc.grib2.sh +++ b/reg_tests/chgres_cube/3km.conus.hrrr.newsfc.grib2.sh @@ -90,6 +90,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< 3-km CONUS HRRR W/ GSD PHYSICS AND SFC FROM FILE GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "3km_conus_hrrr_newsfc_grib2" $commit_num + fi else echo "<<< 3-km CONUS HRRR W/ GSD PHYSICS AND SFC FROM FILE GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c192.fv3.history.sh b/reg_tests/chgres_cube/c192.fv3.history.sh index 44fd8ae81..7bb587ff6 100755 --- a/reg_tests/chgres_cube/c192.fv3.history.sh +++ b/reg_tests/chgres_cube/c192.fv3.history.sh @@ -72,6 +72,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C192 FV3 HISTORY TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c192_fv3_history" $commit_num + fi else echo "<<< C192 FV3 HISTORY TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c192.gfs.grib2.sh b/reg_tests/chgres_cube/c192.gfs.grib2.sh index 5b8cf2bac..6d6e0cba5 100755 --- a/reg_tests/chgres_cube/c192.gfs.grib2.sh +++ b/reg_tests/chgres_cube/c192.gfs.grib2.sh @@ -67,6 +67,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C192 GFS GRIB2 TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c192_gfs_grib2" $commit_num + fi else echo "<<< C192 GFS GRIB2 TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.fv3.nemsio.sh b/reg_tests/chgres_cube/c96.fv3.nemsio.sh index e0271c15b..7a6463f70 100755 --- a/reg_tests/chgres_cube/c96.fv3.nemsio.sh +++ b/reg_tests/chgres_cube/c96.fv3.nemsio.sh @@ -63,6 +63,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 FV3 GAUSSIAN NEMSIO TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_fv3_nemsio" $commit_num + fi else echo "<<< C96 FV3 GAUSSIAN NEMSIO TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.fv3.netcdf.sh b/reg_tests/chgres_cube/c96.fv3.netcdf.sh index 4f5618737..acd21c81d 100755 --- a/reg_tests/chgres_cube/c96.fv3.netcdf.sh +++ b/reg_tests/chgres_cube/c96.fv3.netcdf.sh @@ -64,6 +64,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 FV3 GAUSSIAN NETCDF TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_fv3_netcdf" $commit_num + fi else echo "<<< C96 FV3 GAUSSIAN NETCDF TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.fv3.netcdf2wam.sh b/reg_tests/chgres_cube/c96.fv3.netcdf2wam.sh index 7adf8f04b..74f301f87 100755 --- a/reg_tests/chgres_cube/c96.fv3.netcdf2wam.sh +++ b/reg_tests/chgres_cube/c96.fv3.netcdf2wam.sh @@ -71,6 +71,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 FV3 GAUSSIAN NETCDF2WAM TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_fv3_netcdf2wam" $commit_num + fi else echo "<<< C96 FV3 GAUSSIAN NETCDF2WAM TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.fv3.restart.sh b/reg_tests/chgres_cube/c96.fv3.restart.sh index bcc38ea44..c4f8ca95b 100755 --- a/reg_tests/chgres_cube/c96.fv3.restart.sh +++ b/reg_tests/chgres_cube/c96.fv3.restart.sh @@ -73,6 +73,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 FV3 RESTART TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_fv3_restart" $commit_num + fi else echo "<<< C96 FV3 RESTART TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.gfs.nemsio.sh b/reg_tests/chgres_cube/c96.gfs.nemsio.sh index 36ea52843..a965bfa10 100755 --- a/reg_tests/chgres_cube/c96.gfs.nemsio.sh +++ b/reg_tests/chgres_cube/c96.gfs.nemsio.sh @@ -67,6 +67,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 GFS GAUSSIAN NEMSIO TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_gfs_nemsio" $commit_num + fi else echo "<<< C96 GFS GAUSSIAN NEMSIO TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.gfs.sigio.sh b/reg_tests/chgres_cube/c96.gfs.sigio.sh index b04765603..daf1145c9 100755 --- a/reg_tests/chgres_cube/c96.gfs.sigio.sh +++ b/reg_tests/chgres_cube/c96.gfs.sigio.sh @@ -69,6 +69,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 GFS SIGIO TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_gfs_sigio" $commit_num + fi else echo "<<< C96 GFS SIGIO TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/c96.regional.sh b/reg_tests/chgres_cube/c96.regional.sh index 8cde6a50a..b4807aa5e 100755 --- a/reg_tests/chgres_cube/c96.regional.sh +++ b/reg_tests/chgres_cube/c96.regional.sh @@ -72,6 +72,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 REGIONAL TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_regional" $commit_num + fi else echo "<<< C96 REGIONAL TEST PASSED. >>>" fi diff --git a/reg_tests/chgres_cube/driver.hera.sh b/reg_tests/chgres_cube/driver.hera.sh index dd911d241..d95cbadf9 100755 --- a/reg_tests/chgres_cube/driver.hera.sh +++ b/reg_tests/chgres_cube/driver.hera.sh @@ -44,6 +44,13 @@ QUEUE="${QUEUE:-batch}" # and baseline data for each test. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEufs=$PWD/../.. export HOMEreg=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/chgres_cube diff --git a/reg_tests/chgres_cube/driver.jet.sh b/reg_tests/chgres_cube/driver.jet.sh index f1eb2e1a4..4b7a29786 100755 --- a/reg_tests/chgres_cube/driver.jet.sh +++ b/reg_tests/chgres_cube/driver.jet.sh @@ -45,6 +45,13 @@ export HDF5_DISABLE_VERSION_CHECK=2 # and baseline data for each test. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEufs=$PWD/../.. export HOMEreg=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/chgres_cube diff --git a/reg_tests/chgres_cube/driver.orion.sh b/reg_tests/chgres_cube/driver.orion.sh index 53da13cfc..bfa1c543c 100755 --- a/reg_tests/chgres_cube/driver.orion.sh +++ b/reg_tests/chgres_cube/driver.orion.sh @@ -44,6 +44,13 @@ QUEUE="${QUEUE:-batch}" # and baseline data for each test. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEufs=$PWD/../.. export HOMEreg=/work/noaa/nems/role-nems/ufs_utils/reg_tests/chgres_cube diff --git a/reg_tests/chgres_cube/driver.wcoss_cray.sh b/reg_tests/chgres_cube/driver.wcoss_cray.sh index d08b9cdb9..96337cc03 100755 --- a/reg_tests/chgres_cube/driver.wcoss_cray.sh +++ b/reg_tests/chgres_cube/driver.wcoss_cray.sh @@ -42,6 +42,13 @@ PROJECT_CODE="${PROJECT_CODE:-GFS-DEV}" export HOMEufs=$PWD/../.. +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEreg=/gpfs/hps3/emc/global/noscrub/George.Gayno/ufs_utils.git/reg_tests/chgres_cube LOG_FILE=consistency.log diff --git a/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh b/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh index 20cc13003..04ab66c72 100755 --- a/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh +++ b/reg_tests/chgres_cube/driver.wcoss_dell_p3.sh @@ -40,6 +40,13 @@ PROJECT_CODE="${PROJECT_CODE:-GFS-DEV}" # and baseline data for each test. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEufs=$PWD/../.. export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/chgres_cube diff --git a/reg_tests/get_hash.sh b/reg_tests/get_hash.sh new file mode 100755 index 000000000..443c62098 --- /dev/null +++ b/reg_tests/get_hash.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +#set -x + +commit_string=$(git log -1 --oneline) + +commit_num=$(echo $commit_string | cut -c1-7) + +echo ${commit_num} + +export commit_num diff --git a/reg_tests/global_cycle/C768.fv3gfs.sh b/reg_tests/global_cycle/C768.fv3gfs.sh index 5bb326c42..c86792ff6 100755 --- a/reg_tests/global_cycle/C768.fv3gfs.sh +++ b/reg_tests/global_cycle/C768.fv3gfs.sh @@ -70,6 +70,9 @@ if [ $test_failed -ne 0 ]; then echo "*********************************" echo "<<< C768 GLOBAL CYCLE TEST FAILED. >>>" echo "*********************************" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $BASE_GSM/reg_tests/update_baseline.sh $HOMEreg "c768.fv3gfs" $commit_num + fi else echo echo "*********************************" diff --git a/reg_tests/global_cycle/C768.lndincsnow.sh b/reg_tests/global_cycle/C768.lndincsnow.sh index 62a91fa7a..c98d443ba 100755 --- a/reg_tests/global_cycle/C768.lndincsnow.sh +++ b/reg_tests/global_cycle/C768.lndincsnow.sh @@ -75,6 +75,9 @@ if [ $test_failed -ne 0 ]; then echo "****************************************" echo "<<< C768 LANDINC SNOW CYCLE TEST FAILED. >>>" echo "****************************************" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $BASE_GSM/reg_tests/update_baseline.sh $HOMEreg "c768.lndincsnow" $commit_num + fi else echo echo "***************************************" diff --git a/reg_tests/global_cycle/C768.lndincsoil.sh b/reg_tests/global_cycle/C768.lndincsoil.sh index 5d50c4221..5e3a1da57 100755 --- a/reg_tests/global_cycle/C768.lndincsoil.sh +++ b/reg_tests/global_cycle/C768.lndincsoil.sh @@ -77,6 +77,9 @@ if [ $test_failed -ne 0 ]; then echo "*****************************************" echo "<<< C768 LANDINC SOILT CYCLE TEST FAILED. >>>" echo "*****************************************" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $BASE_GSM/reg_tests/update_baseline.sh $HOMEreg "c768.lndincsoil" $commit_num + fi else echo echo "*****************************************" diff --git a/reg_tests/global_cycle/driver.hera.sh b/reg_tests/global_cycle/driver.hera.sh index a781020d0..c049f51fd 100755 --- a/reg_tests/global_cycle/driver.hera.sh +++ b/reg_tests/global_cycle/driver.hera.sh @@ -36,6 +36,13 @@ QUEUE="${QUEUE:-batch}" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + DATA_DIR="${WORK_DIR}/reg-tests/global-cycle" export HOMEreg=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/global_cycle diff --git a/reg_tests/global_cycle/driver.jet.sh b/reg_tests/global_cycle/driver.jet.sh index 0d2a1dd7c..0f0ab0c4d 100755 --- a/reg_tests/global_cycle/driver.jet.sh +++ b/reg_tests/global_cycle/driver.jet.sh @@ -34,6 +34,13 @@ QUEUE="${QUEUE:-batch}" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export DATA_DIR="${WORK_DIR}/reg-tests/global-cycle" export HOMEreg=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/global_cycle diff --git a/reg_tests/global_cycle/driver.orion.sh b/reg_tests/global_cycle/driver.orion.sh index bf4164e43..3bd5d6dc0 100755 --- a/reg_tests/global_cycle/driver.orion.sh +++ b/reg_tests/global_cycle/driver.orion.sh @@ -34,6 +34,13 @@ QUEUE="${QUEUE:-batch}" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export DATA_DIR="${WORK_DIR}/reg-tests/global-cycle" export HOMEreg=/work/noaa/nems/role-nems/ufs_utils/reg_tests/global_cycle diff --git a/reg_tests/global_cycle/driver.wcoss_cray.sh b/reg_tests/global_cycle/driver.wcoss_cray.sh index f18242917..4c98a52d3 100755 --- a/reg_tests/global_cycle/driver.wcoss_cray.sh +++ b/reg_tests/global_cycle/driver.wcoss_cray.sh @@ -32,6 +32,13 @@ QUEUE="${QUEUE:-dev}" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + DATA_DIR="${WORK_DIR}/reg-tests/global-cycle" export HOMEreg=/gpfs/hps3/emc/global/noscrub/George.Gayno/ufs_utils.git/reg_tests/global_cycle diff --git a/reg_tests/global_cycle/driver.wcoss_dell_p3.sh b/reg_tests/global_cycle/driver.wcoss_dell_p3.sh index 13896deb0..9b1c0cc10 100755 --- a/reg_tests/global_cycle/driver.wcoss_dell_p3.sh +++ b/reg_tests/global_cycle/driver.wcoss_dell_p3.sh @@ -34,6 +34,13 @@ QUEUE="${QUEUE:-dev}" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + DATA_DIR="${WORK_DIR}/reg-tests/global-cycle" export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/global_cycle 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/c96.viirs.vegt.sh b/reg_tests/grid_gen/c96.viirs.vegt.sh index dd593680d..d0db44538 100755 --- a/reg_tests/grid_gen/c96.viirs.vegt.sh +++ b/reg_tests/grid_gen/c96.viirs.vegt.sh @@ -57,6 +57,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< C96 VIIRS VEGT TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "c96.viirs.vegt" $commit_num + fi else echo "<<< C96 VIIRS VEGT TEST PASSED. >>>" fi diff --git a/reg_tests/grid_gen/driver.hera.sh b/reg_tests/grid_gen/driver.hera.sh index b8de3f8d2..9c5b9b97a 100755 --- a/reg_tests/grid_gen/driver.hera.sh +++ b/reg_tests/grid_gen/driver.hera.sh @@ -39,6 +39,13 @@ PROJECT_CODE="${PROJECT_CODE:-fv3-cpu}" # Should not have to change anything below here. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + LOG_FILE=consistency.log SUM_FILE=summary.log export home_dir=$PWD/../.. diff --git a/reg_tests/grid_gen/driver.jet.sh b/reg_tests/grid_gen/driver.jet.sh index 38033430a..f6778a5b7 100755 --- a/reg_tests/grid_gen/driver.jet.sh +++ b/reg_tests/grid_gen/driver.jet.sh @@ -37,6 +37,13 @@ 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" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + LOG_FILE=consistency.log SUM_FILE=summary.log export home_dir=$PWD/../.. diff --git a/reg_tests/grid_gen/driver.orion.sh b/reg_tests/grid_gen/driver.orion.sh index ba48afe21..8b00621b8 100755 --- a/reg_tests/grid_gen/driver.orion.sh +++ b/reg_tests/grid_gen/driver.orion.sh @@ -46,6 +46,14 @@ export APRUN_SFC=srun export OMP_STACKSIZE=2048m export OMP_NUM_THREADS=24 export machine=ORION + +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEreg=/work/noaa/nems/role-nems/ufs_utils/reg_tests/grid_gen/baseline_data rm -fr $WORK_DIR diff --git a/reg_tests/grid_gen/driver.wcoss_cray.sh b/reg_tests/grid_gen/driver.wcoss_cray.sh index 5887676ff..de85aade2 100755 --- a/reg_tests/grid_gen/driver.wcoss_cray.sh +++ b/reg_tests/grid_gen/driver.wcoss_cray.sh @@ -35,6 +35,13 @@ 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" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export home_dir=$PWD/../.. LOG_FILE=consistency.log SUM_FILE=summary.log diff --git a/reg_tests/grid_gen/driver.wcoss_dell_p3.sh b/reg_tests/grid_gen/driver.wcoss_dell_p3.sh index 3def7e696..9d6bb3eba 100755 --- a/reg_tests/grid_gen/driver.wcoss_dell_p3.sh +++ b/reg_tests/grid_gen/driver.wcoss_dell_p3.sh @@ -35,6 +35,13 @@ 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" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + LOG_FILE=consistency.log SUM_FILE=summary.log export home_dir=$PWD/../.. diff --git a/reg_tests/grid_gen/esg.regional.sh b/reg_tests/grid_gen/esg.regional.sh index d88a260dc..55963531f 100755 --- a/reg_tests/grid_gen/esg.regional.sh +++ b/reg_tests/grid_gen/esg.regional.sh @@ -61,6 +61,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< ESG REGIONAL TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "esg.regional" $commit_num + fi else echo "<<< ESG REGIONAL TEST PASSED. >>>" fi diff --git a/reg_tests/grid_gen/gfdl.regional.sh b/reg_tests/grid_gen/gfdl.regional.sh index 985b498d2..76f94a4f4 100755 --- a/reg_tests/grid_gen/gfdl.regional.sh +++ b/reg_tests/grid_gen/gfdl.regional.sh @@ -64,6 +64,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< GFDL REGIONAL TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "gfdl.regional" $commit_num + fi else echo "<<< GFDL REGIONAL TEST PASSED. >>>" fi diff --git a/reg_tests/grid_gen/regional.gsl.gwd.sh b/reg_tests/grid_gen/regional.gsl.gwd.sh index 0a66daeeb..415ca3813 100755 --- a/reg_tests/grid_gen/regional.gsl.gwd.sh +++ b/reg_tests/grid_gen/regional.gsl.gwd.sh @@ -62,6 +62,9 @@ done set +x if [ $test_failed -ne 0 ]; then echo "<<< REGIONAL GSL GWD TEST FAILED. >>>" + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + $home_dir/reg_tests/update_baseline.sh "${HOMEreg}/.." "regional.gsl.gwd" $commit_num + fi else echo "<<< REGIONAL GSL GWD TEST PASSED. >>>" fi diff --git a/reg_tests/ice_blend/driver.hera.sh b/reg_tests/ice_blend/driver.hera.sh index 3ce993fe4..b86f370d1 100755 --- a/reg_tests/ice_blend/driver.hera.sh +++ b/reg_tests/ice_blend/driver.hera.sh @@ -43,6 +43,13 @@ export DATA="${DATA}/reg-tests/ice-blend" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export WGRIB=/scratch2/NCEPDEV/nwprod/NCEPLIBS/utils/grib_util.v1.1.1/exec/wgrib export WGRIB2=/scratch2/NCEPDEV/nwprod/NCEPLIBS/utils/grib_util.v1.1.1/exec/wgrib2 export COPYGB=/scratch2/NCEPDEV/nwprod/NCEPLIBS/utils/grib_util.v1.1.1/exec/copygb diff --git a/reg_tests/ice_blend/driver.jet.sh b/reg_tests/ice_blend/driver.jet.sh index 417385dc1..c66b3922b 100755 --- a/reg_tests/ice_blend/driver.jet.sh +++ b/reg_tests/ice_blend/driver.jet.sh @@ -40,6 +40,13 @@ export DATA="${DATA}/reg-tests/ice-blend" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export WGRIB=/apps/wgrib/1.8.1.0b/bin/wgrib export WGRIB2=/apps/wgrib2/0.1.9.6a/bin/wgrib2 export COPYGB=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/grib_util/NCEPLIBS-grib_util/exec/bin/copygb @@ -47,6 +54,7 @@ export COPYGB2=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/grib_util export CNVGRIB=/apps/cnvgrib/1.4.0/bin/cnvgrib export HOMEreg=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/ice_blend + export HOMEgfs=$PWD/../.. rm -fr $DATA diff --git a/reg_tests/ice_blend/driver.orion.sh b/reg_tests/ice_blend/driver.orion.sh index 9f63483ba..cf8d559b7 100755 --- a/reg_tests/ice_blend/driver.orion.sh +++ b/reg_tests/ice_blend/driver.orion.sh @@ -43,6 +43,13 @@ export DATA="${DATA}/reg-tests/ice-blend" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export WGRIB=/apps/contrib/NCEPLIBS/orion/utils/grib_util.v1.2.0/exec/wgrib export WGRIB2=/apps/contrib/NCEPLIBS/orion/utils/grib_util.v1.2.0/exec/wgrib2 export COPYGB=/apps/contrib/NCEPLIBS/lib/NCEPLIBS-grib_util/v1.1.1/exec/copygb diff --git a/reg_tests/ice_blend/driver.wcoss_cray.sh b/reg_tests/ice_blend/driver.wcoss_cray.sh index 7556b9b55..3b1250143 100755 --- a/reg_tests/ice_blend/driver.wcoss_cray.sh +++ b/reg_tests/ice_blend/driver.wcoss_cray.sh @@ -40,6 +40,13 @@ export DATA="${DATA}/reg-tests/ice-blend" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export WGRIB=/gpfs/hps/nco/ops/nwprod/grib_util.v1.0.5/exec/wgrib export WGRIB2=/gpfs/hps/nco/ops/nwprod/grib_util.v1.0.5/exec/wgrib2 export COPYGB2=/gpfs/hps/nco/ops/nwprod/grib_util.v1.0.5/exec/copygb2 diff --git a/reg_tests/ice_blend/driver.wcoss_dell_p3.sh b/reg_tests/ice_blend/driver.wcoss_dell_p3.sh index 2d91a3417..be2940dea 100755 --- a/reg_tests/ice_blend/driver.wcoss_dell_p3.sh +++ b/reg_tests/ice_blend/driver.wcoss_dell_p3.sh @@ -29,6 +29,7 @@ source ../../sorc/machine-setup.sh > /dev/null 2>&1 module use ../../modulefiles module load build.$target.intel +module load git module list set -x @@ -40,6 +41,13 @@ export DATA="${DATA}/reg-tests/ice-blend" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export WGRIB="/gpfs/dell1/nco/ops/nwprod/grib_util.v1.1.1/exec/wgrib" export WGRIB2="/gpfs/dell1/nco/ops/nwprod/grib_util.v1.1.1/exec/wgrib2" export COPYGB2="/gpfs/dell1/nco/ops/nwprod/grib_util.v1.1.1/exec/copygb2" diff --git a/reg_tests/ice_blend/ice_blend.sh b/reg_tests/ice_blend/ice_blend.sh index b1c193ca3..fcd90fa35 100755 --- a/reg_tests/ice_blend/ice_blend.sh +++ b/reg_tests/ice_blend/ice_blend.sh @@ -18,7 +18,7 @@ if [ $iret -ne 0 ]; then exit $iret fi -cmp ${DATA}/seaice.5min.blend $HOMEreg/baseline_data/seaice.5min.blend +cmp ${DATA}/seaice.5min.blend $HOMEreg/baseline_data/t1534/seaice.5min.blend iret=$? test_failed=0 if [ $iret -ne 0 ]; then @@ -32,6 +32,10 @@ if [ $test_failed -ne 0 ]; then echo "<<< ICE BLEND TEST FAILED. >>>" echo "*********************************" echo "<<< ICE BLEND TEST FAILED. >>>" > ./summary.log + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + cd $DATA + $HOMEgfs/reg_tests/update_baseline.sh $HOMEreg "t1534" $commit_num + fi else echo echo "*********************************" diff --git a/reg_tests/snow2mdl/driver.hera.sh b/reg_tests/snow2mdl/driver.hera.sh index d83b501e0..11e854954 100755 --- a/reg_tests/snow2mdl/driver.hera.sh +++ b/reg_tests/snow2mdl/driver.hera.sh @@ -43,6 +43,13 @@ export DATA="${DATA}/reg-tests/snow2mdl" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + rm -fr $DATA export HOMEreg=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/snow2mdl diff --git a/reg_tests/snow2mdl/driver.jet.sh b/reg_tests/snow2mdl/driver.jet.sh index 6da755ff9..cd06cf513 100755 --- a/reg_tests/snow2mdl/driver.jet.sh +++ b/reg_tests/snow2mdl/driver.jet.sh @@ -40,6 +40,13 @@ export DATA="${DATA}/reg-tests/snow2mdl" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEreg=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/snow2mdl export HOMEgfs=$PWD/../.. export WGRIB=/apps/wgrib/1.8.1.0b/bin/wgrib diff --git a/reg_tests/snow2mdl/driver.orion.sh b/reg_tests/snow2mdl/driver.orion.sh index 8ca5ed51b..99ad0c14f 100755 --- a/reg_tests/snow2mdl/driver.orion.sh +++ b/reg_tests/snow2mdl/driver.orion.sh @@ -43,6 +43,13 @@ export DATA="${DATA}/reg-tests/snow2mdl" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + rm -fr $DATA export HOMEreg=/work/noaa/nems/role-nems/ufs_utils/reg_tests/snow2mdl diff --git a/reg_tests/snow2mdl/driver.wcoss_cray.sh b/reg_tests/snow2mdl/driver.wcoss_cray.sh index 197ecb161..c0dc69509 100755 --- a/reg_tests/snow2mdl/driver.wcoss_cray.sh +++ b/reg_tests/snow2mdl/driver.wcoss_cray.sh @@ -40,6 +40,13 @@ export DATA="${DATA}/reg-tests/snow2mdl" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEreg=/gpfs/hps3/emc/global/noscrub/George.Gayno/ufs_utils.git/reg_tests/snow2mdl export HOMEgfs=$PWD/../.. export WGRIB=/gpfs/hps/nco/ops/nwprod/grib_util.v1.0.2/exec/wgrib diff --git a/reg_tests/snow2mdl/driver.wcoss_dell_p3.sh b/reg_tests/snow2mdl/driver.wcoss_dell_p3.sh index 0f315d391..f1e417587 100755 --- a/reg_tests/snow2mdl/driver.wcoss_dell_p3.sh +++ b/reg_tests/snow2mdl/driver.wcoss_dell_p3.sh @@ -29,6 +29,7 @@ source ../../sorc/machine-setup.sh > /dev/null 2>&1 module use ../../modulefiles module load build.$target.intel +module load git module list set -x @@ -40,6 +41,13 @@ export DATA="${DATA}/reg-tests/snow2mdl" # Should not have to change anything below. #----------------------------------------------------------------------------- +export UPDATE_BASELINE="FALSE" +#export UPDATE_BASELINE="TRUE" + +if [ "$UPDATE_BASELINE" = "TRUE" ]; then + source ../get_hash.sh +fi + export HOMEreg=/gpfs/dell2/emc/modeling/noscrub/George.Gayno/ufs_utils.git/reg_tests/snow2mdl export HOMEgfs=$PWD/../.. export WGRIB=/gpfs/dell1/nco/ops/nwprod/grib_util.v1.0.6/exec/wgrib diff --git a/reg_tests/snow2mdl/snow2mdl.sh b/reg_tests/snow2mdl/snow2mdl.sh index 4acec05b8..4743ad42b 100755 --- a/reg_tests/snow2mdl/snow2mdl.sh +++ b/reg_tests/snow2mdl/snow2mdl.sh @@ -31,7 +31,7 @@ fi test_failed=0 -cmp ${DATA}/snogrb_model $HOMEreg/baseline_data/snogrb_model +cmp ${DATA}/snogrb_model $HOMEreg/baseline_data/t1534/snogrb_model iret=$? if [ $iret -ne 0 ]; then test_failed=1 @@ -44,6 +44,10 @@ if [ $test_failed -ne 0 ]; then echo "<<< SNOW2MDL TEST FAILED. >>>" echo "*********************************" echo "<<< SNOW2MDL TEST FAILED. >>>" > ./summary.log + if [ "$UPDATE_BASELINE" = "TRUE" ]; then + cd $DATA + $HOMEgfs/reg_tests/update_baseline.sh $HOMEreg "t1534" $commit_num + fi else echo echo "*********************************" diff --git a/reg_tests/update_baseline.sh b/reg_tests/update_baseline.sh new file mode 100755 index 000000000..d0cb329f6 --- /dev/null +++ b/reg_tests/update_baseline.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +set -x + +HOMEreg=$1 +test_name=$2 +commit_num=$3 + +base_dir=$HOMEreg/baseline_data +base_dir_commit=${base_dir}/$test_name.$commit_num + +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 + +mkdir -p $base_dir_commit + +for files in *.nc snogrb_model seaice.5min.blend +do + if [ -f $files ]; then + cp $files $base_dir_commit + chmod 444 $base_dir_commit/$files + 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 +ln -fs $test_name.$commit_num $test_name + +# move this to driver? +###chmod 555 $base_dir + +exit