Add EWTS message to Bmi_Module_Formulation's get_response on BMI error thrown (NGWPC-7474) - #13
Merged
Merged
Conversation
cmaynard-ngwpc
force-pushed
the
ewts-messages-on-bmi-update-failure
branch
from
August 27, 2025 03:06
6d65fd8 to
d916358
Compare
zhengtaocui
pushed a commit
that referenced
this pull request
May 18, 2026
…r thrown (NGWPC-7474) (#13) Adds an EWTS log when a formulation model throws an error during the Update[Until] call. The message includes information on which formulation and catchment the error occurred on and information injected through set_model_inputs_prior_to_update. Logging this information will help debugging errors in data in the future.
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.
Adds an EWTS log when a formulation model throws an error during the
Update[Until]call. The message includes information on which formulation and catchment the error occurred on and information injected throughset_model_inputs_prior_to_update. Logging this information will help debugging errors in data in the future.Additions
Update()for logging. After the data is captured, the error will be thrown again.set_model_inputs_prior_to_updateas a string that will be added to the error message.Testing
Results of running ngen with one line added that throws an error before running Update to test error handling:
2025-08-26T20:17:33.698 NGEN INFO Log File: /home/ian.todd/run-logs/Ian.Todd@nextgenwaterprediction.com/ngen_20250826T201733.log
2025-08-26T20:17:33.698 NGEN INFO Log level set to INFO
2025-08-26T20:17:33.698 NGEN INFO NGen Framework 0.3.0
2025-08-26T20:17:33.856 NGEN INFO Building Nexus collection
2025-08-26T20:17:33.857 NGEN INFO Building Catchment collection
2025-08-26T20:17:33.871 NGEN INFO Initializing formulations
2025-08-26T20:17:33.889 NGEN INFO Bmi_Adapter: Model name: test_bmi_cpp
2025-08-26T20:17:33.908 NGEN INFO Bmi_Adapter: Model name: test_bmi_cpp
2025-08-26T20:17:33.926 NGEN INFO Bmi_Adapter: Model name: test_bmi_cpp
2025-08-26T20:17:33.926 NGEN INFO Not Using Routing
2025-08-26T20:17:33.926 NGEN INFO Building Feature Index
2025-08-26T20:17:33.927 NGEN INFO Catchment topology is dendritic.
2025-08-26T20:17:33.927 NGEN INFO Running Models
2025-08-26T20:17:33.933 NGEN SEVERE Call to Update of model test_bmi_cpp failed for catchment "cat-52" at t_index = 0, next_step_index = 0.
2025-08-26T20:17:33.933 NGEN SEVERE Input variables were as follows:
2025-08-26T20:17:33.933 NGEN SEVERE precip_rate = 0
2025-08-26T20:17:33.933 NGEN SEVERE TMP_2maboveground = 285.9
Checklist
Testing checklist (automated report can be put here)
Target Environment support