From 89db7a9785049bb22487bf8b77bb905bcf3a63c0 Mon Sep 17 00:00:00 2001 From: jordanschnell Date: Wed, 16 Oct 2024 15:40:03 +0000 Subject: [PATCH] add regtests for smoke --- .../chgres_cube/13km.conus.rap-smoke.grib2.sh | 102 ++++++++++++++++++ reg_tests/chgres_cube/driver.jet.sh | 92 +++++++++++----- 2 files changed, 166 insertions(+), 28 deletions(-) create mode 100755 reg_tests/chgres_cube/13km.conus.rap-smoke.grib2.sh diff --git a/reg_tests/chgres_cube/13km.conus.rap-smoke.grib2.sh b/reg_tests/chgres_cube/13km.conus.rap-smoke.grib2.sh new file mode 100755 index 000000000..e80e05794 --- /dev/null +++ b/reg_tests/chgres_cube/13km.conus.rap-smoke.grib2.sh @@ -0,0 +1,102 @@ +#!/bin/bash + +#----------------------------------------------------------------------------- +# Invoke chgres to create 13-km CONUS coldstart files using RAP 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/13km_conus_rap-smoke_grib2 +rm -fr $DATA + +export CRES=778 +export KMRES=13km +export FIXfv3=${HOMEreg}/fix/RRFS_CONUS_${KMRES} + +export COMIN=${HOMEreg}/input_data/rap.grib2 + +export GRIB2_FILE_INPUT=1921221000900 +export VCOORD_FILE=${HOMEufs}/fix/am/global_hyblev.l64.txt +export VARMAP_FILE=${HOMEufs}/parm/varmap_tables/GSDphys_smoke_var_map.txt +export INPUT_TYPE='grib2' +export CONVERT_NST=".false." +export OROG_FILES_TARGET_GRID="C778_oro_data.tile7.nc" +export REGIONAL=1 +export HALO_BLEND=0 +export HALO_BNDY=4 +export CDATE=2019080100 +export EXTERNAL_MODEL="RAP" +export NSOILL_OUT=9 +export TRACERS_TARGET='"NULL"' +export TRACERS_INPUT='"NULL"' +export SOTYP_FROM_CLIMO=.false. +export VGTYP_FROM_CLIMO=.false. +export VGFRC_FROM_CLIMO=.true. +export MINMAX_VGFRC_FROM_CLIMO=.true. +export TG3_FROM_SOIL=.true. +export LAI_FROM_CLIMO=.true. +export GEOGRID_FILE_INPUT=${HOMEufs}/fix/am/geo_em.d01.nc_RAPX + +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 "<<< 13-km CONUS RAP-SMOKE W/ GSD PHYSICS AND SFC FROM FILE GRIB2 TEST FAILED. <<<" + exit $iret +fi + +echo "Ending at: " `date` + +#----------------------------------------------------------------------------- +# Compare output from chgres to baseline set of data. +# +# orion's nccmp utility does not work with the netcdf +# required to run ufs_utils. So swap it. +#----------------------------------------------------------------------------- + +machine=${machine:-NULL} +if [ $machine == 'orion' ]; then + module unload netcdfp/4.7.4.release + module load netcdf/4.7.2 +fi + +cd $DATA + +test_failed=0 +for files in *.nc +do + if [ -f $files ]; then + echo CHECK $files + $NCCMP -dmfqS $files $HOMEreg/baseline_data/13km_conus_rap_grib2/$files + iret=$? + if [ $iret -ne 0 ]; then + test_failed=1 + fi + fi +done + +set +x +if [ $test_failed -ne 0 ]; then + echo "<<< 13-km CONUS RAP-SMOKE 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-smoke_grib2" $commit_num + fi +else + echo "<<< 13-km CONUS RAP-SMOKE W/ GSD PHYSICS AND SFC FROM FILE GRIB2 TEST PASSED. >>>" +fi + +exit 0 diff --git a/reg_tests/chgres_cube/driver.jet.sh b/reg_tests/chgres_cube/driver.jet.sh index f3b5ec1b5..0d2b9c42d 100755 --- a/reg_tests/chgres_cube/driver.jet.sh +++ b/reg_tests/chgres_cube/driver.jet.sh @@ -7,15 +7,15 @@ # Set WORK_DIR to a general working location outside the UFS_UTILS directory. # The exact working directory (OUTDIR) will be WORK_DIR/reg_tests/chgres-cube. # Set the PROJECT_CODE and QUEUE as appropriate. To see which projects you -# are authorized to use, type "account_params". +#are authorized to use, type "account_params". # # Invoke the script with no arguments. A series of daisy- # chained jobs will be submitted. To check the queue, type: # "squeue -u USERNAME". # -# The run output will be stored in OUTDIR. Standard output from -# each test will be placed in its own log file. Once the suite -# has completed, a summary of results is placed in SUM_FILE. +# The run output will be stored in OUTDIR. Log output from the suite +# will be in LOG_FILE. Once the suite has completed, a summary is +# placed in SUM_FILE. # # A test fails when its output does not match the baseline files as # determined by the "nccmp" utility. The baseline files are stored in @@ -33,7 +33,7 @@ module list export OUTDIR="${WORK_DIR:-/lfs5/HFIP/emcda/$LOGNAME/stmp}" export OUTDIR="${OUTDIR}/reg-tests/chgres-cube" -PROJECT_CODE="${PROJECT_CODE:-hfv3gfs}" +PROJECT_CODE="rtwbl" #"${PROJECT_CODE:-hfv3gfs}" QUEUE="${QUEUE:-batch}" export machine="jet" @@ -85,104 +85,140 @@ TEST2=$(sbatch --parsable --partition=xjet --nodes=2 --ntasks-per-node=6 -t 0:10 --exclusive -o $LOG_FILE -e $LOG_FILE ./c192.fv3.history.sh) #----------------------------------------------------------------------------- -# Initialize C96 using FV3 gaussian netcdf files. +# Initialize C96 using FV3 gaussian nemsio files. #----------------------------------------------------------------------------- LOG_FILE=consistency.log03 export OMP_NUM_THREADS=1 -TEST3=$(sbatch --parsable --partition=xjet --nodes=2 --ntasks-per-node=6 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J c96.fv3.netcdf \ +TEST3=$(sbatch --parsable --partition=xjet --nodes=2 --ntasks-per-node=6 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J c96.fv3.nemsio \ + --exclusive -o $LOG_FILE -e $LOG_FILE ./c96.fv3.nemsio.sh) + +#----------------------------------------------------------------------------- +# Initialize C96 using spectral GFS sigio/sfcio files. +#----------------------------------------------------------------------------- + +LOG_FILE=consistency.log04 +export OMP_NUM_THREADS=6 # should match cpus-per-task +TEST4=$(sbatch --parsable --partition=xjet --nodes=4 --ntasks-per-node=3 --cpus-per-task=6 -t 0:25:00 \ + --exclusive -A $PROJECT_CODE -q $QUEUE -J c96.gfs.sigio -o $LOG_FILE -e $LOG_FILE ./c96.gfs.sigio.sh) + +#----------------------------------------------------------------------------- +# Initialize C96 using spectral GFS gaussian nemsio files. +#----------------------------------------------------------------------------- + +LOG_FILE=consistency.log05 +export OMP_NUM_THREADS=1 +TEST5=$(sbatch --parsable --partition=xjet --nodes=1 --ntasks-per-node=6 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J c96.gfs.nemsio \ + --exclusive -o $LOG_FILE -e $LOG_FILE ./c96.gfs.nemsio.sh) + +#----------------------------------------------------------------------------- +# Initialize C96 using FV3 gaussian netcdf files. +#----------------------------------------------------------------------------- + +LOG_FILE=consistency.log06 +export OMP_NUM_THREADS=1 +TEST6=$(sbatch --parsable --partition=xjet --nodes=2 --ntasks-per-node=6 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J c96.fv3.netcdf \ --exclusive -o $LOG_FILE -e $LOG_FILE ./c96.fv3.netcdf.sh) #----------------------------------------------------------------------------- # Initialize C192 using GFS GRIB2 data. #----------------------------------------------------------------------------- -LOG_FILE=consistency.log04 +LOG_FILE=consistency.log07 export OMP_NUM_THREADS=1 -TEST4=$(sbatch --parsable --partition=xjet --nodes=1 --ntasks-per-node=6 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J c192.gfs.grib2 \ +TEST7=$(sbatch --parsable --partition=xjet --nodes=1 --ntasks-per-node=6 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J c192.gfs.grib2 \ --exclusive -o $LOG_FILE -e $LOG_FILE ./c192.gfs.grib2.sh) #----------------------------------------------------------------------------- # Initialize CONUS 25-KM USING GFS GRIB2 files. #----------------------------------------------------------------------------- -LOG_FILE=consistency.log05 +LOG_FILE=consistency.log08 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST5=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 25km.conus.gfs.grib2.conus \ +TEST8=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 25km.conus.gfs.grib2.conus \ --exclusive -o $LOG_FILE -e $LOG_FILE ./25km.conus.gfs.grib2.sh) #----------------------------------------------------------------------------- # Initialize CONUS 3-KM USING HRRR GRIB2 file WITH GFS PHYSICS. #----------------------------------------------------------------------------- -LOG_FILE=consistency.log06 +LOG_FILE=consistency.log09 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST6=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=2 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 3km.conus.hrrr.gfssdf.grib2.conus \ +TEST9=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=2 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 3km.conus.hrrr.gfssdf.grib2.conus \ --exclusive -o $LOG_FILE -e $LOG_FILE ./3km.conus.hrrr.gfssdf.grib2.sh) #----------------------------------------------------------------------------- # Initialize CONUS 3-KM USING HRRR GRIB2 file WITH GSD PHYSICS AND SFC VARS FROM FILE. #----------------------------------------------------------------------------- -LOG_FILE=consistency.log07 +LOG_FILE=consistency.log10 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST7=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=3 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 3km.conus.hrrr.newsfc.grib2.conus \ +TEST10=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=3 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 3km.conus.hrrr.newsfc.grib2.conus \ --exclusive -o $LOG_FILE -e $LOG_FILE ./3km.conus.hrrr.newsfc.grib2.sh) #----------------------------------------------------------------------------- # Initialize CONUS 13-KM USING NAM GRIB2 file WITH GFS PHYSICS . #----------------------------------------------------------------------------- -LOG_FILE=consistency.log08 +LOG_FILE=consistency.log11 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST8=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 13km.conus.nam.grib2.conus \ +TEST11=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 13km.conus.nam.grib2.conus \ --exclusive -o $LOG_FILE -e $LOG_FILE ./13km.conus.nam.grib2.sh) #----------------------------------------------------------------------------- # Initialize CONUS 13-KM USING RAP GRIB2 file WITH GSD PHYSICS . #----------------------------------------------------------------------------- -LOG_FILE=consistency.log09 +LOG_FILE=consistency.log12 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST9=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 13km.conus.rap.grib2.conus \ +TEST12=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 13km.conus.rap.grib2.conus \ --exclusive -o $LOG_FILE -e $LOG_FILE ./13km.conus.rap.grib2.sh) #----------------------------------------------------------------------------- # Initialize CONUS 13-KM NA USING NCEI GFS GRIB2 file WITH GFS PHYSICS . #----------------------------------------------------------------------------- -LOG_FILE=consistency.log10 +LOG_FILE=consistency.log13 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST10=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=2 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 13km.na.gfs.ncei.grib2.conus \ +TEST13=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=2 -t 0:10:00 -A $PROJECT_CODE -q $QUEUE -J 13km.na.gfs.ncei.grib2.conus \ --exclusive -o $LOG_FILE -e $LOG_FILE ./13km.na.gfs.ncei.grib2.sh) #----------------------------------------------------------------------------- # Initialize C96 WAM IC using FV3 gaussian netcdf files. #----------------------------------------------------------------------------- -LOG_FILE=consistency.log11 +LOG_FILE=consistency.log14 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST11=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=2 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.fv3.netcdf2wam \ +TEST14=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=2 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.fv3.netcdf2wam \ --exclusive -o $LOG_FILE -e $LOG_FILE ./c96.fv3.netcdf2wam.sh) #----------------------------------------------------------------------------- # Initialize CONUS 25-KM USING GFS PGRIB2+BGRIB2 files. #----------------------------------------------------------------------------- -LOG_FILE=consistency.log12 +LOG_FILE=consistency.log15 export OMP_NUM_THREADS=1 # should match cpus-per-task -TEST12=$(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 \ +TEST15=$(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.log13 +LOG_FILE=consistency.log16 export OMP_NUM_THREADS=1 -TEST13=$(sbatch --parsable --partition=xjet --nodes=1 --ntasks-per-node=6 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J c96.gefs.grib2 \ +TEST16=$(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) +#----------------------------------------------------------------------------- +# Initialize CONUS 13-KM USING RAP-SMOKE GRIB2 file WITH GSD PHYSICS . +#----------------------------------------------------------------------------- + +LOG_FILE=consistency.log17 +export OMP_NUM_THREADS=1 # should match cpus-per-task +TEST17=$(sbatch --parsable --partition=xjet --ntasks-per-node=6 --nodes=1 -t 0:05:00 -A $PROJECT_CODE -q $QUEUE -J 13km.conus.rap-smoke.grib2.conus \ + --exclusive -o $LOG_FILE -e $LOG_FILE ./13km.conus.rap-smoke.grib2.sh) + #----------------------------------------------------------------------------- # Create summary log. #----------------------------------------------------------------------------- @@ -190,7 +226,7 @@ TEST13=$(sbatch --parsable --partition=xjet --nodes=1 --ntasks-per-node=6 -t 0:0 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 << 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