Skip to content

Commit

Permalink
Updates for handling IAU for cold start
Browse files Browse the repository at this point in the history
- Move DOIAU="NO" to config.stage_ic
- Add similar condition check to forecast_predet.sh

Refs #2865
  • Loading branch information
KateFriedman-NOAA committed Sep 30, 2024
1 parent 7989151 commit 2245e8b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 0 additions & 1 deletion parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ export ENKF_SPREAD="YES"

# Check if cycle is cold starting, DOIAU off, or free-forecast mode
if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${DOIAU}" = "NO" ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then
export DOIAU="NO" # Force it off for cold-start
export IAU_OFFSET=0
export IAU_FHROT=0
export IAUFHRS="6,"
Expand Down
4 changes: 4 additions & 0 deletions parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export BASE_IC="@BASE_IC@" # Platform home for staged ICs

export STAGE_IC_YAML_TMPL="${PARMgfs}/stage/master_gfs.yaml.j2"

if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then
export DOIAU="NO" # Force it off for cold-start
fi

# Set ICSDIR (if not defined)
if [[ -z "${ICSDIR}" ]] ; then

Expand Down
3 changes: 3 additions & 0 deletions ush/forecast_det.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ UFS_det(){
DOIAU="NO"
IAU_OFFSET=0
model_atmos_start_date_current_cycle=${current_cycle}
model_ice_start_date_current_cycle=${current_cycle}
model_med_start_date_current_cycle=${current_cycle}
model_ocean_start_date_current_cycle=${current_cycle}

# It is still possible that a restart is available from a previous forecast attempt
# So we have to continue checking for restarts
Expand Down
12 changes: 8 additions & 4 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ common_predet(){

# Define model start date for current_cycle and next_cycle as the time the forecast will start
if [[ "${DOIAU:-NO}" == "YES" ]]; then
model_start_date_current_cycle="${current_cycle_begin}"
if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then

Check notice

Code scanning / shellcheck

Possible misspelling: SDATE may not be assigned. Did you mean CDATE? Note

Possible misspelling: SDATE may not be assigned. Did you mean CDATE?
model_start_date_current_cycle="${current_cycle}"
else
model_start_date_current_cycle="${current_cycle_begin}"
fi
model_start_date_next_cycle="${next_cycle_begin}"
else
if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then
Expand All @@ -105,11 +109,11 @@ common_predet(){
model_atmos_start_date_current_cycle="${model_start_date_current_cycle}"
model_atmos_start_date_next_cycle="${model_start_date_next_cycle}"
model_ice_start_date_current_cycle="${model_start_date_current_cycle}"
model_ice_start_date_next_cycle="${next_cycle}"
model_ice_start_date_next_cycle="${model_start_date_next_cycle}"
model_med_start_date_current_cycle="${model_start_date_current_cycle}"
model_med_start_date_next_cycle="${next_cycle}"
model_med_start_date_next_cycle="${model_start_date_next_cycle}"
model_ocean_start_date_current_cycle="${model_start_date_current_cycle}"
model_ocean_start_date_next_cycle="${next_cycle}"
model_ocean_start_date_next_cycle="${model_start_date_next_cycle}"
model_wave_start_date_current_cycle="${current_cycle}"

FHMIN=${FHMIN:-0}
Expand Down

0 comments on commit 2245e8b

Please sign in to comment.