Skip to content
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

Revise error handling/reporting #99

Open
GreyREvenson opened this issue Feb 13, 2024 · 0 comments
Open

Revise error handling/reporting #99

GreyREvenson opened this issue Feb 13, 2024 · 0 comments

Comments

@GreyREvenson
Copy link
Contributor

Current behavior

When encountering an error, NoahOM prints an error message to console immediately prior to stopping the model with a call to stop. However, because the call to stop prevents the BMI update or update_until functions from finishing, NextGen is unable to report time and location (i.e., catchment id) information to the model-user along with the error message.

Expected behavior

When encountering an error, NoahOM should return to the BMI update or update_until functions and indicate that an error has occurred along with any recorded error messaging.

Suggested changes

  • Remove calls to stop in the NoahOM code base
  • When encountering an error, save the error message and record that an error has occurred using a flag/logical variable
  • Add code to BMI update function to check for an error flag value and returns BMI_FAILURE and writes the message
  • Use return rather than stop

Notes

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

No branches or pull requests

1 participant