pest_soil_tot.f90 Source File


This file depends on

sourcefile~~pest_soil_tot.f90~~EfferentGraph sourcefile~pest_soil_tot.f90 pest_soil_tot.f90 sourcefile~constituent_mass_module.f90 constituent_mass_module.f90 sourcefile~pest_soil_tot.f90->sourcefile~constituent_mass_module.f90 sourcefile~hru_module.f90 hru_module.f90 sourcefile~pest_soil_tot.f90->sourcefile~hru_module.f90 sourcefile~output_ls_pesticide_module.f90 output_ls_pesticide_module.f90 sourcefile~pest_soil_tot.f90->sourcefile~output_ls_pesticide_module.f90 sourcefile~pesticide_data_module.f90 pesticide_data_module.f90 sourcefile~pest_soil_tot.f90->sourcefile~pesticide_data_module.f90 sourcefile~plant_module.f90 plant_module.f90 sourcefile~pest_soil_tot.f90->sourcefile~plant_module.f90 sourcefile~soil_module.f90 soil_module.f90 sourcefile~pest_soil_tot.f90->sourcefile~soil_module.f90 sourcefile~carbon_module.f90 carbon_module.f90 sourcefile~soil_module.f90->sourcefile~carbon_module.f90

Source Code

      subroutine pest_soil_tot

!!    ~ ~ ~ PURPOSE ~ ~ ~
!!    this subroutine calculates the total amount of pesticide in the soil

      use pesticide_data_module
      use hru_module, only : ihru
      use soil_module
      use constituent_mass_module
      use output_ls_pesticide_module
      use plant_module
      
      implicit none       
      
      integer :: j = 0    !none          |HRU number
      integer :: k = 0    !none          |sequential pesticide number 
      integer :: ly = 0   !none          |soil layer
      integer :: ipl = 0         !none     |plant number

      j = ihru

      if (cs_db%num_pests == 0) return

      do k = 1, cs_db%num_pests
        do ipl = 1, pcom(j)%npl
          hpestb_d(j)%pest(k)%plant = cs_pl(j)%pl_on(ipl)%pest(k)
          hpestb_d(j)%pest(k)%in_plant = cs_pl(j)%pl_in(ipl)%pest(k) 
        end do
        hpestb_d(j)%pest(k)%soil = 0.
        do ly = 1, soil(j)%nly
          hpestb_d(j)%pest(k)%soil = hpestb_d(j)%pest(k)%soil + cs_soil(j)%ly(ly)%pest(k)
        end do
      end do

      return
      end subroutine pest_soil_tot