Open
Conversation
cmaynard-ngwpc
approved these changes
Mar 30, 2026
cmaynard-ngwpc
left a comment
There was a problem hiding this comment.
Looks good. One minor nit if you would address it would be nice, but not a necessity.
src/bmi_topmodel.c
Outdated
| &topmodel->p, | ||
| &topmodel->ep | ||
| &topmodel->ep, | ||
| &topmodel->ponded_depth |
sivasankkar
reviewed
Apr 9, 2026
Comment on lines
+366
to
+380
| if (stand_alone == TRUE) { | ||
| int q_start = it + num_delay; | ||
| int q_end = q_start + num_time_delay_histo_ords - 1; | ||
|
|
||
| for (ir = q_start; ir <= q_end; ir++) { | ||
| *ponded_depth += Q[ir]; | ||
| } | ||
| } else { | ||
| int q_start = num_delay + 1; | ||
| int q_end = num_delay + num_time_delay_histo_ords; | ||
|
|
||
| for (ir = q_start; ir <= q_end; ir++) { | ||
| *ponded_depth += Q[ir]; | ||
| } | ||
| } |
There was a problem hiding this comment.
Suggested change
| if (stand_alone == TRUE) { | |
| int q_start = it + num_delay; | |
| int q_end = q_start + num_time_delay_histo_ords - 1; | |
| for (ir = q_start; ir <= q_end; ir++) { | |
| *ponded_depth += Q[ir]; | |
| } | |
| } else { | |
| int q_start = num_delay + 1; | |
| int q_end = num_delay + num_time_delay_histo_ords; | |
| for (ir = q_start; ir <= q_end; ir++) { | |
| *ponded_depth += Q[ir]; | |
| } | |
| } | |
| int q_start = 0 | |
| int q_end = 0 | |
| if (stand_alone == TRUE) { | |
| q_start = it + num_delay; | |
| } else { | |
| q_start = num_delay + 1; | |
| } | |
| q_end = q_start + num_time_delay_histo_ords - 1; | |
| for (ir = q_start; ir <= q_end; ir++) { | |
| *ponded_depth += Q[ir]; | |
| } |
sivasankkar
reviewed
Apr 9, 2026
include/topmodel.h
Outdated
| double qof; /* flow from saturated area and infiltration excess flow*/ | ||
| double p; /* adjusted rain*/ | ||
| double ep; /* adjusted potential evaporation*/ | ||
| double ponded_depth; /* queued delayed flow from hydrograph ordinates */ |
There was a problem hiding this comment.
"flow" can be misconstrued. May be appropriate to say "runoff depth"? Please check with Mark.
sivasankkar
reviewed
Apr 9, 2026
Comment on lines
+863
to
+864
|
|
||
|
|
There was a problem hiding this comment.
May be delete these two extraneous lines? Sorry, don't mean to be nitpicking, but Phil Miller always suggested to remove any unnecessary whitespaces and lines.
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.
[Short description explaining the high-level reason for the pull request]
https://jira.nextgenwaterprediction.com/browse/NGWPC-10074
Additions
Add ponded_depth in topmodel.c and the algorithm to calculate it.
Added nwm_ponded_depth in BMI interface.
Testing
https://confluence.nextgenwaterprediction.com/spaces/NGWPC/pages/20055931/TopModel#TopModel-NWMPONDEDDEPTH