Skip to content

Conversation

TerrenceMcGuinness-NOAA
Copy link
Collaborator

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA commented Oct 1, 2025

Description

This PR adds a few new cases to the CTest framework for the NOAA Global Workflow.

  • Move verbose details of the framework to read-the-docs
  • Simplified README.md to how-to
  • Fully tested in development pipeline

Resolves #3871

image

Summary of Changes

Added C48 Test Cases

Detailed Changes (follow links for more details)

C48 Fixed Atmosphere-Only Tests (ATM)

  • C48_ATM-gfs_fcst_seg0
    • 120-hour deterministic forecast validation (209 output files)
    • 13 input files (atmosphere initial conditions)
    • 18 output files (forecast history files)
  • C48_ATM-gfs_atmos_prod_f000-f002
    • Atmosphere product generation test (f000, f001, f002)
    • 5 input files (forecast history from f000, f001, f002)
    • 12 output files (post-processed products)

C48 Coupled System Tests (S2SW)

  • C48_S2SW-gfs_fcst_seg0
    • 48-hour coupled atmosphere-ocean-ice-wave forecast
    • Fixed coupled forecast test with proper restart staging
    • 17 input files (13 atmosphere ICs + 3 restarts + 1 wave prep)
    • 24 output files (18 atmos + 2 ocean + 2 ice + 2 wave)
    • Key fix: Added H_offset = '-6H' for staging restart files from previous cycle
  • C48_S2SW-gfs_ocean_prod_f006
    • Ocean product generation at forecast hour 6
    • 2 input files (ocean forecast at f006)
    • 2 output files (ocean products)
  • C48_S2SW-gfs_ice_prod_f006
    • Ice product generation at forecast hour 6
    • 2 input files (ice forecast at f006)
    • 2 output files (ice products)

C48 Ensemble Tests (S2SW_gfs)

  • C48_S2SWA_gefs-gefs_fcst_mem001_seg0
    • GEFS ensemble member 001 coupled forecast (48-hour segment)
    • Implemented GEFS ensemble member 001 forecast test
    • 17 input files with unique two-cycle pattern:
      • 13 atmosphere ICs from current cycle (12Z)
      • 3 restart files from previous cycle (06Z)
      • 1 wave prep file from current cycle (12Z)
    • 24 output files (ensemble forecast outputs)
    • GEFS requires different source cycles for ICs vs restarts
    • Special handling for mem001/ subdirectory structure

README Overhaul

File: dev/ctests/README.md

Benefits:

  • Tests can run in parallel
  • Rapid development iteration
  • Easy debugging of individual jobs
  • Consistent baseline for regression testing

Tested on command line (ran in parallel for all C48_S2W cases)

Terry.McGuinness (hfe11) build (ctest_case_updates) $ ctest -L C48_S2SW-gfs -j 3
Test project /scratch3/NCEPDEV/global/Terry.McGuinness/global-workflow_forked/dev/ctests/build
      Start  9: test_C48_S2SW-gfs_fcst_seg0_setup
      Start 13: test_C48_S2SW-gfs_ice_prod_f006_setup
      Start 17: test_C48_S2SW-gfs_ocean_prod_f006_setup
 1/12 Test #13: test_C48_S2SW-gfs_ice_prod_f006_setup ........   Passed    6.39 sec
      Start 14: test_C48_S2SW-gfs_ice_prod_f006_stage
 2/12 Test  #9: test_C48_S2SW-gfs_fcst_seg0_setup ............   Passed    6.40 sec
      Start 10: test_C48_S2SW-gfs_fcst_seg0_stage
 3/12 Test #17: test_C48_S2SW-gfs_ocean_prod_f006_setup ......   Passed    6.40 sec
      Start 18: test_C48_S2SW-gfs_ocean_prod_f006_stage
 4/12 Test #14: test_C48_S2SW-gfs_ice_prod_f006_stage ........   Passed    1.63 sec
      Start 15: test_C48_S2SW-gfs_ice_prod_f006_execute
 5/12 Test #18: test_C48_S2SW-gfs_ocean_prod_f006_stage ......   Passed    1.65 sec
      Start 19: test_C48_S2SW-gfs_ocean_prod_f006_execute
 6/12 Test #10: test_C48_S2SW-gfs_fcst_seg0_stage ............   Passed    3.66 sec
      Start 11: test_C48_S2SW-gfs_fcst_seg0_execute
 7/12 Test #15: test_C48_S2SW-gfs_ice_prod_f006_execute ......   Passed   63.67 sec
      Start 16: test_C48_S2SW-gfs_ice_prod_f006_validate
 8/12 Test #19: test_C48_S2SW-gfs_ocean_prod_f006_execute ....   Passed   63.65 sec
      Start 20: test_C48_S2SW-gfs_ocean_prod_f006_validate
 9/12 Test #20: test_C48_S2SW-gfs_ocean_prod_f006_validate ...   Passed    1.67 sec
