From f0b912be6f2cf2fac590272253f19cb082fbf5f2 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:46:32 +0000 Subject: [PATCH] Fix *earc jobs where the number of members isn't a multiple of 10 (#2424) This limits the earc search for ensemble members to the maximum number of members, which prevents attempting to send non-existent members to HPSS if the number of ensemble members is not a multiple of 10. Resolves #2390s --- ush/hpssarch_gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/hpssarch_gen.sh b/ush/hpssarch_gen.sh index eadd465421..8b61cac948 100755 --- a/ush/hpssarch_gen.sh +++ b/ush/hpssarch_gen.sh @@ -681,7 +681,7 @@ if [[ ${type} == "enkfgdas" || ${type} == "enkfgfs" ]]; then touch "${DATA}/${RUN}_restartb_grp${n}.txt" m=1 - while (( m <= NMEM_EARCGRP )); do + while (( m <= NMEM_EARCGRP && (n-1)*NMEM_EARCGRP+m <= NMEM_ENS )); do nm=$(((n-1)*NMEM_EARCGRP+m)) mem=$(printf %03i ${nm}) head="${RUN}.t${cyc}z."