-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3051 from billsacks/cprnc_allow_timeconst_fielddiffs
cprnc: allow differences in field lists for time-constant fields In cprnc: For files with an unlimited (time) dimension: Separately count (1) missing time-varying fields and (2) missing time-constant fields. Only (1) is considered in determining whether to report a final difference in the field lists. Before this, no distinction was made between time-varying vs. time-constant fields in counting the number of missing variables. (These counts were added in #2988). However, that led to failures in some exact restart tests, because some time-constant fields were on output files from one case but not the other (see #3007). Here is sample output from cprnc for a few cases: (1) Difference in the presence / absence of time-varying variables: SUMMARY of cprnc: A total number of 6 fields were compared of which 0 had non-zero differences and 0 had differences in fill patterns and 0 had different dimension sizes A total number of 0 fields could not be analyzed A total number of 2 time-varying fields on file 1 were not found on file 2. A total number of 0 time-constant fields on file 1 were not found on file 2. A total number of 0 time-varying fields on file 2 were not found on file 1. A total number of 0 time-constant fields on file 2 were not found on file 1. diff_test: the two files DIFFER only in their field lists (2) Difference in the presence / absence of time-constant variables, for files that have a time dimension: SUMMARY of cprnc: A total number of 13 fields were compared of which 0 had non-zero differences and 0 had differences in fill patterns and 0 had different dimension sizes A total number of 0 fields could not be analyzed A total number of 0 time-varying fields on file 1 were not found on file 2. A total number of 2 time-constant fields on file 1 were not found on file 2. A total number of 0 time-varying fields on file 2 were not found on file 1. A total number of 1 time-constant fields on file 2 were not found on file 1. diff_test: the two files seem to be IDENTICAL (But note that there were differences in field lists just for time-constant fields.) (3) Difference in the presence / absence of time-constant variables, for files that do NOT have a time dimension (note that this still results in a DIFFER result; it seemed to me that that's what a user would want in this case): SUMMARY of cprnc: A total number of 5 fields were compared of which 0 had non-zero differences and 0 had differences in fill patterns and 0 had different dimension sizes A total number of 0 fields could not be analyzed A total number of 2 fields on file 1 were not found on file 2. A total number of 1 fields on file 2 were not found on file 1. diff_test: the two files DIFFER only in their field lists The downside of this solution is that we wouldn't catch removals of time-constant fields when doing baseline comparisons, and might overlook this for interactive uses of cprnc. To address the issue of baseline comparisons, I thought about adding a flag that treats time-constant fieldlist diffs as differences (#3007 (comment)), but I have not done this here because this would have taken more time to implement and added significantly more complexity (in both the cprnc Fortran and in hist_utils.py) for uncertain benefit. (See the discussion in #3007 for more thoughts on this.) Once this PR is approved and merged, I will update the cprnc builds on hobart and cheyenne (currently they are using builds prior to #2988). Test suite: Ran the two tests noted as failing in #3007, pointing to a version of cprnc built from this branch; these tests now pass. scripts_regression_tests on cheyenne Test baseline: n/a Test namelist changes: none Test status: bit for bit Fixes #3007 User interface changes?: Changes cprnc behavior slightly, as noted above Update gh-pages html (Y/N)?: N Code review: @jedwards4b @jgfouca @fischer-ncar Also cc @rljacob @gold2718 @mnlevy1981 @ekluzek
- Loading branch information
Showing
8 changed files
with
202 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.