forked from ufs-community/UFS_UTILS
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/reg_tests This commit references ufs-community#99.
Add reg test for emcsfc_ice_blend program. Add driver script for Hera.
- Loading branch information
1 parent
9dea088
commit fbcca4b
Showing
4 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
#----------------------------------------------------------------------------- | ||
# | ||
# Run ice_blend regression test on Hera. | ||
# | ||
# Set $DATA to your working directory. Set the project code (SBATCH -A) | ||
# and queue (SBATCH -q) as appropriate. | ||
# | ||
# Invoke the script as follows: sbatch $script | ||
# | ||
# Log output is placed in regression.log. A summary is | ||
# placed in summary.log | ||
# | ||
# The test fails when its output does not match the baseline files | ||
# as determined by the 'cmp' command. The baseline files are | ||
# stored in HOMEreg. | ||
# | ||
#----------------------------------------------------------------------------- | ||
|
||
#SBATCH -J ice_blend | ||
#SBATCH -A fv3-cpu | ||
#SBATCH --open-mode=truncate | ||
#SBATCH -o regression.log | ||
#SBATCH -e regression.log | ||
#SBATCH --ntasks=1 | ||
#SBATCH -q debug | ||
#SBATCH -t 00:03:00 | ||
|
||
set -x | ||
|
||
module load intel | ||
|
||
export DATA="/scratch2/NCEPDEV/stmp1/$LOGNAME/reg_test.ice_blend" | ||
|
||
#----------------------------------------------------------------------------- | ||
# Should not have to change anything below. | ||
#----------------------------------------------------------------------------- | ||
|
||
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 | ||
export COPYGB2=/scratch2/NCEPDEV/nwprod/NCEPLIBS/utils/grib_util.v1.1.1/exec/copygb2 | ||
export CNVGRIB=/scratch2/NCEPDEV/nwprod/NCEPLIBS/utils/grib_util.v1.1.1/exec/cnvgrib | ||
|
||
export HOMEreg=/scratch1/NCEPDEV/da/George.Gayno/noscrub/reg_tests/ice_blend | ||
export HOMEgfs=$PWD/../.. | ||
|
||
rm -fr $DATA | ||
|
||
./ice_blend.sh | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
#----------------------------------------------------------------------------- | ||
# Run ice_blend regression test. This script called from it machine-specific | ||
# driver script. | ||
#----------------------------------------------------------------------------- | ||
|
||
export IMS_FILE=$HOMEreg/input_data/imssnow96.grib2.gdas.2018120618 | ||
export FIVE_MIN_ICE_FILE=$HOMEreg/input_data/seaice.5min.grib2.gdas.2018120618 | ||
|
||
${HOMEgfs}/ush/emcsfc_ice_blend.sh | ||
|
||
iret=$? | ||
if [ $iret -ne 0 ]; then | ||
set +x | ||
echo "<<< ICE_BLEND TEST FAILED. <<<" | ||
echo "<<< ICE_BLEND TEST FAILED. <<<" > ./summary.log | ||
exit $iret | ||
fi | ||
|
||
cmp ${DATA}/seaice.5min.blend $HOMEreg/baseline_data/seaice.5min.blend | ||
iret=$? | ||
test_failed=0 | ||
if [ $iret -ne 0 ]; then | ||
test_failed=1 | ||
fi | ||
|
||
set +x | ||
if [ $test_failed -ne 0 ]; then | ||
echo | ||
echo "*********************************" | ||
echo "<<< ICE BLEND TEST FAILED. >>>" | ||
echo "*********************************" | ||
echo "<<< ICE BLEND TEST FAILED. >>>" > ./summary.log | ||
else | ||
echo | ||
echo "*********************************" | ||
echo "<<< ICE BLEND TEST PASSED. >>>" | ||
echo "*********************************" | ||
echo "<<< ICE BLEND TEST PASSED. >>>" > ./summary.log | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters