WettedPerimeter Function

private function WettedPerimeter(y, B0, alpha) result(p)

returns the wetted perimeter 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.

Arguments

Type IntentOptional 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)

Return Value real(kind=float)


Variables

Type Visibility Attributes Name Initial
real(kind=float), public :: salpha

sine of angle alpha


Source Code

FUNCTION WettedPerimeter &
( y, B0, alpha ) &
RESULT (p)


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) :: p
REAL (KIND = float) :: salpha !!sine of angle alpha

!------------end of declaration------------------------------------------------
salpha =  SIN(alpha*degToRad)

p = B0 + 2 * y / salpha

RETURN
END FUNCTION WettedPerimeter