crop_process Subroutine

public subroutine crop_process(j, je, k, n, wet, additionalGwUptake, avt, bWAM_Module, dart, daycounter, es, fc, flu, frar, humi, ida, iy, iyr, mstruc, nbyr, nn, nveg, pit, ra, sbar, sep, ste, tmn, tx, uap, ylc, yls, z, bSnowModule, tmit)

Uses

  • proc~~crop_process~~UsesGraph proc~crop_process crop_process module~vegetation vegetation proc~crop_process->module~vegetation module~utilities utilities module~vegetation->module~utilities

Arguments

Type IntentOptional AttributesName
integer :: j
integer :: je
integer :: k
integer :: n
integer :: wet
real(kind=dp), intent(inout), dimension(:):: additionalGwUptake
real(kind=dp), intent(in), dimension(:):: avt
logical, intent(in) :: bWAM_Module
real(kind=dp), intent(in), dimension(:):: dart
integer, intent(in) :: daycounter
real(kind=dp), intent(in) :: es
real(kind=dp), intent(in), dimension(:, :):: fc
real(kind=dp), intent(in), dimension(:):: flu
real(kind=dp), intent(in), dimension(:, :):: frar
real(kind=dp), intent(in), dimension(:):: humi
integer, intent(in) :: ida
integer, intent(in) :: iy
integer, intent(in) :: iyr
integer, intent(in), dimension(:, :, :):: mstruc
integer, intent(in) :: nbyr
integer, intent(in) :: nn
integer, intent(in), dimension(:, :):: nveg
real(kind=dp), intent(in) :: pit
real(kind=dp), intent(in), dimension(:):: ra
real(kind=dp), intent(in), dimension(:):: sbar
real(kind=dp), intent(inout) :: sep
real(kind=dp), intent(inout), dimension(:, :, :):: ste
real(kind=dp), intent(in), dimension(:):: tmn
real(kind=dp), intent(in), dimension(:):: tx
real(kind=dp), intent(out) :: uap
real(kind=dp), intent(in), dimension(:):: ylc
real(kind=dp), intent(in), dimension(:):: yls
real(kind=dp), intent(in), dimension(:, :):: z
logical, intent(in) :: bSnowModule
real(kind=dp), intent(in) :: tmit

Calls

proc~~crop_process~~CallsGraph proc~crop_process crop_process proc~crop_operation crop_operation proc~crop_process->proc~crop_operation proc~vegetation_water_stress vegetation_water_stress proc~crop_process->proc~vegetation_water_stress proc~crop_growth crop_growth proc~crop_process->proc~crop_growth proc~output_store_hydrotope_value output_store_hydrotope_value proc~crop_operation->proc~output_store_hydrotope_value proc~management_subbasin_pointer management_subbasin_pointer proc~vegetation_water_stress->proc~management_subbasin_pointer proc~landuse_is_cropland landuse_is_cropland proc~vegetation_water_stress->proc~landuse_is_cropland proc~wam_correct_irrigationdemand wam_correct_irrigationdemand proc~vegetation_water_stress->proc~wam_correct_irrigationdemand proc~management_user_pointer management_user_pointer proc~vegetation_water_stress->proc~management_user_pointer proc~management_is_transfer_subbasin management_is_transfer_subbasin proc~vegetation_water_stress->proc~management_is_transfer_subbasin proc~management_is_active_period management_is_active_period proc~vegetation_water_stress->proc~management_is_active_period proc~vegetation_s_curve vegetation_s_curve proc~crop_growth->proc~vegetation_s_curve amin1 amin1 proc~crop_growth->amin1 proc~nutrient_phosphorus_uptake nutrient_phosphorus_uptake proc~crop_growth->proc~nutrient_phosphorus_uptake proc~vegetation_adjust_energy_ratio vegetation_adjust_energy_ratio proc~crop_growth->proc~vegetation_adjust_energy_ratio proc~nutrient_nitrate_uptake nutrient_nitrate_uptake proc~crop_growth->proc~nutrient_nitrate_uptake proc~vegetation_temperature_stress vegetation_temperature_stress proc~crop_growth->proc~vegetation_temperature_stress proc~landuse_index landuse_index proc~landuse_is_cropland->proc~landuse_index proc~log_error log_error proc~management_user_pointer->proc~log_error proc~vegetation_nutrient_stress vegetation_nutrient_stress proc~nutrient_phosphorus_uptake->proc~vegetation_nutrient_stress proc~nutrient_nitrate_uptake->proc~vegetation_nutrient_stress proc~vegetation_temperature_stress->proc~landuse_is_cropland 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~~crop_process~~CalledByGraph proc~crop_process crop_process proc~hydrotope_process hydrotope_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


