-
Notifications
You must be signed in to change notification settings - Fork 0
added nwm_ponded_depth #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,8 @@ extern void topmod( | |
| double *qb, | ||
| double *qof, | ||
| double *p, | ||
| double *ep | ||
| double *ep, | ||
| double *ponded_depth | ||
| ) { | ||
| /***************************************************************** | ||
|
|
||
|
|
@@ -357,6 +358,27 @@ extern void topmod( | |
| Q[in] += (*Qout) * time_delay_histogram[ir]; | ||
| } | ||
|
|
||
| /* Ponded depth: sum delayed-flow components stored in the hydrograph- | ||
| * ordinates portion of the routing array, excluding the pure channel-delay | ||
| * slots. */ | ||
| *ponded_depth = 0.0; | ||
|
|
||
| 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]; | ||
| } | ||
| } | ||
|
|
||
| // Add current time flow to mass balance variable | ||
| *sumq += Q[it]; | ||
| /* BMI Adaption: replace nstep with current_time_step */ | ||
|
|
@@ -838,6 +860,8 @@ extern void calc_time_delay_histogram( | |
|
|
||
| } | ||
|
|
||
|
|
||
|
|
||
|
Comment on lines
+863
to
+864
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, Thanks. |
||
| return; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.