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

Sf fuels refactor + bole harvest litter logic fix/export frac #523

Merged
merged 15 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 23 additions & 2 deletions biogeochem/EDLoggingMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ module EDLoggingMortalityMod

character(len=*), parameter, private :: sourcefile = &
__FILE__


real(r8), public, parameter :: logging_export_frac = 0.8_r8

public :: LoggingMortality_frac
public :: logging_litter_fluxes
Expand Down Expand Up @@ -170,6 +173,8 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
real(r8), parameter :: adjustment = 1.0 ! adjustment for mortality rates

if (logging_time) then


if(EDPftvarcon_inst%woody(pft_i) == 1)then ! only set logging rates for trees

! Pass logging rates to cohort level
Expand All @@ -192,8 +197,14 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &

! Collateral damage to smaller plants below the canopy layer
! will be applied via "understory_death" via the disturbance algorithm
! Important: Degredation rates really only have an impact when
! applied to the canopy layer. So we don't add to degredation
! for collateral damage, even understory collateral damage.

if (canopy_layer .eq. 1) then
lmort_collateral = logging_collateral_frac * adjustment
else
lmort_collateral = 0._r8
endif

else
Expand All @@ -202,6 +213,7 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
lmort_infra = 0.0_r8
l_degrad = 0.0_r8
end if

else
lmort_direct = 0.0_r8
lmort_collateral = 0.0_r8
Expand Down Expand Up @@ -309,10 +321,19 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
(currentCohort%lmort_collateral + currentCohort%lmort_infra)

else

! This routine is only called during disturbance. The litter
! fluxes from non-disturbance generating mortality are
! handled in EDPhysiology. Disturbance generating mortality
! are those cohorts in the top canopy layer, or those
! plants that were impacted. Thus, no direct dead can occur
! here, and indirect are impacts.

if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
direct_dead = 0.0_r8
indirect_dead = logging_coll_under_frac * currentCohort%n * &
(patch_site_areadis/currentPatch%area) !kgC/site/day
indirect_dead = logging_coll_under_frac * &
(1._r8-currentPatch%fract_ldist_not_harvested) * currentCohort%n * &
(patch_site_areadis/currentPatch%area) !kgC/site/day
else
! If the cohort of interest is grass, it will not experience
! any mortality associated with the logging disturbance
Expand Down
7 changes: 5 additions & 2 deletions biogeochem/EDMortalityFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,18 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in)
currentCohort%lmort_infra, &
currentCohort%l_degrad)




if (currentCohort%canopy_layer > 1)then

! Include understory logging mortality rates not associated with disturbance
dndt_logging = (currentCohort%lmort_direct + &
currentCohort%lmort_collateral + &
currentCohort%lmort_infra)/hlm_freq_day

currentCohort%dndt = -1.0_r8 * (cmort+hmort+bmort+frmort+dndt_logging) * currentCohort%n
else
! Mortality from logging in the canopy is ONLY disturbance generating, don't
! update number densities via non-disturbance inducing death
currentCohort%dndt = -(1.0_r8 - fates_mortality_disturbance_fraction) &
* (cmort+hmort+bmort+frmort) * currentCohort%n
endif
Expand Down
21 changes: 12 additions & 9 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module EDPatchDynamicsMod
use EDTypesMod , only : dtype_ilog
use EDTypesMod , only : dtype_ifire
use EDTypesMod , only : ican_upper
use EDTypesMod , only : lg_sf
use FatesInterfaceMod , only : hlm_use_planthydro
use FatesInterfaceMod , only : hlm_numSWb
use FatesInterfaceMod , only : bc_in_type
Expand Down Expand Up @@ -151,7 +152,7 @@ subroutine disturbance_rates( site_in, bc_in)
call LoggingMortality_frac(currentCohort%pft, currentCohort%dbh, currentCohort%canopy_layer, &
lmort_direct,lmort_collateral,lmort_infra,l_degrad )

currentCohort%lmort_direct = lmort_direct
currentCohort%lmort_direct = lmort_direct
currentCohort%lmort_collateral = lmort_collateral
currentCohort%lmort_infra = lmort_infra
currentCohort%l_degrad = l_degrad
Expand Down Expand Up @@ -186,7 +187,7 @@ subroutine disturbance_rates( site_in, bc_in)

