-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add units to index_for_diagnostic_printout metadata to avoid ccpp_prebuild.py error #517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to fix the ccpp-framework behavior?
Not on my account. When this happens, I just go into ccpp_prebuild.py and add some output to find out which variable is causing the problem. I don't know if this is the same as capgen's behavior or not, but perhaps @JulieSchramm already has a test for this (what happens when one of the units attributes are empty)? |
Shall I go ahead and merge this or wait for further approvals? FOR OTHER REPO WATCHERS, THIS AFFECTS THE SCM ONLY. THERE WAS NO ERROR PRESENT FOR FV3/UFS. |
Argh, I forgot the UFS part. @dustinswales can you pull this SCM-only change into your RRTMGP PR? I know it requires updating the cascade of submodule pointers one more time, but if you don't mind ... If not, no problem. Thanks! |
@climbfuji |
Thanks a lot! |
This PR has been pulled into #514 and will be merged as part of it - do not merge manually. |
Yes, thanks @dustinswales . |
OK, since NCAR/ccpp-scm#213 requires this to work, I'll wait to merge that too. |
Should be done on Thursday (tomorrow is a federal holiday). |
capgen will catch a missing "units" attribute (the whole units line is missing) So type carefully! |
Thanks, @JulieSchramm . IMO, it's less about "us" typing carefully and more about what to accept/reject when reviewing others contributions. Since capgen doesn't catch a (units = [blank]) attribute, does it also error out ungracefully when trying to compare a non-empty string to an empty one? If so, depending on what kind of status updates or logging verbosity is set, maybe capgen will provide enough information for a user to find the issue without too much trouble. With ccpp_prebuild, my problem was that it errored out telling me that it couldn't compare an empty string, but you had no idea which variable amongst the thousands was causing the error using the default (no/low) logging. I think that if you turned on DEBUG level of logging that it would have let you know which variable caused the problem, though, so it wasn't that big of a deal. |
Is |
banana is for sure a valid unit! In human history, a lot of bananas have been sold or traded per piece and not per weight) I suppose ;-) |
This bugfix was merged as part of #514. |
A one line change that avoids an error in ccpp_prebuild.py.
(Note that ccpp_prebuild.py errors out ungracefully during units checking if one of the units is empty.)