-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script to clone, build workflow and generate experiment for prototypes (
#470) * Commit to test on Hera * Update to clone/checkout properly * Incremental commit * incremental commit * fix for CI with workflow change * actually fix CI * another attempt to fix CI * Small change * end of day commit * Changes to be consistent with g-w * typo fix * Change hashes * added gfs arg (#471) * Run rocotorun and rocotostat * comment out bad test * Fix issues russ pointed out in issue * replace NMEM_ENKF with NMEM_ENS in jjobs_ens_init.sh (#467) * modify run_jjobs --------- Co-authored-by: Guillaume Vernieres <[email protected]> Co-authored-by: RussTreadon-NOAA <[email protected]>
- Loading branch information
1 parent
fa8a260
commit e527786
Showing
20 changed files
with
178 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# top level options | ||
GWHASH=255d99b | ||
GDASHASH=ab6f06d | ||
BUILD="NO" | ||
PSLOT=cp0 | ||
PROTOROOT=/scratch1/NCEPDEV/da/Cory.R.Martin/GDAS_prototypes | ||
GWDIR=$PROTOROOT/$PSLOT | ||
DUMPDIR=/scratch1/NCEPDEV/da/role.jedipara/dump/ | ||
ICSDIR=/scratch1/NCEPDEV/stmp4/Cory.R.Martin/tmp_ics | ||
expdir=$PROTOROOT/expdirs | ||
comrot=$PROTOROOT/rotdirs | ||
idate=2021073118 | ||
edate=2021080118 | ||
app="ATM" | ||
starttype="cold" | ||
gfscyc=0 | ||
resdet=96 | ||
resens=96 | ||
nens=0 | ||
# config.* options | ||
DO_JEDIATMVAR="YES" | ||
DO_JEDIATMENS="NO" | ||
DO_JEDIOCNVAR="NO" | ||
DO_JEDILANDDA="NO" | ||
DO_MERGENSST="NO" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# ============================================================================== | ||
usage() { | ||
set +x | ||
echo | ||
echo "Usage: $0 -c <config> -t <target> -h" | ||
echo | ||
echo " -c Configuration for prototype defined in shell script <config>" | ||
echo " -t Supported platform script is running on <Hera|Orion>" | ||
echo " -h display this message and quit" | ||
echo | ||
exit 1 | ||
} | ||
|
||
# ============================================================================== | ||
while getopts "c:t:h" opt; do | ||
case $opt in | ||
c) | ||
config=$OPTARG | ||
;; | ||
t) | ||
MACHINE=${MACHINE:-$OPTARG} | ||
;; | ||
h|\?|:) | ||
usage | ||
;; | ||
esac | ||
done | ||
|
||
dir_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ >/dev/null 2>&1 && pwd )" | ||
|
||
# source the input configuration | ||
source $config | ||
|
||
# create directories | ||
mkdir -p $PROTOROOT/$PSLOT | ||
|
||
# clone/build/link workflow and GDASApp | ||
if [[ $BUILD == 'YES' ]]; then | ||
cd $GWDIR | ||
git clone https://github.com/NOAA-EMC/global-workflow.git | ||
cd global-workflow/sorc | ||
git checkout $GWHASH | ||
./checkout.sh -ug | ||
cd gdas.cd | ||
git checkout $GDASHASH | ||
cd ../ | ||
./build_all.sh | ||
./link_workflow.sh | ||
fi | ||
|
||
# load modules to then generate experiment directory and rocoto XML | ||
module use $dir_root/modulefiles | ||
module load GDAS/$MACHINE | ||
|
||
# move expdir if it exists, delete backup if it exists | ||
if [[ -d $expdir/$PSLOT ]]; then | ||
[[ -d $expdir/${PSLOT}.bak ]] && rm -rf $expdir/${PSLOT}.bak | ||
mv $expdir/$PSLOT $expdir/${PSLOT}.bak | ||
fi | ||
|
||
# move rotdir if it exists, delete backup if it exists | ||
if [[ -d $comrot/$PSLOT ]]; then | ||
[[ -d $comrot/${PSLOT}.bak ]] && rm -rf $comrot/${PSLOT}.bak | ||
mv $comrot/$PSLOT $comrot/${PSLOT}.bak | ||
fi | ||
|
||
# create YAML to override workflow config defaults | ||
mkdir -p $expdir | ||
cat > $expdir/config_${PSLOT}.yaml << EOF | ||
base: | ||
ACCOUNT: "da-cpu" | ||
HPSS_PROJECT: "emc-da" | ||
HOMEDIR: "/scratch1/NCEPDEV/da/${USER}" | ||
DMPDIR: "${DUMPDIR}" | ||
DO_JEDIATMVAR: "${DO_JEDIATMVAR}" | ||
DO_JEDIATMENS: "${DO_JEDIATMENS}" | ||
DO_JEDIOCNVAR: "${DO_JEDIOCNVAR}" | ||
DO_JEDILANDDA: "${DO_JEDILANDDA}" | ||
DO_MERGENSST: "${DO_MERGENSST}" | ||
EOF | ||
|
||
# setup experiment | ||
cd $GWDIR/global-workflow/workflow | ||
./setup_expt.py gfs cycled --idate $idate \ | ||
--edate $edate \ | ||
--app $app \ | ||
--start $starttype \ | ||
--gfs_cyc $gfscyc \ | ||
--resdet $resdet \ | ||
--resens $resens \ | ||
--nens $nens \ | ||
--pslot $PSLOT \ | ||
--configdir $GWDIR/global-workflow/parm/config/gfs \ | ||
--comrot $comrot \ | ||
--expdir $expdir \ | ||
--icsdir $ICSDIR \ | ||
--yaml $expdir/config_${PSLOT}.yaml | ||
|
||
# setup XML for workflow | ||
./setup_xml.py $expdir/$PSLOT | ||
|
||
# run rocotorun one time | ||
rocotorun -w $expdir/$PSLOT/${PSLOT}.xml -d $expdir/$PSLOT/${PSLOT}.db | ||
|
||
# run rocotostat on the first cycle to see if things were submitted | ||
rocotostat -w $expdir/$PSLOT/${PSLOT}.xml -d $expdir/$PSLOT/${PSLOT}.db -c ${idate}00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.