Skip to content

Commit

Permalink
run_unstr_rstrt: update work/ dir for unstr_rstrt
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMasarik-NOAA committed Apr 3, 2024
1 parent 567f69d commit 883b9d3
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions regtests/run_unstr_rstrt
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,42 @@

REGDIR=$SLURM_SUBMIT_DIR

### ------
### TODO
###
### WOOPS need to add back in the modules!!
### -----
module purge
module use /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core
module load stack-intel/2021.5.0
module load stack-intel-oneapi-mpi/2021.5.1
module load cmake/3.23.1
module load libpng/1.6.37
module load zlib/1.2.13
module load jasper/2.0.32
module load hdf5/1.14.0
module load netcdf-c/4.9.2
module load netcdf-fortran/4.6.1
module load bacio/2.4.1
module load g2/3.4.5
module load w3emc/2.10.0
module load esmf/8.5.0
module load scotch/7.0.4
export METIS_PATH=/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hera/intel/spack-stack/1.6.0/parmetis-4.0.3/install

export path_build_root=$REGDIR/build

# runs ww3_ufs1.1/unstr_rstrt(grid b) w ascii flag. grid b := block-explicit shceme
function run_pdlib_ascii() {
if [ $# -ne 1 ]; then echo 'usage: run_pdlib_ascii <numProc>'; return; fi
local numProc=$1
./bin/run_cmake_test -b slurm -o all -S -T -s PDLIB_ASCII -i input_unstr_rstrt -w work_$numProc -g b -f -p srun -n $numProc ../model ww3_ufs1.1
./bin/run_cmake_test -b slurm -o all -S -T -s PDLIB_ASCII -i input_unstr_rstrt -w work_unstr_rstrt_$numProc -g b -f -p srun -n $numProc ../model ww3_ufs1.1
return
}


cd $REGDIR

echo ' '
echo ' **********************************************'
echo ' *** WAVEWATCH III - PDLIB ***'
echo ' **********************************************'
echo ' '

cd $REGDIR
export path_build_root=$REGDIR/build
[[ -d ${path_build_root} ]] && rm -rf ${path_build_root}


Expand All @@ -47,14 +60,14 @@
# M PROC - warm start (at 03z from N PROC restart)
# -------------------
echo -e "\nmProc: $mProc"
mkdir -p ww3_ufs1.1/work_${mProc}
cp -v ww3_ufs1.1/work_${nProc}/20210401.030000.restart.ww3 ww3_ufs1.1/work_${mProc}/restart.ww3
mkdir -p ww3_ufs1.1/work_unstr_rstrt_${mProc}
cp -v ww3_ufs1.1/work_unstr_rstrt_${nProc}/20210401.030000.restart.ww3 ww3_ufs1.1/work_unstr_rstrt_${mProc}/restart.ww3
cp -v ww3_ufs1.1/input_unstr_rstrt/ww3_shel.inp.restart ww3_ufs1.1/input_unstr_rstrt/ww3_shel.inp
run_pdlib_ascii $mProc

# compare NPROC v. MPROC
# ----------------------
./bin/test.comp ww3_ufs1.1 work_${nProc} work_${mProc}
./bin/test.comp ww3_ufs1.1 work_unstr_rstrt_${nProc} work_unstr_rstrt_${mProc}


echo "done running."
Expand All @@ -64,3 +77,4 @@
echo ' * end of WAVEWATCH III - PDLIB regtest *'
echo ' **************************************************************'
echo ' '
exit 0

0 comments on commit 883b9d3

Please sign in to comment.