vegetation_temperature_stress Subroutine

public subroutine vegetation_temperature_stress(tgx, j, je, n, avt, nucr, nveg, tmn, to, tx)

Uses

  • proc~~vegetation_temperature_stress~~UsesGraph proc~vegetation_temperature_stress vegetation_temperature_stress module~landuse landuse proc~vegetation_temperature_stress->module~landuse module~snow snow proc~vegetation_temperature_stress->module~snow module~utilities utilities module~landuse->module~utilities module~snow->module~utilities

Arguments

Type IntentOptional AttributesName
real(kind=dp) :: tgx
integer :: j
integer :: je
integer :: n
real(kind=dp), intent(in), dimension(:):: avt
integer, intent(in), dimension(:, :):: nucr
integer, intent(in), dimension(:, :):: nveg
real(kind=dp), intent(in), dimension(:):: tmn
real(kind=dp), intent(in), dimension(:):: to
real(kind=dp), intent(in), dimension(:):: tx

Calls

proc~~vegetation_temperature_stress~~CallsGraph proc~vegetation_temperature_stress vegetation_temperature_stress proc~landuse_is_cropland landuse_is_cropland proc~vegetation_temperature_stress->proc~landuse_is_cropland proc~landuse_index landuse_index proc~landuse_is_cropland->proc~landuse_index proc~log_error log_error proc~landuse_index->proc~log_error proc~log_message log_message proc~log_error->proc~log_message proc~log_write log_write proc~log_message->proc~log_write proc~log_format_message log_format_message proc~log_message->proc~log_format_message proc~to_string to_string proc~log_write->proc~to_string proc~date_time_str date_time_str proc~log_format_message->proc~date_time_str proc~colourise colourise proc~log_format_message->proc~colourise proc~string_index string_index proc~colourise->proc~string_index

Called by

proc~~vegetation_temperature_stress~~CalledByGraph proc~vegetation_temperature_stress vegetation_temperature_stress proc~vegetation_process vegetation_process proc~vegetation_process->proc~vegetation_temperature_stress proc~crop_growth crop_growth proc~crop_growth->proc~vegetation_temperature_stress proc~crop_process crop_process proc~crop_process->proc~crop_growth proc~hydrotope_process hydrotope_process proc~hydrotope_process->proc~vegetation_process proc~hydrotope_process->proc~crop_process proc~runsubbasin runsubbasin proc~runsubbasin->proc~hydrotope_process 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 vegetation_temperature_stress(tgx, j, je, n, avt, nucr, nveg, tmn, to, tx)
    !**** PURPOSE: COMPUTES TEMPERATURE STRESS FOR CROP/VEGETATION GROWTH
    !**** CALLED IN: GROWTH, VEGMD
    !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    !     PARAMETERS & VARIABLES
    !
    !      >>>>> COMMON PARAMETERS & VARIABLES
    !      avt(j) = average annual daily temerature., degree C
    !      nucr(j, je) = crop number
    !      nveg(j, je) = vegetation number
    !      tb(iv) = base temp for plant growth, degree C
    !      tmn(j) = daily min temp, from readcli, degree C
    !      to(iv) = opt temp for growth, degree C
    !      ts = temp stress factor
    !      tx(j) = daily aver temp, degree C
    !      >>>>>

    !      >>>>> STATIC PARAMETERS
    !      num = local par
    !      rto = local par
    !      rto1 = local par
    !      rto2 = local par
    !      >>>>>
    !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    !**** Include common parameters
    use landuse, only : landuse_is_cropland
    use snow, only : bSnowModule, tmin, tx_tmp, tmit, tmin_tmp

    real(dp), dimension(:), intent(in) :: avt
    integer, dimension(:, :), intent(in) :: nucr
    integer, dimension(:, :), intent(in) :: nveg
    real(dp), dimension(:), intent(in) :: tmn
    real(dp), dimension(:), intent(in) :: to
    real(dp), dimension(:), intent(in) :: tx
    integer j, je, n, num
    real(dp) tgx, rto, rto1, rto2
    !###########################
    !#### SNOW MODULE ####
    !###########################
    if (bSnowModule) then
      tx_tmp = tmit
      tmin_tmp = tmin
    else
      tx_tmp = tx(j)
      tmin_tmp = tmn(j)
    end if
    !###########################

    if (landuse_is_cropland(n) ) then
        num = nucr(j, je)
    else
        num = nveg(j, je)
    endif

    rto = 0.
    rto1 = 0.
    rto2 = 0.

    !**** CALC temp stress factor ts
    if (tx_tmp .le. to(num)) then
      tgx = (to(num) + tb(num)) / (to(num) - tb(num))
      rto1 = tgx * (to(num) - tx_tmp) ** 2
      rto2 = rto1 / (tx_tmp + 1.e-6)
      if (rto2 .le. 200.) then
        ts = exp(- 0.1054 * rto2)
      else
        ts = 0.
      end if
    else
      tgx = 2. * to(num) - tb(num) - tx_tmp
      rto = ((to(num)-tx_tmp) / (tgx + 1.e-6)) ** 2
      if (rto .le. 200.) then
        ts = exp(- 0.1054 * rto)
      else
        ts = 0.
      end if
    endif

    if (tmin_tmp .le. (avt(j) - 15.)) ts = 0.

    return
  end subroutine vegetation_temperature_stress