added nwm_ponded_depth - #8
Conversation
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.
| &topmodel->p, | ||
| &topmodel->ep | ||
| &topmodel->ep, | ||
| &topmodel->ponded_depth |
| 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.
| 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]; | |
| } |
There was a problem hiding this comment.
Discussed it with Siva. Functionality wise both are same. Siva's version has less line but existing one is more clear. So keeping it as it is.
| 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.
|
|
||
|
|
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.
jswade-rtx
left a comment
There was a problem hiding this comment.
Changes look reasonable to add nwm ponded depth as an output variable.
[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