Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

from wxflow import (AttrDict, FileHandler, Hsi, Htar, Task, to_timedelta,
chgrp, get_gid, logit, mkdir_p, parse_j2yaml, rm_p, rmdir,
strftime, to_YMDH, which, chdir, ProcessError, save_as_yaml)
strftime, to_YMDH, which, chdir, ProcessError, save_as_yaml,
add_to_datetime)

git_filename = "git_info.log"
logger = getLogger(__name__.split('.')[-1])
Expand Down Expand Up @@ -688,7 +689,8 @@ def _arch_warm_restart_ics(self, arch_dict: Dict[str, Any]) -> bool:
# Not the right cycle hour
return False

days_since_sdate = (arch_dict.current_cycle - SDATE).days
ics_offset_cycle = add_to_datetime(arch_dict.current_cycle, to_timedelta(f"+{assim_freq}H"))
days_since_sdate = (ics_offset_cycle - SDATE).days
if arch_dict.ARCH_WARMICFREQ > 0 and days_since_sdate % arch_dict.ARCH_WARMICFREQ == 0:
# We are on the right cycle hour and the right day
return True
Expand Down
Loading