Skip to content

Commit

Permalink
restart name for WW3 is different if its a cmeps continue run
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA committed Jan 15, 2025
1 parent a5c3a93 commit 53c0226
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,16 @@ WW3_postdet() {
elif [[ -s "${ww3_binary_restart_file}" ]]; then
# found binary ww3 restart file
export WW3_restart_from_binary=true
${NCP} "${ww3_binary_restart_file}" "${DATA}/restart.ww3" \
if [[ -f "${DATA}/ufs.cpld.cpl.r.nc" ]]; then
#if this is a cmeps continue then the wave restart name is different
seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds
local ww3_restart_dest_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}"
${NCP} "${ww3_binary_restart_file}" "${DATA}/${WW3_restart_from_binary}" \
|| ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 )
else
${NCP} "${ww3_binary_restart_file}" "${DATA}/restart.ww3" \
|| ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 )
fi
else
if [[ "${RERUN}" == "YES" ]]; then
# In the case of a RERUN, the WW3 restart file is required
Expand Down

0 comments on commit 53c0226

Please sign in to comment.