! Logging Disturbance Rate
currentPatch%disturbance_rates(dtype_ilog) = currentPatch%disturbance_rates(dtype_ilog) + &
min(1.0_r8, currentCohort%lmort_direct + &
min(1.0_r8, currentCohort%lmort_direct + &
currentCohort%lmort_collateral + &
currentCohort%lmort_infra + &
currentCohort%l_degrad ) * &
Expand Down Expand Up @@ -226,7 +227,7 @@ subroutine disturbance_rates( site_in, bc_in)
! to still diagnose and track the non-disturbance rate
! ------------------------------------------------------------------------------------------


! DISTURBANCE IS LOGGING
if (currentPatch%disturbance_rates(dtype_ilog) > currentPatch%disturbance_rates(dtype_ifall) .and. &
currentPatch%disturbance_rates(dtype_ilog) > currentPatch%disturbance_rates(dtype_ifire) ) then

Expand All @@ -245,7 +246,7 @@ subroutine disturbance_rates( site_in, bc_in)
currentCohort => currentCohort%taller
enddo !currentCohort

! DISTURBANCE IS FIRE
! DISTURBANCE IS FIRE
elseif (currentPatch%disturbance_rates(dtype_ifire) > currentPatch%disturbance_rates(dtype_ifall) .and. &
currentPatch%disturbance_rates(dtype_ifire) > currentPatch%disturbance_rates(dtype_ilog) ) then

Expand Down Expand Up @@ -275,7 +276,7 @@ subroutine disturbance_rates( site_in, bc_in)
currentCohort => currentCohort%taller
enddo !currentCohort

else ! If fire and loggin are not greater than treefall, just set disturbance rate to tree-fall
else ! If fire and logging are not greater than treefall, just set disturbance rate to tree-fall
! which is most likely a 0.0

currentPatch%disturbance_rate = currentPatch%disturbance_rates(dtype_ifall)
Expand Down Expand Up @@ -477,6 +478,8 @@ subroutine spawn_patches( currentSite, bc_in)

call logging_litter_fluxes(currentSite, currentPatch, new_patch, patch_site_areadis)

if(debug) write(fates_log(),*) "Logging disturbance generated:",patch_site_areadis

elseif ((currentPatch%disturbance_rates(dtype_ifire) > &
currentPatch%disturbance_rates(dtype_ifall)) .and. &
(currentPatch%disturbance_rates(dtype_ifire) > &
Expand Down Expand Up @@ -681,7 +684,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%lmort_infra = currentCohort%lmort_infra


! Logging is the dominant disturbance
! Logging is the dominant disturbance
elseif ((currentPatch%disturbance_rates(dtype_ilog) > &
currentPatch%disturbance_rates(dtype_ifall)) .and. &
(currentPatch%disturbance_rates(dtype_ilog) > &
Expand Down Expand Up @@ -756,7 +759,7 @@ subroutine spawn_patches( currentSite, bc_in)
! LOGGING SURVIVORSHIP OF UNDERSTORY PLANTS IS SET AS A NEW PARAMETER
! in the fatesparameter files
nc%n = nc%n * (1.0_r8 - &
currentPatch%fract_ldist_not_harvested * logging_coll_under_frac)
(1.0_r8-currentPatch%fract_ldist_not_harvested) * logging_coll_under_frac)

! Step 3: Reduce the number count of cohorts in the
! original/donor/non-disturbed patch to reflect the area change
Expand Down Expand Up @@ -1085,7 +1088,7 @@ subroutine fire_litter_fluxes(currentSite, cp_target, new_patch_target, patch_si
!************************************/
do c = 1,ncwd
burned_litter = new_patch%cwd_ag(c) * patch_site_areadis/new_patch%area * &
currentPatch%burnt_frac_litter(c+1) !kG/m2/day
currentPatch%burnt_frac_litter(c) !kG/m2/day
new_patch%cwd_ag(c) = new_patch%cwd_ag(c) - burned_litter
currentSite%flux_out = currentSite%flux_out + burned_litter * new_patch%area !kG/site/day
currentSite%total_burn_flux_to_atm = currentSite%total_burn_flux_to_atm + &
Expand Down Expand Up @@ -1240,7 +1243,7 @@ subroutine fire_litter_fluxes(currentSite, cp_target, new_patch_target, patch_si
if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
burned_leaves = leaf_c * currentCohort%fraction_crown_burned
else
burned_leaves = leaf_c * currentPatch%burnt_frac_litter(6)
burned_leaves = leaf_c * currentPatch%burnt_frac_litter(lg_sf)
endif

if (burned_leaves > 0.0_r8) then
Expand Down
Loading