Skip to content

Commit

Permalink
Merge branch 'develop' into feature/wcoss2
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jun 28, 2022
2 parents 9a13a6b + c5cfcf4 commit c137757
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 130 deletions.
79 changes: 79 additions & 0 deletions reg_tests/chgres_cube/c96.gefs.grib2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/bin/bash

#-----------------------------------------------------------------------------
# Invoke chgres to create C96 coldstart files using GEFS GRIB2 data
# as input. The coldstart files are then compared to baseline files
# using the 'nccmp' utility. This script is run by the machine specific
# driver script.
#-----------------------------------------------------------------------------

set -x

export DATA=$OUTDIR/c96_gefs_grib2
rm -fr $DATA

export CRES=96
export FIXfv3=${HOMEreg}/fix/C96
export COMIN=${HOMEreg}/input_data/gefs.grib2

export GRIB2_FILE_INPUT=gec00.t06z.pgrb2abf00
export VCOORD_FILE=${HOMEufs}/fix/fix_am/global_hyblev.l65.txt
export VARMAP_FILE=${HOMEufs}/parm/varmap_tables/GFSphys_var_map.txt
export INPUT_TYPE='grib2'
export CONVERT_NST=".false."
export TRACERS_TARGET='"sphum","liq_wat","o3mr"'
export TRACERS_INPUT='"spfh","clwmr","o3mr"'

export CDATE=2020082506

export OMP_NUM_THREADS_CH=${OMP_NUM_THREADS:-1}

NCCMP=${NCCMP:-$(which nccmp)}

#-----------------------------------------------------------------------------
# Invoke chgres program.
#-----------------------------------------------------------------------------

echo "Starting at: " `date`

${HOMEufs}/ush/chgres_cube.sh

iret=$?
if [ $iret -ne 0 ]; then
set +x
echo "<<< C96 GEFS GRIB2 TEST FAILED. <<<"
exit $iret
fi

echo "Ending at: " `date`

#-----------------------------------------------------------------------------
# Compare output from chgres to baseline set of data.
#-----------------------------------------------------------------------------

cd $DATA

test_failed=0
for files in *.nc
do
if [ -f $files ]; then
echo CHECK $files
$NCCMP -dmfqS $files $HOMEreg/baseline_data/c96_gefs_grib2/$files
iret=$?
if [ $iret -ne 0 ]; then
test_failed=1
fi
fi
done

set +x
if [ $test_failed -ne 0 ]; then
echo "<<< C96 GEFS GRIB2 TEST FAILED. >>>"
if [ "$UPDATE_BASELINE" = "TRUE" ]; then
$HOMEufs/reg_tests/update_baseline.sh $HOMEreg "c96_gefs_grib2" $commit_num
fi
else
echo "<<< C96 GEFS GRIB2 TEST PASSED. >>>"
fi

exit 0
11 changes: 10 additions & 1 deletion reg_tests/chgres_cube/driver.hera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,22 @@ export OMP_NUM_THREADS=1 # should match cpus-per-task
TEST16=$(sbatch --parsable --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 25km.conus.gfs.pbgrib2.conus \
-o $LOG_FILE -e $LOG_FILE ./25km.conus.gfs.pbgrib2.sh)

#-----------------------------------------------------------------------------
# Initialize global C96 using GEFS GRIB2 files.
#-----------------------------------------------------------------------------

LOG_FILE=consistency.log17
export OMP_NUM_THREADS=1 # should match cpus-per-task
TEST17=$(sbatch --parsable --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J c96.gefs.grib2 \
-o $LOG_FILE -e $LOG_FILE ./c96.gefs.grib2.sh)

