Skip to content

Generalize ARCH_CYC for single cycle or list of cycles#4585

Merged
DavidHuber-NOAA merged 18 commits intoNOAA-EMC:developfrom
RussTreadon-NOAA:feature/arch_cyc
Feb 27, 2026
Merged

Generalize ARCH_CYC for single cycle or list of cycles#4585
DavidHuber-NOAA merged 18 commits intoNOAA-EMC:developfrom
RussTreadon-NOAA:feature/arch_cyc

Conversation

@RussTreadon-NOAA
Copy link
Contributor

@RussTreadon-NOAA RussTreadon-NOAA commented Feb 24, 2026

Description

Generalize ARCH_CYC to work with either a single cycle (current behavior) or a list of cycles (new functionality)

Resolves #4565

Type of change

  • New feature (adds functionality)

Change characteristics

  • Is this change expected to change outputs (e.g. value changes to existing outputs, new files stored in COM, files removed from COM, filename changes, additions/subtractions to archives)? NO
  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO

How has this been tested?

  • Install on Ursa and WCOSS and run modified g-w CI to test added functionality.
  • Run standard g-w CI to ensure existing functionality is not broken

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have documented my code, including function, input, and output descriptions
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • This change is covered by an existing CI test or a new one has been added

RussTreadon-NOAA and others added 17 commits February 17, 2026 19:08
- Added Union and Tuple to typing imports
- Added _normalize_arch_cyc helper method for DRY ARCH_CYC normalization
- Refactored _arch_warm_start_increments with better validation and docstrings
- Refactored _arch_warm_restart_ics with improved error handling and case-insensitive RUN matching
- Replaced magic number 24 with HOURS_PER_DAY constant
- Enhanced docstrings with complete parameter and return documentation
- Improved variable names for clarity (cycle_hours, adjusted_cycle_hours)
- Added comprehensive error handling with descriptive messages
- Used .startswith() for more robust GDAS detection
- All changes validated with tests

Co-authored-by: RussTreadon-NOAA <[email protected]>
…hods

Refactor archive methods for robustness and consistency
…yc-usage

Generalize ARCH_CYC to support multiple cycle hours
Co-authored-by: Copilot <[email protected]>
@RussTreadon-NOAA RussTreadon-NOAA self-assigned this Feb 24, 2026
@RussTreadon-NOAA
Copy link
Contributor Author

WCOSS2 and Ursa g-w CI

Install feature/arch_cyc at 3ee60a7 on WCOSS2 (Dogwood) and Ursa. Run g-w CI with the following results

WCOSS2 (Dogwood)

SKIP C48_ATM_ecflow on wcoss2
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48_ATM_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Feb 24 2026 16:45:17    Feb 24 2026 17:40:32
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48_gsienkf_atmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 16:45:19    Feb 25 2026 13:55:37
202402240000        Done    Feb 24 2026 16:45:19    Feb 25 2026 14:45:45
202402240600        Done    Feb 24 2026 16:45:19    Feb 25 2026 15:30:54
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48mx500_3DVarAOWCDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Feb 24 2026 16:45:20    Feb 24 2026 18:01:04
202103250000        Done    Feb 24 2026 16:45:20    Feb 24 2026 18:20:42
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48mx500_hybAOWCDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Feb 24 2026 16:45:22    Feb 24 2026 17:05:32
202103250000        Done    Feb 24 2026 16:45:22    Feb 24 2026 18:05:34
 
SKIP C48_S2SWA_gefs_RT on wcoss2
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48_S2SWA_gefs_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Feb 24 2026 16:45:24    Feb 24 2026 18:05:38
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48_S2SW_extended_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Feb 24 2026 16:45:27    Feb 24 2026 19:05:49
202103231800        Done    Feb 24 2026 16:45:27    Feb 24 2026 19:00:55
 
SKIP C48_S2SW on wcoss2
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C48_ufsenkf_atmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 16:45:29    Feb 24 2026 17:05:45
202402240000        Done    Feb 24 2026 16:45:29    Feb 24 2026 18:01:25
202402240600        Done    Feb 24 2026 16:45:29    Feb 24 2026 18:50:54
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96_atm3DVar_extended_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Feb 24 2026 16:45:31    Feb 24 2026 19:10:55
202112210000        Done    Feb 24 2026 16:45:31    Feb 24 2026 22:40:41
202112210600        Done    Feb 24 2026 16:45:31    Feb 24 2026 23:11:03
202112211200        Done    Feb 24 2026 19:15:44    Feb 25 2026 00:55:57
202112211800        Done    Feb 24 2026 22:45:28    Feb 25 2026 03:20:54
 
