Allow excluding fields from ncdata_check - #517
Merged
Merged
Conversation
…check
Adds an ordered glob-pattern exclusion list for physics_check_data rows,
so test configurations can exclude variables that hold a different
pipeline stage than the check snapshot by design (with the reason
recorded next to the patterns, e.g. in a testmod). With all expected
differences excluded, ncdata_check_err=.true. turns the check into a
hard pass/fail test.
- string_core_utils: core_glob_match ('*'-only wildcard matcher) and
core_glob_list_excluded (gitignore-style ordered first-match-wins
decision; a leading '!' keeps a matching name). Both pure; pfUnit
tests added (14 cases, passing).
- physics_data: check_field_2d/3d/4d skip rows whose report label
matches the exclusion list; patterns are stored module-side via new
set_check_field_exclusions, so the generated physics_check_data is
unchanged. Excluded rows are buffered and listed in the check output
by flush_check_field_verbose -- exclusion is never silent. Matching
is on the label a row is reported under, which for
constituent-dimensioned fields is the per-constituent file variable
name (e.g. aerochem_vmr_bc_a1).
- phys_comp: new physics_nl entry ncdata_check_exclude (char*256(200)),
broadcast and handed to physics_data; active patterns echoed at init.
- namelist_definition_cam.xml: entry with semantics and example.
jimmielin
had a problem deploying
to
CI-tests-on-CIRRUS
July 2, 2026 19:31 — with
GitHub Actions
Error
Constituent check-row names no longer have stable case: capgen lowercases derived constituent standard names, while registry-enumerated ones keep their case. Patterns like '*SO2' stopped matching rows now registered as 'so2', so those rows were compared (and diffed) instead of excluded. Lowercase the stored patterns and the row name at match time, consistent with the framework treating standard names differing only in case as the same.
jimmielin
had a problem deploying
to
CI-tests-on-CIRRUS
August 25, 2026 16:06 — with
GitHub Actions
Error
jimmielin
had a problem deploying
to
CI-tests-on-CIRRUS
August 31, 2026 17:45 — with
GitHub Actions
Error
jimmielin
had a problem deploying
to
CI-tests-on-CIRRUS
September 11, 2026 19:19 — with
GitHub Actions
Error
… is how pfUnit units are structured throughout
jimmielin
had a problem deploying
to
CI-tests-on-CIRRUS
September 11, 2026 19:35 — with
GitHub Actions
Error
nusbaume
self-requested a review
September 14, 2026 15:47
nusbaume
had a problem deploying
to
CI-tests-on-CIRRUS
September 15, 2026 03:15 — with
GitHub Actions
Error
nusbaume
approved these changes
Sep 15, 2026
nusbaume
left a comment
Collaborator
There was a problem hiding this comment.
Applied what would have been my change requests in the latest commit!
peverwhee
approved these changes
Sep 16, 2026
peverwhee
left a comment
Collaborator
There was a problem hiding this comment.
committed the one small comment change i had.
jimmielin
pushed a commit
to jimmielin/CAM-SIMA
that referenced
this pull request
Oct 1, 2026
Brings in conv_water_4rad/cloud_water_paths (ESCOMP#531), ncdata_check_exclude (ESCOMP#517), the IC-read set-before-use skip (ESCOMP#547), misc code fixes (ESCOMP#507) and the atmos_phys0_29_001 pin. Conflict resolution: - ncdata_check_exclude (namelist definition, string_core_utils, phys_comp, physics_data) and write_init_files set-before-use: take the landed upstream versions; drop the branch's duplicate exclusion declarations. - registry.xml: keep the MAM wetdep/drydep/concld_old entries alongside the conv_water entries; drop the branch's duplicate icwmrsh. - write_init_files samples regenerated with the merged generator. Assisted-by: claude-opus:5.5
This branch was successfully deployed
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.
Tag name (required for release branches): sima0_21_001
Originator(s): @jimmielin
AI tools used (if applicable; please also add the "AI-generated code" label to the PR):
What: claude-fable:5
How: Discussed the implementation, wrote most of the logic and tests.
Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
.gitignore-like glob pattern fromphysics_check_data.ncdata_check_err=.true.can be turned on in tests that read multi-stage snapshots where some variables are explicitly intended to be ignored as they would not match.Describe any changes made to build system: N/A
Describe any changes made to the namelist: host-side
ncdata_check_excludeoption - default emptyList any changes to the defaults for the input datasets (e.g. boundary datasets): N/A
List all files eliminated and why: N/A
List all files added and what they do: N/A
List all existing files that have been modified, and describe the changes:
(Helpful git command:
git diff --name-status development...<your_branch_name>)If there are new failures (compared to the
test/existing-test-failures.txtfile),have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?
All tests have expected NLCOMP failures due to the presence of the new
ncdata_check_excludenamelist variable.derecho/intel/aux_sima:
SMS_Ln9.ne3pg3_ne3pg3_mg37.F2000_C7.derecho_intel.cam-outfrq_se_cslam_analy_ic (Overall: FAIL)
derecho/gnu/aux_sima:
SMS_Ln9.ne3pg3_ne3pg3_mg37.F2000_C7.derecho_gnu.cam-outfrq_se_cslam_analy_ic (Overall: FAIL)
derecho/nvhpc/aux_sima (test is run via Github workflow. Only run the test manually if we need to save new baselines):
If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:
CAM-SIMA date used for the baseline comparison tests if different than latest: