Skip to content

Commit

Permalink
Update wcoss-cray script.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed May 19, 2022
1 parent b40895b commit 5a04ed8
Showing 1 changed file with 30 additions and 17 deletions.
47 changes: 30 additions & 17 deletions reg_tests/snow2mdl/driver.wcoss_cray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,31 @@

#-----------------------------------------------------------------------------
#
# Run snow2mdl consistency test on WCOSS-Cray.
# Run snow2mdl consistency tests on WCOSS-Cray.
#
# Set $DATA to your working directory. Set the project code (BSUB -P)
# and queue (BSUB -q) as appropriate.
# Set $DATA_ROOT to your working directory. Set the project code
# and queue as appropriate.
#
# Invoke the script as follows: cat $script | bsub
# Invoke the script as follows: ./$script
#
# Log output is placed in consistency.log. A summary is
# placed in summary.log
#
# The test fails when its output does not match the baseline file
# as determined by the 'cmp' command. The baseline file is
# as determined by the 'cmp' command. The baseline files are
# stored in HOMEreg.
#
#-----------------------------------------------------------------------------

#BSUB -W 0:02
#BSUB -o consistency.log
#BSUB -e consistency.log
#BSUB -J s2m_regt
#BSUB -q debug
#BSUB -R "rusage[mem=2000]"
#BSUB -P GFS-DEV

set -x

source ../../sorc/machine-setup.sh > /dev/null 2>&1
module use ../../modulefiles
module load build.$target.intel
module list

export DATA="${WORK_DIR:-/gpfs/hps3/stmp/$LOGNAME}"
export DATA="${DATA}/reg-tests/snow2mdl"
DATA_ROOT="${WORK_DIR:-/gpfs/hps3/stmp/$LOGNAME}"
DATA_ROOT="${DATA_ROOT}/reg-tests/snow2mdl"

#-----------------------------------------------------------------------------
# Should not have to change anything below.
Expand All @@ -47,13 +39,34 @@ if [ "$UPDATE_BASELINE" = "TRUE" ]; then
source ../get_hash.sh
fi

PROJECT_CODE=${PROJECT_CODE:-GFS-DEV}
QUEUE=${QUEUE:-dev}

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
export WGRIB2=/gpfs/hps/nco/ops/nwprod/grib_util.v1.0.2/exec/wgrib2

rm -fr $DATA
rm -fr $DATA_ROOT

LOG_FILE="consistency.log"
SUM_FILE="summary.log"

# Test the ops function of snow2mdl.

export DATA=$DATA_ROOT/test.ops
bsub -e $LOG_FILE -o $LOG_FILE -q $QUEUE -P $PROJECT_CODE -J snow.ops -W 0:02 \
-R "rusage[mem=2000]" "$PWD/snow2mdl.ops.sh"

# Test the afwa global snow data.

export DATA=$DATA_ROOT/test.global
bsub -e $LOG_FILE -o $LOG_FILE -q $QUEUE -P $PROJECT_CODE -J snow.global -W 0:02 \
-R "rusage[mem=2000]" -w 'ended(snow.ops)' "$PWD/snow2mdl.global.sh"

# Create a summary file.

./snow2mdl.sh
bsub -o $LOG_FILE -q $QUEUE -P $PROJECT_CODE -J summary -R "rusage[mem=100]" -W 0:01 \
-w 'ended(snow.global)' "grep -a '<<<' $LOG_FILE >> $SUM_FILE"

exit 0

0 comments on commit 5a04ed8

Please sign in to comment.