Skip to content

Commit

Permalink
Merge pull request ESCOMP#7 from rgknox/yi-logging-v4
Browse files Browse the repository at this point in the history
Yi logging v4
  • Loading branch information
xuyi02 authored Sep 22, 2017
2 parents e1fe601 + 6d210ea commit 13178d7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
16 changes: 11 additions & 5 deletions biogeochem/EDLoggingMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ subroutine LoggingMortality_frac( pft_i, dbh, lmort_logging,lmort_collateral,lmo
! Arguments
integer, intent(in) :: pft_i ! pft index
real(r8), intent(in) :: dbh ! diameter at breast height (cm)
real(r8), intent(out) :: lmort_logging ! logging mortality_rates, share same size class
real(r8), intent(out) :: lmort_collateral ! logging impact mortality_rates, share same size class
real(r8), intent(out) :: lmort_infra ! infrastructure mortality_rates, share same size class
real(r8), intent(out) :: lmort_logging ! direct (harvestable) mortality fraction
real(r8), intent(out) :: lmort_collateral ! collateral damage mortality fraction
real(r8), intent(out) :: lmort_infra ! infrastructure mortality fraction

! Parameters
real(r8), parameter :: adjustment = 1.0 ! adjustment for mortality rates
Expand All @@ -161,12 +161,18 @@ subroutine LoggingMortality_frac( pft_i, dbh, lmort_logging,lmort_collateral,lmo

if (dbh >= logging_dbhmin ) then
lmort_logging = logging_direct_frac * adjustment
lmort_collateral = logging_collateral_frac * adjustment
else
lmort_logging = 0.0_r8
lmort_logging = 0.0_r8
lmort_collateral = 0.0_r8
end if
lmort_collateral = logging_collateral_frac * adjustment

lmort_infra = logging_mechanical_frac * adjustment
!damage rates for size class < & > threshold_size need to be specified seperately

! Collateral damage to smaller plants below the direct logging size threshold
! will be applied via "understory_death" via the disturbance algorithm

else
lmort_logging = 0.0_r8
lmort_collateral = 0.0_r8
Expand Down
11 changes: 6 additions & 5 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ subroutine disturbance_rates( site_in)


! ------------------------------------------------------------------------------------------
! Determine which disturbance is dominant, and force mortality in the upper canopy to be
! zero for the non-dominant mode. Note: upper-canopy tree-fall mortality is
! Determine which disturbance is dominant, and force mortality diagnostics in the upper
! canopy to be zero for the non-dominant mode. Note: upper-canopy tree-fall mortality is
! not always disturbance generating, so when tree-fall mort is non-dominant, make sure
! to still diagnose and track the non-disturbance rate
! ------------------------------------------------------------------------------------------
Expand All @@ -190,6 +190,7 @@ subroutine disturbance_rates( site_in)

currentPatch%disturbance_rate = currentPatch%disturbance_rates(dtype_ilog)

! Update diagnostics
currentCohort => currentPatch%shortest
do while(associated(currentCohort))
if(currentCohort%canopy_layer == 1)then
Expand All @@ -209,7 +210,7 @@ subroutine disturbance_rates( site_in)

currentPatch%disturbance_rate = currentPatch%disturbance_rates(dtype_ifire)

! Zero non-fire mortality rates
! Update diagnostics, zero non-fire mortality rates
currentCohort => currentPatch%shortest
do while(associated(currentCohort))
if(currentCohort%canopy_layer == 1)then
Expand All @@ -236,7 +237,7 @@ subroutine disturbance_rates( site_in)

currentPatch%disturbance_rate = currentPatch%disturbance_rates(dtype_ifall)

! Zero non-treefall mortality rates
! Update diagnostics, zero non-treefall mortality rates
currentCohort => currentPatch%shortest
do while(associated(currentCohort))
if(currentCohort%canopy_layer == 1)then
Expand Down Expand Up @@ -345,7 +346,7 @@ subroutine spawn_patches( currentSite, bc_in)
! This is the amount of patch area that is disturbed, and donated by the donor
patch_site_areadis = currentPatch%area * currentPatch%disturbance_rate

call average_patch_properties(currentPatch, new_patch, patch_site_areadis) ! MAY BE REDUNDANT CALL
call average_patch_properties(currentPatch, new_patch, patch_site_areadis)

if (currentPatch%disturbance_rates(dtype_ilog) > currentPatch%disturbance_rates(dtype_ifall) .and. &
currentPatch%disturbance_rates(dtype_ilog) > currentPatch%disturbance_rates(dtype_ifire) ) then
Expand Down

0 comments on commit 13178d7

Please sign in to comment.