10/12 Test #16: test_C48_S2SW-gfs_ice_prod_f006_validate .....   Passed    1.67 sec
11/12 Test #11: test_C48_S2SW-gfs_fcst_seg0_execute ..........   Passed  1863.46 sec
      Start 12: test_C48_S2SW-gfs_fcst_seg0_validate
12/12 Test #12: test_C48_S2SW-gfs_fcst_seg0_validate .........   Passed    4.42 sec

100% tests passed, 0 tests failed out of 12

Label Time Summary:
C48_S2SW-gfs_fcst_seg0          = 1877.94 sec*proc (4 tests)
C48_S2SW-gfs_ice_prod_f006      =  73.36 sec*proc (4 tests)
C48_S2SW-gfs_ocean_prod_f006    =  73.36 sec*proc (4 tests)

Total Test time (real) = 1877.96 sec

Runtime Performance

Test Case Runtime Status
C48_ATM-gfs_fcst_seg0 ~1500s ✅ PASS
C48_ATM-gfs_atmos_prod_f000-f002 ~300s ✅ PASS
C48_S2SW-gfs_fcst_seg0 ~1700s ✅ PASS
C48_S2SW-gfs_ocean_prod_f006 ~200s ✅ PASS
C48_S2SW-gfs_ice_prod_f006 ~200s ✅ PASS
C48_S2SWA_gefs-gefs_fcst_mem001_seg0 ~1745s ✅ PASS

Backward Compatibility

No Breaking Changes

  • All changes are additive or corrective
  • Existing test infrastructure remains intact
  • No changes to job scripts or workflow logic
  • CI/CD pipeline configuration maintains existing functionality

Review Checklist

  • All 6 C48 test cases pass validation
  • Documentation is comprehensive and accurate
  • Naming convention is consistently applied
  • CI/CD configuration updated to match YAML filenames
  • Input staging patterns verified against stable baselines
  • YAML files follow established templating patterns
  • Markdown documentation includes all necessary details
  • No breaking changes introduced

Testing in progress by the GitLab pipeline

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
  • Any new scripts have been added to the .github/CODEOWNERS file with owners
  • I have made corresponding changes to the system documentation if necessary

Split C48_S2SW-gfs_oceanice_prod.yaml into two separate test cases:
- C48_S2SW-gfs_ocean_prod_f006.yaml (ocean component, 7 files)
- C48_S2SW-gfs_ice_prod_f006.yaml (ice component, 7 files)

This matches the actual Rocoto workflow structure where ocean and ice
products are generated by separate parallel metatasks (gfs_ocean_prod
and gfs_ice_prod) with different COMPONENT environment variables.

Each test now validates its respective component independently:
- Ocean: Tests gfs_ocean_prod_f006 task with COMPONENT=ocean
- Ice: Tests gfs_ice_prod_f006 task with COMPONENT=ice

Both tests use the same job script (oceanice_products.sh) but with
component-specific inputs (ocean/ice history files) and outputs
(products/ocean vs products/ice directories).

Updated CTEST_UPDATES_CHANGELOG.md with Part 5 documenting the split.
…ice for C48_S2SW and their corresponding md files, also update pipeline matrix for these tests
… (3 files) - no atmosphere ICs in the stable run for ensemble members
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA added the CI/CD Issue related to CI/CD label Oct 1, 2025
@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 23:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive CTest case updates to the NOAA Global Workflow framework, introducing six new test cases for validating different system configurations and operational workflows. The changes enhance the testing infrastructure to cover atmosphere-only forecasts, coupled forecasts, ensemble member execution, and post-processing product generation across different model configurations.

Key Changes:

  • Added 6 new CTest cases covering C48_ATM, C48_S2SW, and C48_S2SWA_gefs configurations
  • Enhanced test case documentation with comprehensive markdown files explaining each test's purpose and operational significance
  • Updated CI/CD pipeline configuration to include all new test cases

Reviewed Changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file

:

