Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grass PFT only creates leaves not cwd #891

Merged
merged 20 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
658c14b
updated EDPatchDynamics to also send grass stem biomass to leaf litte…
ckoven Aug 4, 2022
84e4e5d
updated litterfall logic so that grass stem litterfall goes into leaf…
ckoven Jul 25, 2022
0d6527d
Grass PFT only creates leaves not cwd
ZacharyRobbins Aug 16, 2022
8953681
Updated to comments by JK
ZacharyRobbins Aug 16, 2022
b83403e
added live grass stem mass to live fuel and to burn fluxes (reimpleme…
ckoven Oct 10, 2022
9daabc7
changed grass -> CWD logic in SendCohortToLitter
ckoven Oct 10, 2022
e85f4f2
fixed typo on woody logic
ckoven Oct 26, 2022
1284889
merged zachary and charlie branches on grass CWD dynamics and resovle…
ckoven Oct 26, 2022
f163230
Merge pull request #1 from ckoven/nograsswd_offmain_zacahrymerge
ZacharyRobbins Oct 26, 2022
33468d2
Fixing attribution (JS)
ZacharyRobbins Nov 9, 2022
ba57f9e
Update biogeochem/EDPatchDynamicsMod.F90
jkshuman Nov 11, 2022
7ed8792
Update biogeochem/EDPatchDynamicsMod.F90
jkshuman Nov 11, 2022
81732ff
Update biogeochem/EDPatchDynamicsMod.F90
jkshuman Nov 11, 2022
ef47c5c
Update biogeochem/EDPatchDynamicsMod.F90
jkshuman Nov 11, 2022
64dc01a
Update biogeochem/EDPatchDynamicsMod.F90
jkshuman Nov 11, 2022
1e90789
Update biogeochem/EDPatchDynamicsMod.F90
jkshuman Nov 11, 2022
7f02310
Update biogeochem/EDPhysiologyMod.F90
jkshuman Nov 11, 2022
bf7dea4
Update biogeochem/EDPhysiologyMod.F90
jkshuman Nov 11, 2022
935f601
Update fire/SFMainMod.F90
jkshuman Nov 11, 2022
1a8a24b
Update fire/SFMainMod.F90
jkshuman Nov 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -967,12 +967,25 @@ subroutine SendCohortToLitter(csite,cpatch,ccohort,nplant,bc_in)

do el=1,num_elements

leaf_m = ccohort%prt%GetState(leaf_organ, element_list(el))
store_m = ccohort%prt%GetState(store_organ, element_list(el))
sapw_m = ccohort%prt%GetState(sapw_organ, element_list(el))
fnrt_m = ccohort%prt%GetState(fnrt_organ, element_list(el))
struct_m = ccohort%prt%GetState(struct_organ, element_list(el))
repro_m = ccohort%prt%GetState(repro_organ, element_list(el))
if ( prt_params%woody(pft) == itrue) then !trees only
leaf_m = ccohort%prt%GetState(leaf_organ, element_list(el))
store_m = ccohort%prt%GetState(store_organ, element_list(el))
sapw_m = ccohort%prt%GetState(sapw_organ, element_list(el))
fnrt_m = ccohort%prt%GetState(fnrt_organ, element_list(el))
struct_m = ccohort%prt%GetState(struct_organ, element_list(el))
repro_m = ccohort%prt%GetState(repro_organ, element_list(el))
else
leaf_m = ccohort%prt%GetState(leaf_organ, element_list(el))+ &
ccohort%prt%GetState(store_organ, element_list(el))+ &
ccohort%prt%GetState(sapw_organ, element_list(el))+ &
ccohort%prt%GetState(struct_organ, element_list(el))+ &
ccohort%prt%GetState(repro_organ, element_list(el))
store_m = 0_r8
sapw_m = 0_r8
fnrt_m = ccohort%prt%GetState(fnrt_organ, element_list(el))
struct_m = 0_r8
repro_m = 0_r8
end if

litt => cpatch%litter(el)
flux_diags => csite%flux_diags(el)
Expand Down
114 changes: 56 additions & 58 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1637,96 +1637,94 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, &
! across ground surface.
! -----------------------------------------------------------------------

sapw_m = currentCohort%prt%GetState(sapw_organ, element_id)
struct_m = currentCohort%prt%GetState(struct_organ, element_id)
leaf_m = currentCohort%prt%GetState(leaf_organ, element_id)
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)

