Skip to content

Commit

Permalink
Add script for running J-job scripts without Rocoto (ufs-community#69)
Browse files Browse the repository at this point in the history
* inital script

* add missing change
  • Loading branch information
chan-hoo authored Mar 5, 2024
1 parent 4befa0f commit d579f39
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parm/*.xml
parm/*.db
parm/*.out
parm/*.err
parm/*.log

__pycache__
*.swp
Expand Down
107 changes: 107 additions & 0 deletions parm/run_without_rocoto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/bin/bash
#SBATCH --job-name=land_da_wflow
#SBATCH --account=nems
#SBATCH --qos=debug
#SBATCH --nodes=1
#SBATCH --tasks-per-node=6
#SBATCH --cpus-per-task=1
#SBATCH -t 00:30:00
#SBATCH -o log_landda_wflow.%j.log
#SBATCH -e err_landda_wflow.%j.err


export MACHINE="hera"
export ACCOUNT="nems"
export FORCING="gswp3"

if [ "${MACHINE}" = "hera" ]; then
export EXP_BASEDIR="/scratch2/NCEPDEV/fv3-cam/Chan-hoo.Jeon/landda_nonrocoto"
export JEDI_INSTALL="/scratch2/NAGAPE/epic/UFS_Land-DA/jedi"
export LANDDA_INPUTS="/scratch2/NAGAPE/epic/UFS_Land-DA/inputs"
elif [ "${MACHINE}" = "orion" ]; then
export EXP_BASEDIR="/work/noaa/epic/chjeon/landda_nonrocoto"
export JEDI_INSTALL="/work/noaa/epic/UFS_Land-DA/jedi"
export LANDDA_INPUTS="/work/noaa/epic/UFS_Land-DA/inputs"
fi

export RES="96"
export FCSTHR="24"
export NPROCS_ANA="6"
export NPROCS_FCST="6"
export OBS_TYPES="GHCN"
export fv3bundle_vn="psl_develop"
export DAtype="letkfoi_snow"
export SNOWDEPTHVAR="snwdph"
export TSTUB="oro_C96.mx100"
export WORKDIR="${EXP_BASEDIR}/workdir"
export CYCLEDIR="${EXP_BASEDIR}/land-DA_workflow"
export EXECdir="${CYCLEDIR}/exec"
export OUTDIR="${EXP_BASEDIR}/landda_expts/DA_${FORCING}_test"
export LOG="${EXP_BASEDIR}/tests"
export PATHRT="${EXP_BASEDIR}"

export ATMOS_FORC="${FORCING}"
export NPROC_JEDI="${NPROCS_ANA}"

if [ "${FORCING}" = "era5" ]; then
export CTIME="2019122100"
export PTIME="2019122000"
export NTIME="2019122200"
elif [ "${FORCING}" = "gswp3" ]; then
export CTIME="2000010300"
export PTIME="2000010200"
export NTIME="2000010400"
fi

# Call J-job scripts
#
echo " ... PREP_EXP running ... "
${CYCLEDIR}/jobs/JLANDDA_PREP_EXP
export err=$?
if [ $err = 0 ]; then
echo " === PREP_EXP completed successfully === "
else
echo " ERROR: PREP_EXP failed !!! "
exit 1
fi

echo " ... PREP_OBS running ... "
${CYCLEDIR}/jobs/JLANDDA_PREP_OBS
export err=$?
if [ $err = 0 ]; then
echo " === PREP_OBS completed successfully === "
else
echo " ERROR: PREP_OBS failed !!! "
exit 2
fi

echo " ... PREP_BMAT running ... "
${CYCLEDIR}/jobs/JLANDDA_PREP_BMAT
export err=$?
if [ $err = 0 ]; then
echo " === PREP_BMAT completed successfully === "
else
echo " ERROR: PREP_BMAT failed !!! "
exit 3
fi

echo " ... RUN_ANA running ... "
${CYCLEDIR}/jobs/JLANDDA_RUN_ANA
export err=$?
if [ $err = 0 ]; then
echo " === RUN_ANA completed successfully === "
else
echo " ERROR: RUN_ANA failed !!! "
exit 4
fi

echo " ... RUN_FCST running ... "
${CYCLEDIR}/jobs/JLANDDA_RUN_FCST
export err=$?
if [ $err = 0 ]; then
echo " === RUN_FCST completed successfully === "
else
echo " ERROR: RUN_FCST failed !!! "
exit 5
fi

0 comments on commit d579f39

Please sign in to comment.