-
Notifications
You must be signed in to change notification settings - Fork 446
EAM: Improves error messages in modal_aer_opt.F90 #7879
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
base: master
Are you sure you want to change the base?
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.
Pull Request Overview
This PR improves error messages in modal_aer_opt.F90 to provide more detailed diagnostic information when aerosol optical depth errors occur, making it easier to debug crashes.
Key changes:
- Replaced generic error messages with detailed messages that include the specific value of
dopaer(i)causing the error - Added
error_strvariable to construct comprehensive error messages with file/line information
Comments suppressed due to low confidence (1)
components/eam/src/physics/cam/modal_aer_opt.F90:1146
- The condition has been hardcoded to
.true., which will cause this error-checking block to execute unconditionally for every iteration. This should be reverted to the original condition(dopaer(i) <= -1.e-10_r8) .or. (dopaer(i) >= 30._r8)to only trigger when actual errors occur.
if ((dopaer(i) <= -1.e-10_r8) .or. (dopaer(i) >= 30._r8)) then
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@rljacob : The error message automatically includes "ERROR" in itself when we call |
|
|
||
| nerr_dopaer = nerr_dopaer + 1 | ||
| if (dopaer(i) < -1.e-10_r8) then | ||
| write(error_str, *) 'ERROR: dopaer(', i, ')=', dopaer(i) ,' which is < -1.e-10_r8 (negative aerosol optical depth) in ',& |
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.
It is ok to have ERROR appear twice. Please put it back. When searching the log, I want to find this message by searching for ERROR.
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.
I have added the "ERROR" string back to the error messages.
#7879) EAM: Improves error messages in modal_aer_opt.F90 Improves error messages in modal_aer_opt.F90 to provide more detailed diagnostic information when aerosol optical depth errors occur, making it easier to debug crashes. Key changes: Replaced generic error messages with detailed messages that include the specific value of dopaer(i) causing the error Added error_str variable to construct comprehensive error messages with file/line information Fixes #7877 [BFB] * singhbalwinder/atm/fix-error-msg-modal_opt: Adds ERROR string back to the error messages Removes "Error" as it is automatically added by endrun Fixed debugging conditionals EAM: Fixes error messages in modal_aer_opt.F90
|
on next |
Improves error messages in modal_aer_opt.F90 to provide more detailed diagnostic information when aerosol optical depth errors occur, making it easier to debug crashes.
Key changes:
Replaced generic error messages with detailed messages that include the specific value of dopaer(i) causing the error
Added error_str variable to construct comprehensive error messages with file/line information
Fixes #7877
[BFB]