SKIP C96_atm3DVar on wcoss2
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96C48_hybatmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Feb 24 2026 16:45:34    Feb 24 2026 17:10:42
202112210000        Done    Feb 24 2026 16:45:34    Feb 24 2026 19:06:04
202112210600        Done    Feb 24 2026 16:45:34    Feb 24 2026 18:55:53
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96C48_hybatmsnowDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 16:45:35    Feb 24 2026 17:10:45
202112201800        Done    Feb 24 2026 16:45:35    Feb 24 2026 18:55:56
202112210000        Done    Feb 24 2026 16:45:35    Feb 24 2026 18:51:05
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96C48_hybatmsoilDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202205150600        Done    Feb 24 2026 16:45:37    Feb 24 2026 17:10:48
202205151200        Done    Feb 24 2026 16:45:37    Feb 24 2026 19:01:10
202205151800        Done    Feb 24 2026 16:45:37    Feb 24 2026 19:01:10
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96C48mx500_S2SW_cyc_gfs_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 16:45:39    Feb 24 2026 18:36:09
202112201800        Done    Feb 24 2026 16:45:39    Feb 24 2026 19:31:10
202112210000        Done    Feb 24 2026 16:45:39    Feb 24 2026 19:51:08
202112211800        Done    Feb 24 2026 18:40:53    Feb 24 2026 20:01:36
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96C48_ufsgsi_hybatmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 16:45:42    Feb 24 2026 17:10:55
202402240000        Done    Feb 24 2026 16:45:42    Feb 24 2026 19:15:59
202402240600        Done    Feb 24 2026 16:45:42    Feb 24 2026 19:06:14
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96C48_ufs_hybatmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 16:45:44    Feb 24 2026 17:10:58
202402240000        Done    Feb 24 2026 16:45:44    Feb 24 2026 19:16:02
202402240600        Done    Feb 24 2026 16:45:44    Feb 24 2026 18:56:11
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96_gcafs_cycled_noDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 16:45:48    Feb 24 2026 17:06:16
202112201800        Done    Feb 24 2026 16:45:48    Feb 24 2026 19:06:22
202112210000        Done    Feb 24 2026 16:45:48    Feb 24 2026 17:56:47
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96_gcafs_cycled_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 16:45:46    Feb 24 2026 17:06:12
202112201800        Done    Feb 24 2026 16:45:46    Feb 24 2026 19:20:48
202112210000        Done    Feb 24 2026 16:45:46    Feb 24 2026 18:36:20
 
/lfs/h2/emc/ptmp/russ.treadon/EXPDIR/C96mx100_S2S_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
199405010000        Done    Feb 24 2026 16:45:50    Feb 24 2026 18:21:28

All jobs in all g-w cases run on WCOSS2 (Dogwood) successfully ran to completion.

The configuration for C96C48_ufshybatmDA was modified to set DO_ARCHCOM="YES" in config.base and ARCH_CYC="00,06,12,18" in config.arch_tars. A check of the tar log files shows that enkfgdas and gdas restart tarballs were created at 00 and 06Z. The C96C48_ufshybatmDA only runs full cycles at 00 and 06Z.

Ursa

/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48_ATM_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Feb 24 2026 15:40:06    Feb 24 2026 16:40:06
 
SKIP C48_ATM_ecflow on ursa
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48_S2SW_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Feb 24 2026 15:40:08    Feb 24 2026 16:40:08
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48_S2SWA_gefs_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103231200        Done    Feb 24 2026 15:40:07    Feb 24 2026 17:15:07
 
SKIP C48_S2SWA_gefs_RT on ursa
 
