36 integer(I4B),
intent(in) :: npts
37 real(dp),
dimension(npts),
intent(in) :: stations
43 w = stations(npts) - stations(1)
61 integer(I4B),
intent(in) :: npts
62 real(dp),
dimension(npts),
intent(in) :: stations
63 real(dp),
dimension(npts),
intent(in) :: heights
64 real(dp),
intent(in) :: d
68 real(dp),
dimension(npts - 1) :: widths
93 integer(I4B),
intent(in) :: n
94 integer(I4B),
intent(in) :: npts
95 real(dp),
dimension(npts),
intent(in) :: heights
96 real(dp),
intent(in) :: d
97 logical,
intent(in) :: leftface
103 if (heights(n - 1) > d)
then
105 else if (heights(n - 1) > heights(n))
then
106 vwf = heights(n - 1) - heights(n)
109 if (heights(n + 2) > d)
then
110 vwf = d - heights(n + 1)
111 else if (heights(n + 2) > heights(n + 1))
then
112 vwf = heights(n + 2) - heights(n + 1)
129 integer(I4B),
intent(in) :: npts
130 real(dp),
dimension(npts),
intent(in) :: stations
131 real(dp),
dimension(npts),
intent(in) :: heights
132 real(dp),
intent(in) :: d
136 real(dp),
dimension(npts - 1) :: perimeters
146 p = p + perimeters(n)
162 integer(I4B),
intent(in) :: npts
163 real(dp),
dimension(npts),
intent(in) :: stations
164 real(dp),
dimension(npts),
intent(in) :: heights
165 real(dp),
intent(in) :: d
169 real(dp),
dimension(npts - 1) :: areas
195 integer(I4B),
intent(in) :: npts
196 real(dp),
dimension(npts),
intent(in) :: stations
197 real(dp),
dimension(npts),
intent(in) :: heights
198 real(dp),
intent(in) :: d
204 real(dp),
dimension(npts - 1) :: areas
205 real(dp),
dimension(npts - 1) :: perimeters
217 p = p + perimeters(n)
248 roughness, conv_fact, slope, d)
result(q)
250 integer(I4B),
intent(in) :: npts
251 real(dp),
dimension(npts),
intent(in) :: stations
252 real(dp),
dimension(npts),
intent(in) :: heights
253 real(dp),
dimension(npts),
intent(in) :: roughfracs
254 real(dp),
intent(in) :: roughness
255 real(dp),
intent(in) :: conv_fact
256 real(dp),
intent(in) :: slope
257 real(dp),
intent(in) :: d
265 real(dp),
dimension(npts - 1) :: areas
266 real(dp),
dimension(npts - 1) :: perimeters
280 p = p + perimeters(n)
292 r = roughness * roughfracs(n)
293 if (p * r >
dzero)
then
296 q = q + conv_fact * a * rh**
dtwothirds * sqrt(slope) / r
315 integer(I4B),
intent(in) :: npts
316 real(DP),
dimension(npts),
intent(in) :: stations
317 real(DP),
dimension(npts),
intent(in) :: heights
318 logical,
dimension(npts - 1),
intent(inout) :: leftv
319 logical,
dimension(npts - 1),
intent(inout) :: rightv
331 if (stations(n - 1) == stations(n) .and. heights(n - 1) > heights(n))
then
336 if (n < npts - 1)
then
337 if (stations(n + 2) == stations(n + 1) .and. &
338 heights(n + 2) > heights(n + 1))
then
357 integer(I4B),
intent(in) :: npts
358 real(DP),
dimension(npts),
intent(in) :: stations
359 real(DP),
dimension(npts),
intent(in) :: heights
360 real(DP),
intent(in) :: d
361 real(DP),
dimension(npts - 1),
intent(inout) :: p
372 logical,
dimension(npts - 1) :: leftv, rightv
396 if (xlen >
dzero)
then
404 dlen = min(d, dmax) - dmin
409 p(n) = sqrt(xlen**
dtwo + dlen**
dtwo)
421 if (n < npts - 1)
then
441 integer(I4B),
intent(in) :: npts
442 real(DP),
dimension(npts),
intent(in) :: stations
443 real(DP),
dimension(npts),
intent(in) :: heights
444 real(DP),
intent(in) :: d
445 real(DP),
dimension(npts - 1),
intent(inout) :: a
473 if (xlen >
dzero)
then
477 a(n) = xlen * (d - dmax)
481 if (dmax /= dmin .and. d > dmin)
then
483 a(n) = a(n) +
dhalf * (d - dmin) * xlen
485 a(n) = a(n) +
dhalf * (dmax - dmin) * xlen
504 integer(I4B),
intent(in) :: npts
505 real(DP),
dimension(npts),
intent(in) :: stations
506 real(DP),
dimension(npts),
intent(in) :: heights
507 real(DP),
intent(in) :: d
508 real(DP),
dimension(npts - 1),
intent(inout) :: w
551 real(dp),
intent(inout) :: x0
552 real(dp),
intent(inout) :: x1
553 real(dp),
intent(in) :: d0
554 real(dp),
intent(in) :: d1
555 real(dp),
intent(inout) :: dmax
556 real(dp),
intent(inout) :: dmin
557 real(dp),
intent(in) :: d
577 else if (d < dmax)
then
580 if (abs(dlen) >
dzero)
then
586 dx = (d - d1) * slope
591 dx = (d - d0) * slope
This module contains simulation constants.
real(dp), parameter dtwothirds
real constant 2/3
real(dp), parameter dhalf
real constant 1/2
real(dp), parameter dzero
real constant zero
real(dp), parameter dtwo
real constant 2
real(dp), parameter done
real constant 1
This module contains stateless sfr subroutines and functions.
real(dp) function, public get_wetted_topwidth(npts, stations, heights, d)
Calculate the wetted top width for a reach.
real(dp) function get_wet_vert_face(n, npts, heights, d, leftface)
Calculate wetted vertical height.
subroutine get_wetted_topwidths(npts, stations, heights, d, w)
Calculate the wetted top widths for each line segment.
subroutine get_cross_section_areas(npts, stations, heights, d, a)
Calculate the cross-sectional areas for each line segment.
subroutine get_wetted_perimeters(npts, stations, heights, d, p)
Calculate the wetted perimeters for each line segment.
pure subroutine get_wetted_station(x0, x1, d0, d1, dmax, dmin, d)
Calculate the station values for the wetted portion of the cross-section.
real(dp) function, public get_wetted_perimeter(npts, stations, heights, d)
Calculate the wetted perimeter for a reach.
real(dp) function, public get_cross_section_area(npts, stations, heights, d)
Calculate the cross-sectional area for a reach.
real(dp) function, public get_saturated_topwidth(npts, stations)
Calculate the saturated top width for a reach.
subroutine determine_vert_neighbors(npts, stations, heights, leftv, rightv)
Determine vertical segments.
real(dp) function, public get_mannings_section(npts, stations, heights, roughfracs, roughness, conv_fact, slope, d)
Calculate the manning's discharge for a reach.
real(dp) function, public get_hydraulic_radius(npts, stations, heights, d)
Calculate the hydraulic radius for a reach.
This module defines variable data types.