vegetation_prepare_parameters Subroutine

public subroutine vegetation_prepare_parameters(lat)

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in) :: lat(:)

Called by

proc~~vegetation_prepare_parameters~~CalledByGraph proc~vegetation_prepare_parameters vegetation_prepare_parameters proc~vegetation_initialise vegetation_initialise proc~vegetation_initialise->proc~vegetation_prepare_parameters proc~initialise initialise proc~initialise->proc~vegetation_initialise program~swim swim program~swim->proc~initialise

Contents


Source Code

  subroutine vegetation_prepare_parameters(lat)
    real(dp), intent(in) :: lat(:)
    real(dp) :: ch(size(lat)), hrs(size(lat))

    ch = .439 * abs(tan(lat / 57.296))
    hrs = merge(0., acos(ch), ch >= 1.)
    daylmn = 7.72 * hrs
    if (bDormancy) then
      dormhr = merge(1., (abs(lat) - 20.) / 20., abs(lat) > 40.)
      dormhr = merge(-0.1, dormhr, abs(lat) < 20.)
    else
      dormhr = - 1.
    end if
  end subroutine vegetation_prepare_parameters