Topmodel: Fix unit conversion errors in BMI calculation#9
Merged
Conversation
jswade-rtx
approved these changes
May 7, 2026
jswade-rtx
left a comment
There was a problem hiding this comment.
I tested Mohammed's Topmodel branch unit_conversion_mohammed with msw-mgr branch jwade_NGWPC-10695_output_units and successfully ran an NWM Output Variable run for a Topmodel formulation to produce the new land_surface_water_baseflow_volume_flux_m3_per_s variable.
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.
https://jira.nextgenwaterprediction.com/browse/NGWPC-10685
Issue
TOPMODEL exposes land_surface_water__baseflow_volume_flux in units of: m h-1 while NWM expects: m3/s
This caused NGEN unit conversion warnings: Unable to convert m h-1 to m3/s
Fix
A new BMI output variable was added: land_surface_water__baseflow_volume_flux_m3_per_s
The original variable remains unchanged: land_surface_water__baseflow_volume_flux → m h-1
The new NWM-facing variable converts TOPMODEL baseflow depth-rate into discharge:
qb_m3_per_s = qb * catchment_area / 3600
Where:
qb = baseflow rate in m h-1
catchment_area = catchment area in m2
3600 converts hours → seconds
Why
Preserves native TOPMODEL output semantics
Avoids changing existing BMI variables
Provides an NWM-compatible discharge output
Maintains consistency with fixes applied to other hydrologic modules
Result
Eliminates unit conversion warnings
Provides correct NWM-facing baseflow discharge output
Maintains backward compatibility for existing workflows