Skip to content

Commit

Permalink
Add script to run weight_gen utility on wcoss2.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jul 27, 2022
1 parent d571230 commit d426d52
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 30 deletions.
13 changes: 7 additions & 6 deletions reg_tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

ulimit -s unlimited

export MAILTO=
export MAILTO=george.gayno@noaa.gov

# Directory to download UFS_UTILS to and run the consistency tests
export WORK_DIR=
export WORK_DIR=/lfs/h2/emc/stmp/george.gayno/reg.tests.branch

export PROJECT_CODE=
export QUEUE=
TIMEOUT_LIMIT=3600
export PROJECT_CODE=GFS-DEV
export QUEUE=dev
TIMEOUT_LIMIT=21600

mkdir -p ${WORK_DIR}
cd ${WORK_DIR}
rm -f reg_test_results.txt
rm -rf UFS_UTILS

git clone --recursive https://github.com/ufs-community/UFS_UTILS.git
git clone --recursive https://github.com/GeorgeGayno-NOAA/UFS_UTILS.git
cd UFS_UTILS
git checkout feature/new_fix

source sorc/machine-setup.sh

Expand Down
24 changes: 0 additions & 24 deletions util/weight_gen/run.sh

This file was deleted.

47 changes: 47 additions & 0 deletions util/weight_gen/run.wcoss2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

#PBS -l walltime=00:02:00
#PBS -o log
#PBS -e log
#PBS -N weight_gen
#PBS -q debug
#PBS -A GFS-DEV
#PBS -l select=1:ncpus=1:mem=100MB

#-------------------------------------------------------------------------------
#
# Run the weight_gen program on WCOSS2.
#
# Set WORK_DIR to your working directory.
#
# Set CRES to your desired resolution. Valid choices are:
# - C48
# - C96
# - C128
# - C192
# - C384
# - C768
# - C1152
# - C3072
#
# To run this script, do: 'qsub $script'
#
#-------------------------------------------------------------------------------

cd $PBS_O_WORKDIR

set -x

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

export CRES="C48"

export WORK_DIR=/lfs/h2/emc/stmp/$USER/weight_gen

${UFS_DIR}/util/weight_gen/weight_gen.sh

exit
17 changes: 17 additions & 0 deletions util/weight_gen/weight_gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -x

CRES=${CRES:-"C48"}

WORK_DIR=${WORK_DIR:-"/lfs/h2/emc/stmp/$USER/weight_gen"}

UFS_DIR=${UFS_DIR:-"$PWD/../.."}

rm -fr $WORK_DIR
mkdir -p $WORK_DIR
cd $WORK_DIR

${UFS_DIR}/exec/scrip.x "$CRES"

exit

0 comments on commit d426d52

Please sign in to comment.