From 23c25527ad2a62275cd9105bd103b8520a28e573 Mon Sep 17 00:00:00 2001 From: Neil Barton <103681022+NeilBarton-NOAA@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:45:39 -0500 Subject: [PATCH] Update stage IC to handle ocean perturbations (#2364) This PR adds the option to stage ocean perturbation files for ensemble forecasts. These perturbation files are used in GEFS forecasts. A new variable is introduced in config.base to use the ocean perturbation files. This PR does not include using these perturbation files. A future PR will address this. --- parm/config/gefs/config.base.emc.dyn | 4 ++++ parm/config/gefs/config.stage_ic | 6 ++++++ scripts/exglobal_stage_ic.sh | 11 +++++++++++ 3 files changed, 21 insertions(+) diff --git a/parm/config/gefs/config.base.emc.dyn b/parm/config/gefs/config.base.emc.dyn index 0062aed163..5ae47e3948 100644 --- a/parm/config/gefs/config.base.emc.dyn +++ b/parm/config/gefs/config.base.emc.dyn @@ -259,6 +259,10 @@ export NMEM_ENS=@NMEM_ENS@ export ENSMEM=${ENSMEM:-"000"} export MEMDIR="mem${ENSMEM}" +# initialize ocean ensemble members with perturbations +# if true, only occurs for members greater than zero +export OCN_ENS_PERTURB_FILES=false + export DOIAU="NO" # While we are not doing IAU, we may want to warm start w/ IAU in the future # Check if cycle is cold starting if [[ "${EXP_WARM_START}" = ".false." ]]; then diff --git a/parm/config/gefs/config.stage_ic b/parm/config/gefs/config.stage_ic index e2bb0af2b8..b332ee1826 100644 --- a/parm/config/gefs/config.stage_ic +++ b/parm/config/gefs/config.stage_ic @@ -8,6 +8,12 @@ echo "BEGIN: config.stage_ic" source "${EXPDIR}/config.resources" stage_ic case "${CASE}" in + "C384") + export CPL_ATMIC="" + export CPL_ICEIC="" + export CPL_OCNIC="" + export CPL_WAVIC="" + ;; "C48") export CPL_ATMIC="gefs_test" export CPL_ICEIC="gefs_test" diff --git a/scripts/exglobal_stage_ic.sh b/scripts/exglobal_stage_ic.sh index 58b37f3114..c12eaa84e0 100755 --- a/scripts/exglobal_stage_ic.sh +++ b/scripts/exglobal_stage_ic.sh @@ -104,6 +104,17 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do ;; esac + # Ocean Perturbation Files + # Extra zero on MEMDIR ensure we have a number even if the string is empty + if (( 0${MEMDIR:3} > 0 )) && [[ "${OCN_ENS_PERTURB_FILES:-false}" == "true" ]]; then + src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.mom6_increment.nc" + tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.mom6_increment.nc" + ${NCP} "${src}" "${tgt}" + rc=${?} + ((rc != 0)) && error_message "${src}" "${tgt}" "${rc}" + err=$((err + rc)) + fi + # TODO: Do mediator restarts exists in a ATMW configuration? # TODO: No mediator is presumably involved in an ATMA configuration if [[ ${EXP_WARM_START:-".false."} = ".true." ]]; then