soil_curve_number_alpha Subroutine

public subroutine soil_curve_number_alpha(j, mo, precip, sml)

Uses

  • proc~~soil_curve_number_alpha~~UsesGraph proc~soil_curve_number_alpha soil_curve_number_alpha module~utilities utilities proc~soil_curve_number_alpha->module~utilities

Arguments

Type IntentOptional AttributesName
integer :: j
integer, intent(in) :: mo
real(kind=dp), intent(in) :: precip
real(kind=dp), intent(in) :: sml

Calls

proc~~soil_curve_number_alpha~~CallsGraph proc~soil_curve_number_alpha soil_curve_number_alpha proc~gamma_distribution gamma_distribution proc~soil_curve_number_alpha->proc~gamma_distribution proc~random_n random_n proc~gamma_distribution->proc~random_n float float proc~random_n->float

Called by

proc~~soil_curve_number_alpha~~CalledByGraph proc~soil_curve_number_alpha soil_curve_number_alpha proc~runsubbasin runsubbasin proc~runsubbasin->proc~soil_curve_number_alpha proc~time_process_day time_process_day proc~time_process_day->proc~runsubbasin proc~time_process_month time_process_month proc~time_process_month->proc~time_process_day proc~time_process_years time_process_years proc~time_process_years->proc~time_process_month program~swim swim program~swim->proc~time_process_years

Contents


Source Code

  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