From 5ca6e61908b58a9bdaece42647cae0fb307863c5 Mon Sep 17 00:00:00 2001 From: David Huber Date: Mon, 16 Dec 2024 09:50:50 -0600 Subject: [PATCH] Check freq before trying to calculate modulo --- 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 c6376206b3c..ed63a22230c 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: