Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,51 @@ declare -rx gPDY="${GDATE:0:8}"
declare -rx gcyc="${GDATE:8:2}"

# Construct COM variables from templates (see config.com)
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_ATMOS_RESTART COM_ATMOS_INPUT COM_ATMOS_ANALYSIS \
COM_ICE_ANALYSIS COM_ATMOS_HISTORY COM_ATMOS_MASTER COM_TOP COM_CONF
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_ATMOS_INPUT:COM_ATMOS_INPUT_TMPL \
COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \
COMOUT_CONF:COM_CONF_TMPL \
COMOUT_ATMOS_RESTART:COM_ATMOS_RESTART_TMPL \
COMOUT_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL \
COMOUT_ATMOS_MASTER:COM_ATMOS_MASTER_TMPL

RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL
COMIN_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL

if [[ "${DO_WAVE}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_WAVE_RESTART COM_WAVE_PREP COM_WAVE_HISTORY
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMOUT_WAVE_RESTART:COM_WAVE_RESTART_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL
COMIN_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL
fi

if [[ "${DO_OCN}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_MED_RESTART COM_OCEAN_RESTART COM_OCEAN_INPUT \
COM_OCEAN_HISTORY COM_OCEAN_ANALYSIS
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \
COMIN_OCEAN_INPUT:COM_OCEAN_INPUT_TMPL \
COMOUT_MED_RESTART:COM_MED_RESTART_TMPL \
COMOUT_OCEAN_RESTART:COM_OCEAN_RESTART_TMPL \
COMOUT_OCEAN_HISTORY:COM_OCEAN_HISTORY_TMPL
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL \
COM_MED_RESTART_PREV:COM_MED_RESTART_TMPL
COMIN_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL \
COMIN_MED_RESTART_PREV:COM_MED_RESTART_TMPL
fi

if [[ "${DO_ICE}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_ICE_HISTORY COM_ICE_INPUT COM_ICE_RESTART
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMIN_ICE_INPUT:COM_ICE_INPUT_TMPL \
COMIN_ICE_ANALYSIS:COM_ICE_ANALYSIS_TMPL \
COMOUT_ICE_RESTART:COM_ICE_RESTART_TMPL \
COMOUT_ICE_HISTORY:COM_ICE_HISTORY_TMPL
RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \
COM_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL
COMIN_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL
fi

if [[ "${DO_AERO}" == "YES" ]]; then
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_CHEM_HISTORY
YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx \
COMOUT_CHEM_HISTORY:COM_CHEM_HISTORY_TMPL
fi


Expand All @@ -79,7 +96,7 @@ if [[ "${RUN}" =~ "enkf" ]] && [[ "${SENDDBN:-}" == YES ]]; then
for (( fhr = FHOUT; fhr <= FHMAX; fhr + FHOUT )); do
if (( fhr % 3 == 0 )); then
fhr3=$(printf %03i "${fhr}")
"${DBNROOT}/bin/dbn_alert" MODEL GFS_ENKF "${job}" "${COM_ATMOS_HISTORY}/${RUN}.t${cyc}z.sfcf${fhr3}.nc"
"${DBNROOT}/bin/dbn_alert" MODEL GFS_ENKF "${job}" "${COMOUT_ATMOS_HISTORY}/${RUN}.t${cyc}z.sfcf${fhr3}.nc"
fi
done
fi
Expand Down
6 changes: 3 additions & 3 deletions ush/forecast_det.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ UFS_det(){
echo "SUB ${FUNCNAME[0]}: Run type determination for UFS"

# Determine if the current cycle is a warm start (based on the availability of restarts)
if [[ -f "${COM_ATMOS_RESTART_PREV}/${model_start_date_current_cycle:0:8}.${model_start_date_current_cycle:8:2}0000.coupler.res" ]]; then
if [[ -f "${COMIN_ATMOS_RESTART_PREV}/${model_start_date_current_cycle:0:8}.${model_start_date_current_cycle:8:2}0000.coupler.res" ]]; then
warm_start=".true."
fi

Expand All @@ -16,8 +16,8 @@ UFS_det(){
# Since restarts are not available from the previous cycle, this is likely a cold start
# Ensure cold start ICs are present when warm start is not set
# TODO: add checks for other cold start ICs as well
if [[ ! -f "${COM_ATMOS_INPUT}/gfs_ctrl.nc" ]]; then
echo "FATAL ERROR: Cold start ICs are missing from '${COM_ATMOS_INPUT}'"
if [[ ! -f "${COMIN_ATMOS_INPUT}/gfs_ctrl.nc" ]]; then
echo "FATAL ERROR: Cold start ICs are missing from '${COMIN_ATMOS_INPUT}'"
exit 1
fi

Expand Down
Loading