#-----------------------------------------------------------------------------
# Create summary log.
#-----------------------------------------------------------------------------
LOG_FILE=consistency.log
sbatch --nodes=1 -t 0:01:00 -A $PROJECT_CODE -J chgres_summary -o $LOG_FILE -e $LOG_FILE \
--open-mode=append -q $QUEUE -d\
afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5:$TEST6:$TEST7:$TEST8:$TEST9:$TEST10:$TEST11:$TEST12:$TEST13:$TEST14:$TEST15:$TEST16 << EOF
afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5:$TEST6:$TEST7:$TEST8:$TEST9:$TEST10:$TEST11:$TEST12:$TEST13:$TEST14:$TEST15:$TEST16:$TEST17 << EOF
#!/bin/bash
grep -a '<<<' $LOG_FILE* > $SUM_FILE
EOF
Expand Down
11 changes: 10 additions & 1 deletion reg_tests/chgres_cube/driver.jet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,23 @@ export OMP_NUM_THREADS=1 # should match cpus-per-task
TEST16=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 25km.conus.gfs.pbgrib2.conus \
--exclusive -o $LOG_FILE -e $LOG_FILE ./25km.conus.gfs.pbgrib2.sh)

#-----------------------------------------------------------------------------
# Initialize C96 using GEFS GRIB2 data.
#-----------------------------------------------------------------------------

LOG_FILE=consistency.log17
export OMP_NUM_THREADS=1
TEST17=$(sbatch --parsable --partition=xjet --nodes=1 --ntasks-per-node=6 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J c96.gefs.grib2 \
--exclusive -o $LOG_FILE -e $LOG_FILE ./c96.gefs.grib2.sh)

#-----------------------------------------------------------------------------
# Create summary log.
#-----------------------------------------------------------------------------

LOG_FILE=consistency.log
sbatch --partition=xjet --nodes=1 -t 0:01:00 -A $PROJECT_CODE -J chgres_summary -o $LOG_FILE -e $LOG_FILE \
--open-mode=append -q $QUEUE -d\
afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5:$TEST6:$TEST7:$TEST8:$TEST9:$TEST10:$TEST11:$TEST12:$TEST13:$TEST14:$TEST15:$TEST16 << EOF
afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5:$TEST6:$TEST7:$TEST8:$TEST9:$TEST10:$TEST11:$TEST12:$TEST13:$TEST14:$TEST15:$TEST16:$TEST17 << EOF
#!/bin/bash
grep -a '<<<' $LOG_FILE* > $SUM_FILE
EOF
Expand Down
11 changes: 10 additions & 1 deletion reg_tests/chgres_cube/driver.orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,22 @@ export OMP_NUM_THREADS=1 # should match cpus-per-task
TEST16=$(sbatch --parsable --ntasks-per-node=12 --nodes=1 --mem=75G -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 25km.conus.gfs.pbgrib2 \
--open-mode=append -o $LOG_FILE16 -e $LOG_FILE16 ./25km.conus.gfs.pbgrib2.sh)

#-----------------------------------------------------------------------------
# Initialize C96 using GEFS GRIB2 file.
#-----------------------------------------------------------------------------

LOG_FILE17=${LOG_FILE}17
export OMP_NUM_THREADS=1 # needs to match cpus-per-task
TEST17=$(sbatch --parsable --ntasks-per-node=6 --nodes=1 --mem=75G -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J c96.gefs.grib2 \
--open-mode=append -o $LOG_FILE17 -e $LOG_FILE17 ./c96.gefs.grib2.sh)

#-----------------------------------------------------------------------------
# Create summary log.
#-----------------------------------------------------------------------------

sbatch --nodes=1 -t 0:01:00 -A $PROJECT_CODE -J chgres_summary -o $LOG_FILE -e $LOG_FILE \
--open-mode=append -q $QUEUE \
-d afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5:$TEST6:$TEST7:$TEST8:$TEST9:$TEST10:$TEST11:$TEST12:$TEST13:$TEST14:$TEST15:$TEST16 << EOF
-d afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5:$TEST6:$TEST7:$TEST8:$TEST9:$TEST10:$TEST11:$TEST12:$TEST13:$TEST14:$TEST15:$TEST16:$TEST17 << EOF
#!/bin/bash
grep -a '<<<' ${LOG_FILE}* > $SUM_FILE
EOF
Expand Down
Loading

0 comments on commit c137757

Please sign in to comment.