! Absolute number of dead trees being transfered in with the donated area
num_dead_trees = (currentCohort%fire_mort*currentCohort%n * &
if ( prt_params%woody(pft) == itrue) then !trees only, May require additional accounting for the atm_fluxes when PFT is grass.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZacharyRobbins there is something going on with spacing here. Can you fix this so that the if statement is moved back to the left?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I have resolved the spacing issue, and return fine roots to their original location.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this outstanding still?

! Goal was to not add to pools in the event of grass fire. Grass would typically not introduce a flux of dead leaves
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see an else attached to this if clause where we use a logging message to indicate non-woody disturbance is not supported here, and include an endrun() and a verbose message. This prevents vulnerable code in case someone modifies disturbance generation to allow for non-woody, they will then realize it needs to be applied here as well.

! or coarse woody debris. This may be too coarse a solution in the long term.
leaf_m = currentCohort%prt%GetState(leaf_organ, element_list(el))
store_m = currentCohort%prt%GetState(store_organ, element_list(el))
sapw_m = currentCohort%prt%GetState(sapw_organ, element_list(el))
fnrt_m = currentCohort%prt%GetState(fnrt_organ, element_list(el))
struct_m = currentCohort%prt%GetState(struct_organ, element_list(el))
repro_m = currentCohort%prt%GetState(repro_organ, element_list(el))
! 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)

! Contribution of dead trees to leaf litter
donatable_mass = num_dead_trees * (leaf_m+repro_m) * &
! Contribution of dead trees to leaf litter
donatable_mass = num_dead_trees * (leaf_m+repro_m) * &
(1.0_r8-currentCohort%fraction_crown_burned)

! 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) + &
donatable_mass*donate_m2*dcmpy_frac
curr_litt%leaf_fines(dcmpy) = curr_litt%leaf_fines(dcmpy) + &
! 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) + &
donatable_mass*donate_m2*dcmpy_frac
curr_litt%leaf_fines(dcmpy) = curr_litt%leaf_fines(dcmpy) + &
donatable_mass*retain_m2*dcmpy_frac
end do
end do

site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass
site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass

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)

! Contribution of dead trees to root litter (no root burn flux to atm)
do dcmpy=1,ndcmpy
dcmpy_frac = GetDecompyFrac(pft,fnrt_organ,dcmpy)
do sl = 1,currentSite%nlevsoil
do dcmpy=1,ndcmpy
dcmpy_frac = GetDecompyFrac(pft,fnrt_organ,dcmpy)
do sl = 1,currentSite%nlevsoil
donatable_mass = num_dead_trees * (fnrt_m+store_m) * currentSite%rootfrac_scr(sl)
new_litt%root_fines(dcmpy,sl) = new_litt%root_fines(dcmpy,sl) + &
donatable_mass*donate_m2*dcmpy_frac
curr_litt%root_fines(dcmpy,sl) = curr_litt%root_fines(dcmpy,sl) + &
donatable_mass*retain_m2*dcmpy_frac
end do
end do

! Track as diagnostic fluxes
flux_diags%leaf_litter_input(pft) = &
end do
end do
! Track as diagnostic fluxes
flux_diags%leaf_litter_input(pft) = &
flux_diags%leaf_litter_input(pft) + &
num_dead_trees * (leaf_m+repro_m) * (1.0_r8-currentCohort%fraction_crown_burned)

flux_diags%root_litter_input(pft) = &
flux_diags%root_litter_input(pft) + &
(fnrt_m + store_m) * num_dead_trees
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) )
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
donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * &
do c = 1,ncwd
do sl = 1,currentSite%nlevsoil
donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * &
bcroot * currentSite%rootfrac_scr(sl)

new_litt%bg_cwd(c,sl) = new_litt%bg_cwd(c,sl) + &
new_litt%bg_cwd(c,sl) = new_litt%bg_cwd(c,sl) + &
donatable_mass * donate_m2
curr_litt%bg_cwd(c,sl) = curr_litt%bg_cwd(c,sl) + &
curr_litt%bg_cwd(c,sl) = curr_litt%bg_cwd(c,sl) + &
donatable_mass * retain_m2

