Skip to content

Commit

Permalink
Enhance soil residue handling and biomass calculations in pl_mortality
Browse files Browse the repository at this point in the history
- Added `use soil_module`.
- Introduced a new integer variable `ly` to represent the soil layer number.
- Modified the calculation of surface residue pools by adding above-ground biomass to the surface residue pools.
-- Added a conditional block to check if `bsn_cc%cswat` equals 2, and if true, updated the `meta`, `str`, and `lig` pools in the first soil layer with specific fractions of the above-ground biomass.
-- Added a new block to handle the addition of dead roots to soil residue pools, iterating over each soil layer and updating the `rsd`, `meta`, `str`, and `lig` pools based on the root fraction and specific fractions of the root biomass.
  • Loading branch information
tugraskan committed Dec 10, 2024
1 parent 0db8866 commit b3b930a
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/pl_mortality.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ subroutine pl_mortality
use plant_module
use carbon_module
use organic_mineral_mass_module
use soil_module

implicit none

integer :: j = 0 !none |HRU number
integer :: idp = 0 ! |
integer :: ly = 0 ! |soil layer number
real :: bm_dieoff = 0.
real :: rto = 0.
real :: rto1 = 0.
Expand All @@ -35,7 +37,27 @@ subroutine pl_mortality
!! add dead material to residue
rto1 = 1. - rto
rto1 = max (0., rto1)
soil1(j)%rsd(1) = soil1(j)%rsd(1) + rto1 * pl_mass(j)%tot(ipl)

!! add above ground biomass to surface residue pools
soil1(j)%rsd(1) = soil1(j)%rsd(1) + rto1 * pl_mass(j)%ab_gr(ipl)
if (bsn_cc%cswat == 2) then
soil1(j)%meta(1) = soil1(j)%meta(1) + 0.85 * rto1 * pl_mass(j)%ab_gr(ipl)
soil1(j)%str(1) = soil1(j)%str(1) + 0.15 * rto1 * pl_mass(j)%ab_gr(ipl)
soil1(j)%lig(1) = soil1(j)%lig(1) + 0.12 * rto1 * pl_mass(j)%ab_gr(ipl)
end if

!! add dead roots to soil residue pools
if (bsn_cc%cswat == 2) then
do ly = 1, soil(j)%nly
soil1(j)%rsd(ly) = soil1(j)%rsd(ly) + soil(j)%ly(ly)%rtfr * pl_mass(j)%root(ipl)
if (bsn_cc%cswat == 2) then
soil1(j)%meta(ly) = soil1(j)%meta(ly) + 0.85 * rto1 * soil(j)%ly(ly)%rtfr * pl_mass(j)%root(ipl)
soil1(j)%str(ly) = soil1(j)%str(ly) + 0.15 * rto1 * soil(j)%ly(ly)%rtfr * pl_mass(j)%root(ipl)
soil1(j)%lig(ly) = soil1(j)%lig(ly) + 0.12 * rto1 * soil(j)%ly(ly)%rtfr * pl_mass(j)%root(ipl) ! 0.12 = 0.8 * 0.15 -> lig = 80%str
end if
end do
end if

end if

return
Expand Down

0 comments on commit b3b930a

Please sign in to comment.