Skip to content

Commit

Permalink
merged zachary and charlie branches on grass CWD dynamics and resovle…
Browse files Browse the repository at this point in the history
…d conflicts
  • Loading branch information
ckoven committed Oct 26, 2022
2 parents e85f4f2 + 8953681 commit 1284889
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
20 changes: 10 additions & 10 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1650,16 +1650,16 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
do while(associated(currentCohort))

pft = currentCohort%pft

! Number of trees that died because of the fire, per m2 of ground.
! Divide their litter into the four litter streams, and spread
! across ground surface.
! -----------------------------------------------------------------------

fnrt_m = currentCohort%prt%GetState(fnrt_organ, element_id)
store_m = currentCohort%prt%GetState(store_organ, element_id)
repro_m = currentCohort%prt%GetState(repro_organ, element_id)

if (prt_params%woody(currentCohort%pft) == itrue) then
! Assumption: for woody plants, we lump fluxes from deadwood and sapwood together in CWD pool.
! for non-woody plants, we put all stem fluxes into the same leaf litter pool.
Expand All @@ -1674,7 +1674,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
struct_m = 0._r8
end if


! Absolute number of dead trees being transfered in with the donated area
num_dead_trees = (currentCohort%fire_mort*currentCohort%n * &
patch_site_areadis/currentPatch%area)
Expand All @@ -1685,7 +1685,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &

! Contribution of dead trees to leaf burn-flux
burned_mass = num_dead_trees * (leaf_m+repro_m) * currentCohort%fraction_crown_burned

do dcmpy=1,ndcmpy
dcmpy_frac = GetDecompyFrac(pft,leaf_organ,dcmpy)
new_litt%leaf_fines(dcmpy) = new_litt%leaf_fines(dcmpy) + &
Expand Down Expand Up @@ -1719,10 +1719,10 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
flux_diags%root_litter_input(pft) = &
flux_diags%root_litter_input(pft) + &
(fnrt_m + store_m) * num_dead_trees

! coarse root biomass per tree
bcroot = (sapw_m + struct_m) * (1.0_r8 - prt_params%allom_agb_frac(pft) )

! below ground coarse woody debris from burned trees
do c = 1,ncwd
do sl = 1,currentSite%nlevsoil
Expand Down Expand Up @@ -1750,15 +1750,15 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem
if (c == 1 .or. c == 2) then
donatable_mass = donatable_mass * (1.0_r8-currentCohort%fraction_crown_burned)
burned_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem * &
burned_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem * &
currentCohort%fraction_crown_burned
site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass
endif
new_litt%ag_cwd(c) = new_litt%ag_cwd(c) + donatable_mass * donate_m2
curr_litt%ag_cwd(c) = curr_litt%ag_cwd(c) + donatable_mass * retain_m2
flux_diags%cwd_ag_input(c) = flux_diags%cwd_ag_input(c) + donatable_mass
enddo
enddo


currentCohort => currentCohort%taller
enddo
Expand Down
3 changes: 1 addition & 2 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2193,8 +2193,7 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
currentCohort => currentPatch%shortest
do while(associated(currentCohort))
pft = currentCohort%pft

call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, &
call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, &
bc_in%max_rooting_depth_index_col)

store_m_turnover = currentCohort%prt%GetTurnover(store_organ,element_id)
Expand Down

0 comments on commit 1284889

Please sign in to comment.