! track diagnostics
flux_diags%cwd_bg_input(c) = &
flux_diags%cwd_bg_input(c) = &
flux_diags%cwd_bg_input(c) + &
donatable_mass
enddo
end do

enddo
end do
! stem biomass per tree
bstem = (sapw_m + struct_m) * prt_params%allom_agb_frac(pft)

! Above ground coarse woody debris from twigs and small branches
! a portion of this pool may burn
do c = 1,ncwd
donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem
if (c == 1 .or. c == 2) then
do c = 1,ncwd
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
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
endif


currentCohort => currentCohort%taller
Expand Down
53 changes: 37 additions & 16 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2193,24 +2193,45 @@ 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)

leaf_m_turnover = currentCohort%prt%GetTurnover(leaf_organ,element_id)
store_m_turnover = currentCohort%prt%GetTurnover(store_organ,element_id)
fnrt_m_turnover = currentCohort%prt%GetTurnover(fnrt_organ,element_id)
sapw_m_turnover = currentCohort%prt%GetTurnover(sapw_organ,element_id)
struct_m_turnover = currentCohort%prt%GetTurnover(struct_organ,element_id)
repro_m_turnover = currentCohort%prt%GetTurnover(repro_organ,element_id)

leaf_m = currentCohort%prt%GetState(leaf_organ,element_id)
store_m = currentCohort%prt%GetState(store_organ,element_id)
fnrt_m = currentCohort%prt%GetState(fnrt_organ,element_id)
sapw_m = currentCohort%prt%GetState(sapw_organ,element_id)
struct_m = currentCohort%prt%GetState(struct_organ,element_id)
repro_m = currentCohort%prt%GetState(repro_organ,element_id)

if ( prt_params%woody(pft) == itrue) then !trees only
leaf_m_turnover = currentCohort%prt%GetTurnover(leaf_organ, element_id)
store_m_turnover = currentCohort%prt%GetTurnover(store_organ,element_id)
sapw_m_turnover = currentCohort%prt%GetTurnover(sapw_organ, element_id)
fnrt_m_turnover = currentCohort%prt%GetTurnover(fnrt_organ, element_id)
struct_m_turnover = currentCohort%prt%GetTurnover(struct_organ, element_id)
repro_m_turnover = currentCohort%prt%GetTurnover(repro_organ, element_id)
leaf_m = currentCohort%prt%GetState(leaf_organ, element_id)
store_m = currentCohort%prt%GetState(store_organ, element_id)
sapw_m = currentCohort%prt%GetState(sapw_organ, element_id)
fnrt_m = currentCohort%prt%GetState(fnrt_organ, element_id)
struct_m = currentCohort%prt%GetState(struct_organ, element_id)
repro_m = currentCohort%prt%GetState(repro_organ, element_id)
else ! grass PFTs should not spawn anything other than leaves.
leaf_m_turnover = currentCohort%prt%GetTurnover(leaf_organ, element_id)+ &
currentCohort%prt%GetTurnover(store_organ, element_id)+ &
currentCohort%prt%GetTurnover(sapw_organ, element_id)+ &

currentCohort%prt%GetTurnover(struct_organ, element_id)+ &
currentCohort%prt%GetTurnover(repro_organ, element_id)
store_m_turnover = 0_r8
sapw_m_turnover = 0_r8
fnrt_m_turnover = currentCohort%prt%GetTurnover(fnrt_organ, element_id)
struct_m_turnover = 0_r8
repro_m_turnover = 0_r8
leaf_m = currentCohort%prt%GetState(leaf_organ, element_id)+ &
currentCohort%prt%GetState(store_organ, element_id)+ &
currentCohort%prt%GetState(sapw_organ, element_id)+ &
currentCohort%prt%GetState(struct_organ, element_id)+ &
currentCohort%prt%GetState(repro_organ, element_id)
store_m = 0_r8
sapw_m = 0_r8
fnrt_m = currentCohort%prt%GetState(fnrt_organ, element_id)
struct_m = 0_r8
repro_m = 0_r8
end if
plant_dens = currentCohort%n/currentPatch%area

! ---------------------------------------------------------------------------------
Expand Down