Skip to content

added nwm_ponded_depth#8

Open
mkarim-rtx wants to merge 5 commits intodevelopmentfrom
nwm-ponded-depth-mohammed
Open

added nwm_ponded_depth#8
mkarim-rtx wants to merge 5 commits intodevelopmentfrom
nwm-ponded-depth-mohammed

Conversation

@mkarim-rtx
Copy link
Copy Markdown

@mkarim-rtx mkarim-rtx commented Mar 26, 2026

[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

@mkarim-rtx mkarim-rtx marked this pull request as draft March 26, 2026 16:12
@mkarim-rtx mkarim-rtx marked this pull request as ready for review March 26, 2026 21:55
Copy link
Copy Markdown

@cmaynard-ngwpc cmaynard-ngwpc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One minor nit if you would address it would be nice, but not a necessity.

&topmodel->p,
&topmodel->ep
&topmodel->ep,
&topmodel->ponded_depth
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align this

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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];
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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];
}

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 */
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"flow" can be misconstrued. May be appropriate to say "runoff depth"? Please check with Mark.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, Thanks.

Comment on lines +863 to +864


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, Thanks.

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.

3 participants