From b6936ee558b9b93cba1cbfd2a080f85f78774c48 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:44:23 -0500 Subject: [PATCH] Hotfix for gdas_arch div/0 (#3169) This fixes a div/0 error when `ARCH_EXPDIR_FREQ=0`. Resolves #3168 --- ush/python/pygfs/task/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/python/pygfs/task/archive.py b/ush/python/pygfs/task/archive.py index c6376206b3..ed63a22230 100644 --- a/ush/python/pygfs/task/archive.py +++ b/ush/python/pygfs/task/archive.py @@ -487,7 +487,7 @@ def _archive_expdir(self, arch_dict: Dict[str, Any]) -> bool: if current_cycle in [first_full, edate]: # Always save the first and last return True - elif (current_cycle - first_full).total_seconds() % freq == 0: + elif freq != 0 and (current_cycle - first_full).total_seconds() % freq == 0: # Otherwise, the frequency is in hours return True else: