From 7910cbed2eafb225af4fa0a8d6c02d31e601a7c4 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Thu, 19 Dec 2024 14:02:51 +0000 Subject: [PATCH] update for hafs downstream --- ush/forecast_postdet.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index df98fd9112..0d764b515f 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -461,10 +461,12 @@ WW3_out() { fi # Copy restarts for next cycle for RUN=gdas|enkfgdas|enkfgfs + # TO DO: Will need to add if gefs here for self-cycled GEFS + # not added now since unclear if gefs has appropriate restart times for this yet if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then local restart_date restart_date="${model_start_date_next_cycle}" - echo "Copying CICE restarts for 'RUN=${RUN}' at ${restart_date}" + echo "Copying WW3 restarts for 'RUN=${RUN}' at ${restart_date}" #seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds #source_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" target_file="${restart_date:0:8}.${restart_date:8:2}0000.restart.ww3.nc" @@ -472,6 +474,16 @@ WW3_out() { "${COMOUT_WAVE_RESTART}/${target_file}" fi + #Copy restarts for downstream usage in HAFS + if [[ "${RUN}" =~ "gdas" ]]; then + local restart_date + restart_date="${next_cycle}" + echo "Copying WW3 restarts for 'RUN=${RUN}' at ${restart_date}" + target_file="${restart_date:0:8}.${restart_date:8:2}0000.restart.ww3.nc" + ${NCP} "${DATArestart}/WW3_RESTART/${target_file}" \ + "${COMOUT_WAVE_RESTART}/${target_file}" + fi + }