Generalize ARCH_CYC to support multiple cycle hours#6
Merged
RussTreadon-NOAA merged 2 commits intofeature/arch_cycfrom Feb 23, 2026
Merged
Generalize ARCH_CYC to support multiple cycle hours#6RussTreadon-NOAA merged 2 commits intofeature/arch_cycfrom
RussTreadon-NOAA merged 2 commits intofeature/arch_cycfrom
Conversation
…_vars.py Co-authored-by: RussTreadon-NOAA <26926959+RussTreadon-NOAA@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Generalize ARCH_CYC to support single and multiple cycle hours
Generalize ARCH_CYC to support multiple cycle hours
Feb 23, 2026
RussTreadon-NOAA
approved these changes
Feb 23, 2026
Owner
RussTreadon-NOAA
left a comment
There was a problem hiding this comment.
Changes look good. Tested on WCOSS2. Changes work as intended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ARCH_CYCinarchive_tar_vars.pyonly accepted a single integer, preventing archiving at multiple cycle hours without workarounds. This change generalizes parsing soARCH_CYCcan be specified as anint, a whitespace-separatedstr, or alist/tuple, and updates downstream boolean logic accordingly.Changes in
ush/python/pygfs/utils/archive_tar_vars.pyarch_cycwitharch_cyc_listbuilt from a type-dispatch parser:archive_increments:arch_cyc == cycle_hour→cycle_hour in arch_cyc_listarchive_ics:(arch_cyc - assim_freq) % 24 == cycle_hour→any((val - assim_freq) % 24 == cycle_hour for val in arch_cyc_list)cycle_houras a local variable to avoid repeatedstrftimecallsFully backward-compatible: a single integer
ARCH_CYC=12behaves identically to before.Type of change
Change characteristics
How has this been tested?
python -m py_compileARCH_CYCChecklist
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.