Skip to content

Commit

Permalink
Hotfix for gdas_arch div/0 (NOAA-EMC#3169)
Browse files Browse the repository at this point in the history
This fixes a div/0 error when `ARCH_EXPDIR_FREQ=0`.

Resolves NOAA-EMC#3168
  • Loading branch information
DavidHuber-NOAA authored Dec 16, 2024
1 parent be7626d commit b6936ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b6936ee

Please sign in to comment.