Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | j | ||||
integer, | intent(in) | :: | mo | |||
real(kind=dp), | intent(in) | :: | precip | |||
real(kind=dp), | intent(in) | :: | sml |
subroutine soil_curve_number_alpha(j, mo, precip, sml)
!**** PURPOSE: THIS SUBROUTINE COMPUTES PRECIP ALPHA FACTOR:
! ALPHA is A DIMENSIONLESS PARAMETER THAT EXPRESSES
! THE FRACTION OF TOTAL RAINFALL THAT OCCURS DURING 0.5 H
! readwet: read wim() = monthly max .5h rain for period of record (mm)
! readwet: calc wi() = f(wim) = to be used in alpha()
! for estim of precip. alpha factor
! alpha: calc r1 = alpha for rainfall, the fraction of total rainfall
! occuring in 0.5h
! peakq: calc pr = peak runoff rate using r1
!**** CALLED IN: SUBBASIN
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! PARAMETERS & VARIABLES
!
! >>>>> COMMON PARAMETERS & VARIABLES
!block ab = .02083
!block k7 = parameters for random number generator
! mo = current month
! precip = precipitation in subbasin, mm
! r1 = alpha for rainfall, the fraction of total rainfall
! occuring during 0.5h
! rn1 = random value, calc in readsub
! rp = alpha for rainfall, the fraction of total rainfall
! occuring during 0.5h
! sml = snow melt, calc in snom(), mm
! wi(m, j) = f(wim), wim = monthly max .5h rain for period of record, mm
! >>>>>
! >>>>> STATIC PARAMETERS
! aii = local parameter
! ajp = local parameter
! ei = local parameter
! >>>>>
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!**** Include common parameters
use utilities, only : gamma_distribution
integer, intent(in) :: mo
real(dp), intent(in) :: precip
real(dp), intent(in) :: sml
integer j
real(dp) aii, ajp, ei
! real(dp) gammad
ei = precip - sml
! sl begin
ei = MAX(ei, 0.0_dp)
! sl end
aii = (1. - ab) / (wi(mo, j) - ab)
if (ei .ge. 25.) then
ajp = 1. - exp(- 125. / ei)
else
ajp = 1.
end if
r1 = gamma_distribution(rn1, aii, k7)
r1 = (ei * (ab + r1 * (ajp - ab)) + sml * ab) / precip
! sl begin
if (r1 >= 1.) r1 = 0.99999
! sl end
rp = r1
return
end subroutine soil_curve_number_alpha