Skip to content

Commit

Permalink
Fix error in rerunning a failed ensemble member
Browse files Browse the repository at this point in the history
When trying to rerun a failed ensemble member, the script would fail
due to `set -u` when grep returned non-zero for not being able to
find `PASS` in the group status file. This is resolved by turning it
off and then back on.
  • Loading branch information
WalterKolczynski-NOAA committed Oct 16, 2023
1 parent 081b528 commit 222d7de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/exgdas_enkf_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ for imem in $(seq "${ENSBEG}" "${ENSEND}"); do

skip_mem="NO"
if [[ -f ${EFCSGRP}.fail ]]; then
set +e
memstat=$(grep "MEMBER ${ENSMEM}" "${EFCSGRP}.fail" | grep -c "PASS")
set_strict
[[ ${memstat} -eq 1 ]] && skip_mem="YES"
fi

Expand Down

0 comments on commit 222d7de

Please sign in to comment.