Skip to content

Commit

Permalink
Add enkf back into cleanup
Browse files Browse the repository at this point in the history
The streamlining of the cleanup script resulted in enkf not being
cleaned up. Script not runs for `$RUN` and `enkf${RUN}`. Since the
existence of the directory is checked before trying to clean up,
it doesn't matter if `enkf${RUN}` is not a valid `$RUN` for the
experiment.

Refs #583
  • Loading branch information
WalterKolczynski-NOAA committed Oct 16, 2023
1 parent 222d7de commit 611fa09
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions scripts/exglobal_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,19 @@ for (( current_date=first_date; current_date <= last_date; \
# TODO: This needs to be revamped to not look at the rocoto log.
# shellcheck disable=SC2312
if [[ $(tail -n 1 "${rocotolog}") =~ "This cycle is complete: Success" ]]; then
YMD="${current_PDY}" HH="${current_cyc}" generate_com COM_TOP
# Also cleanup the enkf version of $RUN. Since the directory's existence
# is checked first, it doesn't matter if that is not a legitimate $RUN
# for this experiment.
runs_to_clean=("${RUN}" "enkf${RUN}")
for run in "${runs_to_clean[@]}"; do
RUN=${run} YMD="${current_PDY}" HH="${current_cyc}" generate_com COM_TOP
if [[ -d "${COM_TOP}" ]]; then
exclude_list=("prepbufr" "cnvstat" "atmanl.nc")
remove_files "${COM_TOP}" "${exclude_list[@]:-}"

if [[ -d "${COM_TOP}" ]]; then
exclude_list=("prepbufr" "cnvstat" "atmanl.nc")
remove_files "${COM_TOP}" "${exclude_list[@]:-}"

if [[ -d "${rtofs_dir}" ]] && (( current_date < last_rtofs )); then rm -rf "${rtofs_dir}" ; fi
fi
if [[ -d "${rtofs_dir}" ]] && (( current_date < last_rtofs )); then rm -rf "${rtofs_dir}" ; fi
fi
done
fi
fi

Expand Down

0 comments on commit 611fa09

Please sign in to comment.