Skip to content

Commit

Permalink
Update for pythonization of stage script
Browse files Browse the repository at this point in the history
- Update script extension for ex-script from "sh" to "py".
- Pull COM* variable declares up from ex-script.

Refs NOAA-EMC#2475
  • Loading branch information
KateFriedman-NOAA committed May 14, 2024
1 parent 25a959e commit 9bf02ee
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion jobs/JGLOBAL_STAGE_IC
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,31 @@ rCDUMP=${CDUMP}
[[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas"
export rCDUMP

# Locally scoped variables and functions
# shellcheck disable=SC2153
GDATE=$(date --utc -d "${PDY} ${cyc} - ${assim_freq} hours" +%Y%m%d%H)
gPDY="${GDATE:0:8}"
gcyc="${GDATE:8:2}"

# Declare COMs
if [[ ${EXP_WARM_START:-".false."} = ".true." ]]; then
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_MED_RESTART_PREV:COM_MED_RESTART_TMPL
else
YMD=${PDY} HH=${cyc} declare_from_tmpl COM_ATMOS_INPUT
fi
if [[ "${DO_OCN:-}" = "YES" ]]; then
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL
fi
if [[ "${DO_ICE:-}" = "YES" ]]; then
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL
fi
if [[ "${DO_WAVE:-}" = "YES" ]]; then
YMD=${PDY} HH=${cyc} declare_from_tmpl COM_WAVE_RESTART
fi

# Execute the Script
"${SCRgfs}/exglobal_stage_ic.sh"
"${SCRgfs}/exglobal_stage_ic.py"

##########################################
# Remove the Temporary working directory
Expand Down

0 comments on commit 9bf02ee

Please sign in to comment.