updated groundwater_to_stream_recharge unit#15
Merged
Conversation
sivasankkar
reviewed
May 4, 2026
| } | ||
|
|
||
| bmi_unit_conv.volQ_gw_timestep_m3_per_s = 0.0; | ||
| bmi_unit_conv.catchment_area_m2 = 1.0; |
There was a problem hiding this comment.
Is there a reasoning behind initializing the area to 1?
Author
There was a problem hiding this comment.
Good catch. The 1.0 m2 value was only a placeholder, but it could produce physically incorrect discharge if the real catchment area is not provided. I changed the default to 0.0 and added a guard so the converted m3/s output remains 0.0 unless a valid positive catchment area is available. @sivasankkar
sivasankkar
approved these changes
May 5, 2026
sivasankkar
approved these changes
May 5, 2026
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-10214
Issue
groundwater_to_stream_recharge was originally exposed in m (depth per timestep), while NWM expects m³/s (discharge) for qBucket, causing: Unable to convert m to m3/s
Fix
A new BMI output variable was introduced: groundwater_to_stream_recharge_m3_per_s → m³/s
Computed as:
q = depth × catchment_area / timestep
The original variable remains unchanged:
groundwater_to_stream_recharge → m
Why
Preserves LASAM native semantics (depth remains depth)
Avoids repurposing existing variables
Aligns with NWM discharge requirements (qBucket)
Maintains consistency with updates in CFE and Sac-SMA
Result
Eliminates unit conversion warning
Produces physically correct discharge output
Maintains backward compatibility and clarity
Final Mapping
Variable Meaning Units
groundwater_to_stream_recharge groundwater recharge depth m
groundwater_to_stream_recharge_m3_per_s