File Description
C48_S2SWA_gefs-gefs_fcst_mem001_seg0.yaml GEFS ensemble member 001 forecast test with coupled atmosphere-ocean-ice-wave system
C48_S2SWA_gefs-gefs_fcst_mem001_seg0.md Comprehensive documentation for GEFS ensemble test including operational context and file breakdown
C48_S2SW-gfs_ocean_prod_f006.yaml Ocean products generation test for coupled S2SW system at forecast hour f006
C48_S2SW-gfs_ocean_prod_f006.md Documentation explaining ocean product generation pipeline and multi-resolution strategy
C48_S2SW-gfs_ice_prod_f006.yaml Ice products generation test for coupled S2SW system at forecast hour f006
C48_S2SW-gfs_ice_prod_f006.md Documentation for sea ice product generation including ice characteristics and operational significance
C48_S2SW-gfs_fcst_seg0.md Enhanced documentation for coupled forecast test explaining 4-component system interactions
C48_ATM-gfs_fcst_seg0.md Documentation for atmosphere-only forecast test covering baseline forecast validation
C48_ATM-gfs_atmos_prod_f000-f002.yaml Atmospheric products generation test covering multiple forecast hours and resolutions
C48_ATM-gfs_atmos_prod_f000-f002.md Documentation explaining atmospheric product generation pipeline and FHOUT_PGBS logic
README.md Comprehensive overhaul explaining input file sourcing, test naming conventions, and self-contained test philosophy
CMakeLists.txt Updated test naming convention from underscore to hyphen format and added new test definitions
gitlab-ci-hosts.yml Updated CI/CD configuration to match new test naming convention and include all test cases

- **validate.sh.in**: Validates the results of the JJOB.

**NOTE:** So far only test C48_ATM *gfs_fcst_set0* has `output_files` for the validation step using a basic chksum for testing. Further development using grib and NETCDF comparison tools is pending.
**NOTE:** Further development using advanced grib and NETCDF comparison tools is pending.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue open to do this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, I refer you to Rahul on that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a massive document. I don't think we can expect developers to write something like this every time they want to author a new test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither.

Nice catch Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com>
@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA marked this pull request as draft October 2, 2025 16:26
@TerrenceMcGuinness-NOAA
Copy link
Collaborator Author

TerrenceMcGuinness-NOAA commented Oct 2, 2025

Moved this into draft until I figure a good place to duck out self documentation of cases and simplify the main README.md and complete setting up .. and testing the pipeline in a dev space.

@TerrenceMcGuinness-NOAA TerrenceMcGuinness-NOAA marked this pull request as ready for review October 3, 2025 20:49
Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for adding these tests.
A few changes that I don't think will impact the tests

Comment on lines +48 to +65
# Input atmosphere restart files for forecast
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_ctrl.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_ctrl.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile1.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile1.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile2.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile2.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile3.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile3.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile4.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile4.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile5.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile5.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile6.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/gfs_data.tile6.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile1.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile1.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile2.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile2.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile3.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile3.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile4.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile4.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile5.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile5.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile6.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/input/sfc_data.tile6.nc]

# Atmosphere history files needed for post-processing (from forecast job)
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/history/gfs.t{{ cyc }}z.atmf000.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/history/gfs.t{{ cyc }}z.atmf000.nc]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/history/gfs.t{{ cyc }}z.sfcf000.nc, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/model/atmos/history/gfs.t{{ cyc }}z.sfcf000.nc]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not used in this job

Comment on lines +92 to +94
# Output atmospheric GRIB2 products for f002 (0p25 only - supplemental grids not at FHOUT_PGBS intervals)
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/products/atmos/grib2/0p25/gfs.t{{ cyc }}z.pgrb2.0p25.f002, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/products/atmos/grib2/0p25/gfs.t{{ cyc }}z.pgrb2.0p25.f002]
- [{{ SRC_DIR }}/gfs.{{ PDY }}/{{ cyc }}/products/atmos/grib2/0p25/gfs.t{{ cyc }}z.pgrb2.0p25.f002.idx, {{ DST_DIR }}/gfs.{{ PDY }}/{{ cyc }}/products/atmos/grib2/0p25/gfs.t{{ cyc }}z.pgrb2.0p25.f002.idx]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the test is creating this 0p25 resolution output -- do check.

Comment on lines +44 to +45
# Ice restart files needed for initialization
- [{{ SRC_DIR }}/gdas.{{ PDY }}/06/model/ice/restart/{{ PDY }}.{{ cyc }}0000.cice_model.res.nc, {{ DST_DIR }}/gdas.{{ PDY }}/06/model/ice/restart/{{ PDY }}.{{ cyc }}0000.cice_model.res.nc]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restarts are not used in this job.

Comment on lines +44 to +45
# Ocean restart files needed for initialization
- [{{ SRC_DIR }}/gdas.{{ PDY }}/06/model/ocean/restart/{{ PDY }}.{{ cyc }}0000.MOM.res.nc, {{ DST_DIR }}/gdas.{{ PDY }}/06/model/ocean/restart/{{ PDY }}.{{ cyc }}0000.MOM.res.nc]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restarts are not used in this job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Issue related to CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decompose forecast-only experiment jobs in PR tests into ctests
3 participants