Source Code

  subroutine crop_process(j, je, k, n, wet, additionalGwUptake, avt, bWAM_Module, dart, daycounter, es, fc, flu, frar, humi, ida, iy, iyr, mstruc, nbyr, nn, nveg, pit, ra, sbar, sep, ste, tmn, tx, uap, ylc, yls, z, bSnowModule, tmit)
    !**** PURPOSE: THIS SUBROUTINE CALCULATES DAILY POTENTIAL & ACTUAL GROWTH
    !     OF TOTAL PLANT BIOMASS AND ROOTS AND CALCULATES LEAF AREA INDEX.
    !     IT ADJUSTS DAILY BIOMASS TO WATER, TEMP. & NUTR. STRESS.
    !**** CALLED IN: HYDROTOP
    !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    !     PARAMETERS & VARIABLES
    !
    !      >>>>> COMMON PARAMETERS & VARIABLES
    !      actual = actual evapotranspiration, mm
    !      alai(j, je) = leaf area index
    !      cva(j, je) = vegetation cover, kg/ha
    !      dm(j, je) = total biomass, kg/ha
    !      ep = plant transpiration, mm
    !      es = soil evaporation, mm
    !      g(j, je) = fraction of heat units to maturity accumulated
    !      icrop = switch code to print from crop()
    !      icrsb = number of subbasin to print from crop(), if icrop = 1
    !      icrso = number of soil to print from crop(), if icrop = 1
    !      ida = current day
    !      igro(j, je) = vegetation index, =1 if vegetation is growing
    !      rd(j, je) = root depth, mm
    !      rsd(j, je, 2)= crop residue in two upper soil layers, kg/ha
    !      ts = temperature stress factor
    !      uap = P uptake in hydrotope, kg/ha
    !      ws(j, je) = water stress factor
    !      >>>>>
    !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    !**** Include common parameters
    use vegetation, only : vegetation_water_stress, olai, dm, ws, rsd, rd, g, alai, ts, ep

    real(dp), dimension(:), intent(inout) :: additionalGwUptake
    real(dp), dimension(:), intent(in) :: avt
    logical, intent(in) :: bWAM_Module
    real(dp), dimension(:), intent(in) :: dart
    integer, intent(in) :: daycounter
    real(dp), intent(in) :: es
    real(dp), dimension(:, :), intent(in) :: fc
    real(dp), dimension(:), intent(in) :: flu
    real(dp), dimension(:, :), intent(in) :: frar
    real(dp), dimension(:), intent(in) :: humi
    integer, intent(in) :: ida
    integer, intent(in) :: iy
    integer, intent(in) :: iyr
    integer, dimension(:, :, :), intent(in) :: mstruc
    integer, intent(in) :: nbyr
    integer, intent(in) :: nn
    integer, dimension(:, :), intent(in) :: nveg
    real(dp), intent(in) :: pit
    real(dp), dimension(:), intent(in) :: ra
    real(dp), dimension(:), intent(in) :: sbar
    real(dp), intent(inout) :: sep
    real(dp), dimension(:, :, :), intent(inout) :: ste
    real(dp), dimension(:), intent(in) :: tmn
    real(dp), dimension(:), intent(in) :: tx
    real(dp), intent(out) :: uap
    real(dp), dimension(:), intent(in) :: ylc
    real(dp), dimension(:), intent(in) :: yls
    real(dp), dimension(:, :), intent(in) :: z
    logical, intent(in) :: bSnowModule
    real(dp), intent(in) :: tmit

    integer j, je, n, k, wet

    uap = 0.
    ts = 0.

    !**** CALC vegetation cover
    cva(j, je) = .8 * dm(j, je) + rsd(j, je, 1)

    !#### CALL OPERAT
    call crop_operation(j, je, k, alai, dm, frar, g, ida, iy, olai, rd, rsd, ws)

    !#### CALL WSTRESS to COMPUTE WATER STRESS
    if (igro(j, je) .ge. 1) call vegetation_water_stress(j, je, k, n, wet, additionalGwUptake, bWAM_Module, dart, daycounter, fc, frar, humi, icc, ida, iy, iyr, mstruc, nbyr, nn, nucr, nveg, rdmx, sbar, sep, ste, z)
    actual = ep + es

    !#### CALL GROWTH
    call crop_growth(avt, bSnowModule, flu, frar, ida, j, je, n, nn, nveg, pit, ra, tmit, tmn, tx, ylc, yls)

    return
  end subroutine crop_process