Skip to content

Commit

Permalink
Update JGLOBAL_STAGE_IC for cycled mode
Browse files Browse the repository at this point in the history
Also update wave COM variable

Refs NOAA-EMC#2475
  • Loading branch information
KateFriedman-NOAA committed Jun 14, 2024
1 parent 60511e9 commit f9e3a9c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions jobs/JGLOBAL_STAGE_IC
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ gcyc="${GDATE:8:2}"

# Define MEMDIR_ARRAY
MEMDIR_ARRAY=()
if [[ "${RUN:-}" = "gefs" ]]; then
if [[ "${RUN:-}" = "enkfgdas" || "${RUN:-}" = "gefs" ]]; then
if [[ "${RUN:-}" = "gefs" ]]; then
ii_start=0
elif [[ "${RUN:-}" = "enkfgdas" ]]; then
ii_start=1
fi
# Populate the member_dirs array based on the value of NMEM_ENS
for ((ii = 0; ii <= "${NMEM_ENS:-0}"; ii++)); do
for ((ii = "${ii_start}"; ii <= "${NMEM_ENS:-0}"; ii++)); do
MEMDIR_ARRAY+=("mem$(printf "%03d" "${ii}")")
done
else
Expand All @@ -36,6 +41,11 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
export MEMDIR

# Declare COMs
if [[ "${MODE}" = "cycled" && "${RUN:-}" = "gdas" ]]; then
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_ANALYSIS
export COM_ATMOS_ANALYSIS
fi

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
Expand All @@ -53,8 +63,8 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
export COM_ICE_RESTART_PREV
fi
if [[ "${DO_WAVE:-}" = "YES" ]]; then
YMD=${PDY} HH=${cyc} declare_from_tmpl COM_WAVE_RESTART
export COM_WAVE_RESTART
YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL
export COM_WAVE_RESTART_PREV
fi

# Execute staging
Expand Down

0 comments on commit f9e3a9c

Please sign in to comment.