From 55e47c67cd26c1b12f65d5278a09b851c63d8d78 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Tue, 6 Aug 2024 17:05:28 +0000 Subject: [PATCH] MEMDIR updates in JGLOBAL_STAGE_IC - Remove MEMDIR export - Add MEMDIR input for all declare commands that may need it; if not gefs or enkfgdas then MEMDIR will be empty and COM won't include - Remove incorrect comment about locally scoped variables Refs #2475 --- jobs/JGLOBAL_STAGE_IC | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index 6c6304526e..33b44f2a70 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -10,7 +10,6 @@ rRUN=${RUN} [[ ${RUN} == "gfs" ]] && rRUN="gdas" # Define significant cycles -# Locally scoped variables and functions # shellcheck disable=SC2153 half_window=$(( assim_freq / 2 )) current_cycle="${PDY}${cyc}" @@ -53,31 +52,28 @@ err=0 ############################################################### for MEMDIR in "${MEMDIR_ARRAY[@]}"; do - # Export MEMDIR; need even if empty - export MEMDIR - # Declare COMs if [[ "${MODE}" = "cycled" && "${RUN}" = "gdas" ]]; then YMD=${current_cycle:0:8} HH=${current_cycle:8:2} declare_from_tmpl -x COMOUT_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL fi if [[ ${EXP_WARM_START:-".false."} = ".true." ]]; then - RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL - RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_MED_RESTART_PREV:COM_MED_RESTART_TMPL + MEMDIR=${MEMDIR} RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL + MEMDIR=${MEMDIR} RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_MED_RESTART_PREV:COM_MED_RESTART_TMPL else - YMD=${current_cycle:0:8} HH=${current_cycle:8:2} declare_from_tmpl -x COMOUT_ATMOS_INPUT:COM_ATMOS_INPUT_TMPL + MEMDIR=${MEMDIR} YMD=${current_cycle:0:8} HH=${current_cycle:8:2} declare_from_tmpl -x COMOUT_ATMOS_INPUT:COM_ATMOS_INPUT_TMPL fi if [[ "${DO_OCN:-}" = "YES" ]]; then - RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL + MEMDIR=${MEMDIR} RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_OCEAN_RESTART_PREV:COM_OCEAN_RESTART_TMPL if [[ "${REPLAY_ICS:-NO}" = "YES" ]]; then - YMD=${current_cycle:0:8} HH=${current_cycle:8:2} declare_from_tmpl -x COMOUT_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL + MEMDIR=${MEMDIR} YMD=${current_cycle:0:8} HH=${current_cycle:8:2} declare_from_tmpl -x COMOUT_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL fi fi if [[ "${DO_ICE:-}" = "YES" ]]; then - RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL + MEMDIR=${MEMDIR} RUN=${rRUN} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_ICE_RESTART_PREV:COM_ICE_RESTART_TMPL fi if [[ "${DO_WAVE:-}" = "YES" ]]; then - YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL + MEMDIR=${MEMDIR} YMD=${previous_cycle:0:8} HH=${previous_cycle:8:2} declare_from_tmpl -x COMOUT_WAVE_RESTART_PREV:COM_WAVE_RESTART_TMPL fi # Execute staging