From 914687a4d783501d633a3adf3f4b59c2cf872bf8 Mon Sep 17 00:00:00 2001 From: Jeff Arnold Date: Thu, 14 Nov 2024 15:36:47 -0600 Subject: [PATCH] Revised initialization of residue and soil litter. Added residue decomposition routine. --- src/actions.f90 | 1 - src/organic_mineral_mass_module.f90 | 74 ++++++++++++++--------------- src/plant_init.f90 | 25 ++++++++-- src/rsd_decomp.f90 | 12 +++-- src/soil_nutcarb_init.f90 | 46 +++++++----------- 5 files changed, 83 insertions(+), 75 deletions(-) diff --git a/src/actions.f90 b/src/actions.f90 index 24e3987..f539c06 100644 --- a/src/actions.f90 +++ b/src/actions.f90 @@ -894,7 +894,6 @@ subroutine actions (ob_cur, ob_num, idtbl) ilu = d_tbl%act_typ(iac) hru(j)%land_use_mgt = ilu hru(j)%dbs%land_use_mgt = ilu - !hru(j)%dbsc%land_use_mgt lu_prev = hru(j)%land_use_mgt_c hru(j)%land_use_mgt_c = d_tbl%act(iac)%file_pointer isol = hru(j)%dbs%soil diff --git a/src/organic_mineral_mass_module.f90 b/src/organic_mineral_mass_module.f90 index 55d74ce..cbc19da 100644 --- a/src/organic_mineral_mass_module.f90 +++ b/src/organic_mineral_mass_module.f90 @@ -41,6 +41,7 @@ module organic_mineral_mass_module character (len=16) :: name = "" real :: tot_mn = 0. ! |total mineral n pool (no3+nh4) in soil profile real :: tot_mp = 0. ! |mineral p pool (wsol+lab+act+sta) in soil profile + real :: salt = 0. ! |total salt amount (kg/ha) in soil profile type (organic_mass) :: tot_org ! |total organics in soil profile real, dimension(:), allocatable :: sw !mm |soil water dimensioned by layer real, dimension(:), allocatable :: cbn !% |percent carbon @@ -92,13 +93,14 @@ module organic_mineral_mass_module type (organic_mass) :: bsn_org_rsd ! |total residue organics in basin real :: bsn_mn = 0. ! |total mineral n pool (no3+nh4) in soil profile real :: bsn_mp = 0. ! |mineral p pool (wsol+lab+act+sta) in soil profile - + type (organic_mass) :: decomp ! |temporary storage for residue decomp + type residue_mass1 !surface residue character (len=16) :: name = "" type (organic_mass), dimension(:), allocatable :: tot ! |total mass surface residue litter pool-dimensioned by plant type (organic_mass), dimension(:), allocatable :: meta ! |metabolic litter pool-dimensioned by plant type (organic_mass), dimension(:), allocatable :: str ! |structural litter pool-dimensioned by plant - type (organic_mass), dimension(:), allocatable :: lignin ! |lignin pool-dimensioned by plant + type (organic_mass), dimension(:), allocatable :: lignin ! |lignin pool-dimensioned by plant type (organic_mass) :: tot_com !kg/ha |total type (organic_mass) :: tot_meta ! | type (organic_mass) :: tot_str ! | @@ -366,6 +368,39 @@ function om_add1 (o_m1, o_m2) result (o_m3) o_m3%p = o_m1%p + o_m2%p end function om_add1 + !! subtract organic mass + function om_subtract (o_m1, o_m2) result (o_m3) + type (organic_mass), intent (in) :: o_m1 + type (organic_mass), intent (in) :: o_m2 + type (organic_mass) :: o_m3 + o_m3%m = o_m1%m - o_m2%m + o_m3%c = o_m1%c - o_m2%c + o_m3%n = o_m1%n - o_m2%n + o_m3%p = o_m1%p - o_m2%p + end function om_subtract + + !! multiply organic mass by a constant + function om_mult_const (const, o_m1) result (o_m2) + real, intent (in) :: const + type (organic_mass), intent (in) :: o_m1 + type (organic_mass) :: o_m2 + o_m2%m = const * o_m1%m + o_m2%c = const * o_m1%c + o_m2%n = const * o_m1%n + o_m2%p = const * o_m1%p + end function om_mult_const + + !! divide organic mass by a constant + function om_divide (o_m1, const) result (o_m2) + type (organic_mass), intent (in) :: o_m1 + real, intent (in) :: const + type (organic_mass) :: o_m2 + o_m2%m = o_m1%m / const + o_m2%c = o_m1%c / const + o_m2%n = o_m1%n / const + o_m2%p = o_m1%p / const + end function om_divide + !! add org_flux function org_flux_add1 (org_flux1, org_flux2) result (org_flux3) type (organic_flux), intent (in) :: org_flux1 @@ -409,40 +444,5 @@ function org_flux_add1 (org_flux1, org_flux2) result (org_flux3) org_flux3%co2fs2 = org_flux1%co2fs2 + org_flux2%co2fs2 org_flux3%co2fs3 = org_flux1%co2fs3 + org_flux2%co2fs3 end function org_flux_add1 - - !! subtract organic mass - function om_subtract (o_m1, o_m2) result (o_m3) - type (organic_mass), intent (in) :: o_m1 - type (organic_mass), intent (in) :: o_m2 - type (organic_mass) :: o_m3 - o_m3%m = o_m1%m - o_m2%m - o_m3%c = o_m1%c - o_m2%c - o_m3%n = o_m1%n - o_m2%n - o_m3%p = o_m1%p - o_m2%p - end function om_subtract - - !! multiply organic mass by a constant - function om_mult_const (const, o_m1) result (o_m2) - real, intent (in) :: const - type (organic_mass), intent (in) :: o_m1 - type (organic_mass) :: o_m2 - o_m2%m = const * o_m1%m - o_m2%c = const * o_m1%c - o_m2%n = const * o_m1%n - o_m2%p = const * o_m1%p - end function om_mult_const - - !! divide organic mass by a constant - function om_divide (o_m1, const) result (o_m2) - type (organic_mass), intent (in) :: o_m1 - real, intent (in) :: const - type (organic_mass) :: o_m2 - o_m2%m = o_m1%m / const - o_m2%c = o_m1%c / const - o_m2%n = o_m1%n / const - o_m2%p = o_m1%p / const - end function om_divide - - end module organic_mineral_mass_module \ No newline at end of file diff --git a/src/plant_init.f90 b/src/plant_init.f90 index 0030535..40a4a2c 100644 --- a/src/plant_init.f90 +++ b/src/plant_init.f90 @@ -119,11 +119,28 @@ subroutine plant_init (init, iihru) pcom(j)%plcur(ipl)%gro = pcomdb(icom)%pl(ipl)%igro pcom(j)%plcur(ipl)%idorm = "y" idp = pcomdb(icom)%pl(ipl)%db_num + + !! initialize fresh organic residue pools rsd1(j)%tot(ipl)%m = pcomdb(icom)%pl(ipl)%rsdin - !set fresh organic pools--assume cn ratio = 57 and cp ratio = 300 - rsd1(j)%tot(ipl)%c = 0.43 * rsd1(j)%tot(ipl)%m - rsd1(j)%tot(ipl)%n = 0.43 * rsd1(j)%tot(ipl)%m / 57. - rsd1(j)%tot(ipl)%p = 0.43 * rsd1(j)%tot(ipl)%m / 300. + rsd1(j)%tot(ipl)%c = 0.42 * rsd1(j)%tot(ipl)%m + + !! metabolic residue + rsd1(j)%meta(ipl)%m = 0.85 * rsd1(j)%tot(ipl)%m + rsd1(j)%meta(ipl)%c = 0.85 * rsd1(j)%tot(ipl)%c + rsd1(j)%meta(ipl)%n = rsd1(j)%meta(ipl)%c / 10. !assume 10:1 C:N ratio (EPIC) + rsd1(j)%meta(ipl)%p = rsd1(j)%meta(ipl)%c / 100. + + !! structural residue + rsd1(j)%str(ipl)%m = 0.15 * rsd1(j)%tot(ipl)%m + rsd1(j)%str(ipl)%c = 0.15 * rsd1(j)%tot(ipl)%c + rsd1(j)%str(ipl)%n = rsd1(j)%str(ipl)%c / 150. !assume 150:1 C:N ratio (EPIC) + rsd1(j)%str(ipl)%p = rsd1(j)%str(ipl)%c / 1500. + + !! lignin residue + rsd1(j)%lignin(ipl)%m = 0.8 * rsd1(j)%str(ipl)%m + rsd1(j)%lignin(ipl)%c = 0.8 * rsd1(j)%str(ipl)%c !assume 80% Stuctural C is Lignin + rsd1(j)%lignin(ipl)%n = 0.2 * rsd1(j)%str(ipl)%n + rsd1(j)%lignin(ipl)%p = 0.02 * rsd1(j)%str(ipl)%p ! set heat units to maturity ! first compute base0 units for entire year diff --git a/src/rsd_decomp.f90 b/src/rsd_decomp.f90 index 329aa81..783ece6 100644 --- a/src/rsd_decomp.f90 +++ b/src/rsd_decomp.f90 @@ -135,9 +135,15 @@ subroutine rsd_decomp !! apply decay to all carbon pools if (bsn_cc%cswat == 2) then - rsd1(j)%meta(ipl) = (1. - decr) * rsd1(j)%meta(ipl) - rsd1(j)%str(ipl) = (1. - decr) * rsd1(j)%str(ipl) - rsd1(j)%lignin(ipl) = (1. - decr) * rsd1(j)%lignin(ipl) + decomp = decr * rsd1(j)%meta(ipl) + rsd1(j)%meta(ipl) = rsd1(j)%meta(ipl) - decomp + soil1(j)%meta(1) = soil1(j)%meta(1) + decomp + decomp = decr * rsd1(j)%str(ipl) + rsd1(j)%str(ipl) = rsd1(j)%str(ipl) - decomp + soil1(j)%str(1) = soil1(j)%str(1) + decomp + decomp = decr * rsd1(j)%lignin(ipl) + rsd1(j)%lignin(ipl) = rsd1(j)%lignin(ipl) - decomp + soil1(j)%lig(1) = soil1(j)%lig(1) + decomp end if !! mineralization of residue n and p diff --git a/src/soil_nutcarb_init.f90 b/src/soil_nutcarb_init.f90 index b08ee50..ec2afa4 100644 --- a/src/soil_nutcarb_init.f90 +++ b/src/soil_nutcarb_init.f90 @@ -150,48 +150,34 @@ subroutine soil_nutcarb_init (isol) !initialize passive humus pool soil1(ihru)%hp(ly)%m = frac_hum_passive * soil1(ihru)%tot(ly)%m - soil1(ihru)%hp(ly)%c = .42 * frac_hum_passive * soil1(ihru)%tot(ly)%c !assume 42% C - soil1(ihru)%hp(ly)%n = soil1(ihru)%hp(ly)%c / 10. !assume 10:1 C:N ratio - soil1(ihru)%hp(ly)%p = soil1(ihru)%hp(ly)%c / 80. !assume 80:1 C:P ratio + soil1(ihru)%hp(ly)%c = frac_hum_passive * soil1(ihru)%tot(ly)%c + soil1(ihru)%hp(ly)%n = soil1(ihru)%hp(ly)%c / 10. !assume 10:1 C:N ratio + soil1(ihru)%hp(ly)%p = soil1(ihru)%hp(ly)%c / 80. !assume 80:1 C:P ratio !initialize slow humus pool soil1(ihru)%hs(ly)%m = frac_hum_slow * soil1(ihru)%tot(ly)%m - soil1(ihru)%hs(ly)%c = .42 * frac_hum_slow * soil1(ihru)%tot(ly)%c !assume 42% C - soil1(ihru)%hs(ly)%n = soil1(ihru)%hs(ly)%c / 10. !assume 10:1 C:N ratio - soil1(ihru)%hs(ly)%p = soil1(ihru)%hs(ly)%c / 80. !assume 80:1 C:P ratio + soil1(ihru)%hs(ly)%c = frac_hum_slow * soil1(ihru)%tot(ly)%c + soil1(ihru)%hs(ly)%n = soil1(ihru)%hs(ly)%c / 10. !assume 10:1 C:N ratio + soil1(ihru)%hs(ly)%p = soil1(ihru)%hs(ly)%c / 80. !assume 80:1 C:P ratio !initialize microbial pool soil1(ihru)%microb(ly)%m = frac_hum_microb * soil1(ihru)%tot(ly)%m - soil1(ihru)%microb(ly)%c = .42 * frac_hum_microb * soil1(ihru)%tot(ly)%c !assume 42% C + soil1(ihru)%microb(ly)%c = frac_hum_microb * soil1(ihru)%tot(ly)%c soil1(ihru)%microb(ly)%n = soil1(ihru)%microb(ly)%c / 8. !assume 8:1 C:N ratio soil1(ihru)%microb(ly)%p = soil1(ihru)%microb(ly)%c / 80. !assume 80:1 C:P ratio - !initialize metabolic litter pool - soil1(ihru)%meta(ly)%m = soil1(ihru)%tot(ly)%m / 1000. !t/ha - kg/ha - soil1(ihru)%meta(ly)%c = .42 * soil1(ihru)%meta(ly)%c !assume 42% C - soil1(ihru)%meta(ly)%n = soil1(ihru)%meta(ly)%c / 150. !assume 150:1 C:N ratio - soil1(ihru)%meta(ly)%p = soil1(ihru)%meta(ly)%c / 1500. !assume 1500:1 C:P ratio - - !initialize structural litter pool - soil1(ihru)%str(ly)%m = soil1(ihru)%meta(ly)%m - soil1(ihru)%str(ly)%c = .42 * soil1(ihru)%str(ly)%c !assume 42% C - soil1(ihru)%str(ly)%n = soil1(ihru)%lig(ly)%c / 150. !assume 150:1 C:N ratio - soil1(ihru)%str(ly)%p = soil1(ihru)%lig(ly)%c / 1500. !assume 1500:1 C:P ratio + !zero metabolic litter pool + soil1(ihru)%meta(ly) = plt_mass_z + + !zero structural litter pool + soil1(ihru)%str(ly) = plt_mass_z - !initialize lignon litter pool - soil1(ihru)%lig(ly)%m = .8 * soil1(ihru)%str(ly)%m - soil1(ihru)%lig(ly)%c = .8 * soil1(ihru)%str(ly)%c - soil1(ihru)%lig(ly)%n = .2 * soil1(ihru)%str(ly)%c - soil1(ihru)%lig(ly)%p = .02 * soil1(ihru)%str(ly)%c + !zero lignon litter pool + soil1(ihru)%lig(ly) = plt_mass_z soil1(ihru)%tot(ly)%c = soil1(ihru)%hs(ly)%c + soil1(ihru)%hp(ly)%c + soil1(ihru)%microb(ly)%c + & - soil1(ihru)%meta(ly)%c + soil1(ihru)%str(ly)%c + soil1(ihru)%lig(ly)%c - !initialize water soluble pool - !soil1(ihru)%water(ly)%m = - !soil1(ihru)%water(ly)%c = - !soil1(ihru)%water(ly)%n = - !soil1(ihru)%water(ly)%p = - + soil1(ihru)%meta(ly)%c + soil1(ihru)%str(ly)%c + end do return