returns the topwidth of a triangular, rectangular or trapezoidal cross section
Reference:
Todini, E. (2007) A mass conservative and water storage consistent variable parameter Muskingum-Cunge approach, Hydrol. Earth Syst. Sci.,1645-1659.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=float), | intent(in) | :: | y |
water stage (m) |
||
real(kind=float), | intent(in) | :: | B0 |
bottom width, = 0 for triangular section (m) |
||
real(kind=float), | intent(in) | :: | alpha |
angle formed by dykes over a horizontal plane (deg) |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=float), | public | :: | calpha |
cotangent of angle alpha |
FUNCTION TopWidth & ( y, B0, alpha ) & RESULT (b) IMPLICIT NONE ! Function arguments ! Scalar arguments with intent(in): REAL (KIND = float), INTENT (IN) :: y !!water stage (m) REAL (KIND = float), INTENT (IN) :: B0 !!bottom width, = 0 for triangular section (m) REAL (KIND = float), INTENT (IN) :: alpha !!angle formed by dykes over a horizontal plane (deg) ! Scalar arguments with intent(OUT): REAL (KIND = float) :: b REAL (KIND = float) :: calpha !!cotangent of angle alpha !------------end of declaration------------------------------------------------ calpha = 1. / TAN(alpha*degToRad) b = B0 + 2 * y * calpha RETURN END FUNCTION TopWidth