SKIP C48_S2SW_extended on ursa
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48_gsienkf_atmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 15:40:08    Feb 24 2026 16:00:10
202402240000        Done    Feb 24 2026 15:40:08    Feb 24 2026 16:55:08
202402240600        Done    Feb 24 2026 15:40:08    Feb 24 2026 17:50:08
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48_ufsenkf_atmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 15:40:09    Feb 24 2026 16:00:11
202402240000        Done    Feb 24 2026 15:40:09    Feb 24 2026 17:00:10
202402240600        Done    Feb 24 2026 15:40:09    Feb 24 2026 18:05:09
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48mx500_3DVarAOWCDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Feb 24 2026 15:40:10    Feb 24 2026 16:55:11
202103250000        Done    Feb 24 2026 15:40:10    Feb 24 2026 17:45:11
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C48mx500_hybAOWCDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202103241800        Done    Feb 24 2026 15:40:11    Feb 24 2026 16:10:12
202103250000        Done    Feb 24 2026 15:40:11    Feb 24 2026 17:20:12
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96C48_hybatmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Feb 24 2026 15:40:12    Feb 25 2026 13:55:12
202112210000        Done    Feb 24 2026 15:40:12    Feb 25 2026 14:00:13
202112210600        Done    Feb 24 2026 15:40:12    Feb 25 2026 14:00:13
202112211200        Done    Feb 25 2026 14:00:13    Feb 25 2026 15:20:13
202112211800        Done    Feb 25 2026 14:05:12    Feb 25 2026 16:10:12
202112220000        Done    Feb 25 2026 14:05:12    Feb 25 2026 17:20:13
202112220600        Done    Feb 25 2026 15:25:11    Feb 25 2026 17:40:12
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96C48_hybatmsnowDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 15:40:13    Feb 24 2026 16:15:15
202112201800        Done    Feb 24 2026 15:40:13    Feb 24 2026 17:45:14
202112210000        Done    Feb 24 2026 15:40:13    Feb 24 2026 17:55:12
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96C48_hybatmsoilDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202205150600        Done    Feb 24 2026 15:40:14    Feb 24 2026 16:15:16
202205151200        Done    Feb 24 2026 15:40:14    Feb 24 2026 17:50:14
202205151800        Done    Feb 24 2026 15:40:14    Feb 24 2026 18:35:13
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96C48_ufs_hybatmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 15:40:15    Feb 24 2026 16:15:17
202402240000        Done    Feb 24 2026 15:40:15    Feb 24 2026 18:15:15
202402240600        Done    Feb 24 2026 15:40:15    Feb 24 2026 18:25:14
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96C48_ufsgsi_hybatmDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202402231800        Done    Feb 24 2026 15:40:16    Feb 24 2026 16:15:18
202402240000        Done    Feb 24 2026 15:40:16    Feb 24 2026 18:05:16
202402240600        Done    Feb 24 2026 15:40:16    Feb 24 2026 18:35:15
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96C48mx500_S2SW_cyc_gfs_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 15:40:18    Feb 24 2026 17:20:20
202112201800        Done    Feb 24 2026 15:40:18    Feb 24 2026 18:50:16
202112210000        Done    Feb 24 2026 15:40:18    Feb 24 2026 19:15:16
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96_atm3DVar_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201800        Done    Feb 24 2026 15:40:19    Feb 24 2026 16:15:20
202112210000        Done    Feb 24 2026 15:40:19    Feb 24 2026 17:55:18
202112210600        Done    Feb 24 2026 15:40:19    Feb 24 2026 18:35:17
 
SKIP C96_atm3DVar_extended on ursa
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96_gcafs_cycled_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 15:40:19    Feb 24 2026 16:15:21
202112201800        Done    Feb 24 2026 15:40:19    Feb 24 2026 17:55:19
202112210000        Done    Feb 24 2026 15:40:19    Feb 24 2026 17:50:19
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96_gcafs_cycled_noDA_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
202112201200        Done    Feb 24 2026 15:40:20    Feb 24 2026 16:15:22
202112201800        Done    Feb 24 2026 15:40:20    Feb 24 2026 17:45:21
202112210000        Done    Feb 24 2026 15:40:20    Feb 24 2026 17:15:22
 
/scratch4/NCEPDEV/stmp/Russ.Treadon/ursa/EXPDIR/C96mx100_S2S_arch_cyc
   CYCLE         STATE           ACTIVATED              DEACTIVATED     
199405010000        Done    Feb 24 2026 15:40:21    Feb 24 2026 17:20:24

All jobs in all g-w CI cases run on Ursa successfully ran to completion.

The Ursa C96C48_hybatmDA case was extended to run out to 2021122206 with ARCH_CYC="00,06,12,18". A check of the tar log files finds that gdas and enkfgdas restarts were written for each cycle. The gfs only ran at 2021122100. The gfs restart was written for this cycle.

@RussTreadon-NOAA
Copy link
Contributor Author

Given acceptable results from g-w CI tests on WCOSS2 (Dogwood) and Ursa, this PR is ready for review.

@RussTreadon-NOAA RussTreadon-NOAA marked this pull request as ready for review February 25, 2026 19:01
@DavidHuber-NOAA
Copy link
Contributor

Thank you for adding this capability @RussTreadon-NOAA! Merging.

@DavidHuber-NOAA DavidHuber-NOAA merged commit aabb941 into NOAA-EMC:develop Feb 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalize ARCH_CYC to allow a list of cycles

3 participants