Skip to content

Conversation

@aaraney
Copy link
Member

@aaraney aaraney commented Oct 31, 2025

Currently, ngen will throw an exception if any model in the model stack does not support mass balance checks regardless of if mass balance checking is configured. The fixed The new behavior checks if a bmi model supports mass balance checks only if the mass balance checking feature is enabled.

Revisiting this. The exception I was getting from ngen was not related to the mass balance checker.

I do think we should still change the behavior to only check if a model is capable of mass balance checks if configured. Otherwise, stderr is spammed with messages like the following for each divide w/ a model that does not support mass balance checks:

Error(Integration)::mass_balance: Error getting mass balance values for module 'Simple Logical Tautology Handler (SLoTH) Model': GetValuePtr called for unknown variable: ngen::mass_in (/home/user/ngen/extern/sloth/src/sloth.cpp:114)

@aaraney aaraney requested a review from hellkite500 October 31, 2025 19:59
@aaraney aaraney changed the title fix: only check if model supports mass balance checks if mass balance feature is enabled Only check if model supports mass balance checks if mass balance feature is enabled Nov 4, 2025
@hellkite500 hellkite500 merged commit ff74dc2 into NOAA-OWP:master Nov 10, 2025
12 of 21 checks passed
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

Successfully merging this pull request may close these issues.

2 participants