From 4b96c1237c562b67650c2d2fa015984c95b228eb Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Sat, 27 Apr 2024 19:03:26 -0400 Subject: [PATCH] Turn C48mx500_3DVarAOWCDA back on (#2543) This PR turns the C48mx500_3DVarAOWCDA test back on. This required a few bugfixes in GDAS app which have now been merged. Resolves #2438 Resolves #2528 co-authors: @guillaumevernieres and @aerorahul who provided the bug fixes. --- ci/cases/pr/C48mx500_3DVarAOWCDA.yaml | 1 - jobs/JGLOBAL_FORECAST | 3 ++- sorc/gdas.cd | 2 +- ush/forecast_postdet.sh | 19 ++++++++++++------- ush/forecast_predet.sh | 10 ++++++++++ ush/parsing_model_configure_FV3.sh | 2 +- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml b/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml index 3356f2030b..fd056cf895 100644 --- a/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml +++ b/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml @@ -20,5 +20,4 @@ arguments: skip_ci_on_hosts: - wcoss2 - orion - - hera - hercules diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 989f69756d..6c4200dd6e 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -51,7 +51,8 @@ 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 RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \ - COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL + COM_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL \ + COM_MED_RESTART_PREV:COM_MED_RESTART_TMPL fi if [[ "${DO_ICE}" == "YES" ]]; then diff --git a/sorc/gdas.cd b/sorc/gdas.cd index fc62ef5f4d..1b07517a22 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit fc62ef5f4ddcd2c13df515b593e5ce1c7b5dd10b +Subproject commit 1b07517a22cd569d35ee24d341c15a97fc6ad932 diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 1c0c50de20..fd1ef9a078 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -89,15 +89,20 @@ FV3_postdet() { fi done - # Need a coupler.res when doing IAU + # Need a coupler.res that is consistent with the model start time if [[ "${DOIAU}" == "YES" ]]; then - rm -f "${DATA}/INPUT/coupler.res" - cat >> "${DATA}/INPUT/coupler.res" << EOF - 3 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) - ${previous_cycle:0:4} ${previous_cycle:4:2} ${previous_cycle:6:2} ${previous_cycle:8:2} 0 0 Model start time: year, month, day, hour, minute, second - ${current_cycle_begin:0:4} ${current_cycle_begin:4:2} ${current_cycle_begin:6:2} ${current_cycle_begin:8:2} 0 0 Current model time: year, month, day, hour, minute, second -EOF + local model_start_time="${previous_cycle}" + local model_current_time="${current_cycle_begin}" + else + local model_start_time="${current_cycle}" + local model_current_time="${current_cycle}" fi + rm -f "${DATA}/INPUT/coupler.res" + cat >> "${DATA}/INPUT/coupler.res" << EOF + 3 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) + ${model_start_time:0:4} ${model_start_time:4:2} ${model_start_time:6:2} ${model_start_time:8:2} 0 0 Model start time: year, month, day, hour, minute, second + ${model_current_time:0:4} ${model_current_time:4:2} ${model_current_time:6:2} ${model_current_time:8:2} 0 0 Current model time: year, month, day, hour, minute, second +EOF # Create a array of increment files local inc_files inc_file iaufhrs iaufhr diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 6605a9fa95..a5944d5bd2 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -86,8 +86,18 @@ FV3_predet(){ FHCYC=${FHCYC:-24} restart_interval=${restart_interval:-${FHMAX}} # restart_interval = 0 implies write restart at the END of the forecast i.e. at FHMAX + # Convert restart interval into an explicit list for FV3 if (( restart_interval == 0 )); then restart_interval=${FHMAX} + FV3_RESTART_FH=("${restart_interval}") + else + # shellcheck disable=SC2312 + mapfile -t FV3_RESTART_FH < <(seq "${restart_interval}" "${restart_interval}" "${FHMAX}") + # If the last forecast hour is not in the array, add it + local nrestarts=${#FV3_RESTART_FH[@]} + if (( FV3_RESTART_FH[nrestarts-1] != FHMAX )); then + FV3_RESTART_FH+=("${FHMAX}") + fi fi # Convert output settings into an explicit list for FV3 diff --git a/ush/parsing_model_configure_FV3.sh b/ush/parsing_model_configure_FV3.sh index 62d023a369..59d9fb6910 100755 --- a/ush/parsing_model_configure_FV3.sh +++ b/ush/parsing_model_configure_FV3.sh @@ -24,7 +24,7 @@ local SHOUR=${model_start_date:8:2} # FHMAX local FHROT=${IAU_FHROT:-0} local DT_ATMOS=${DELTIM} -local RESTART_INTERVAL="${restart_interval} -1" +local RESTART_INTERVAL="${FV3_RESTART_FH[*]}" # QUILTING local QUILTING_RESTART=".true." local WRITE_GROUP=${WRITE_GROUP:-1}