Skip to content

Commit

Permalink
Merge pull request #454 from ckoven/secondary_forest
Browse files Browse the repository at this point in the history
Track secondary forest area to keep primary and secondary patches distinct
  • Loading branch information
rgknox authored Apr 9, 2019
2 parents 687f1ac + 01e8897 commit c7fa7c2
Show file tree
Hide file tree
Showing 11 changed files with 848 additions and 540 deletions.
22 changes: 10 additions & 12 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,12 @@ subroutine nan_cohort(cc_p)

! ALLOCATION
currentCohort%dmort = nan ! proportional mortality rate. (year-1)

! logging
currentCohort%lmort_direct = nan
currentCohort%lmort_infra = nan
currentCohort%lmort_collateral = nan
currentCohort%l_degrad = nan


currentCohort%seed_prod = nan ! reproduction seed and clonal: KgC/indiv/year
Expand Down Expand Up @@ -589,6 +592,7 @@ subroutine zero_cohort(cc_p)
currentCohort%lmort_direct = 0._r8
currentCohort%lmort_infra = 0._r8
currentCohort%lmort_collateral = 0._r8
currentCohort%l_degrad = 0._r8
currentCohort%leaf_cost = 0._r8
currentcohort%excl_weight = 0._r8
currentcohort%prom_weight = 0._r8
Expand Down Expand Up @@ -1152,12 +1156,6 @@ subroutine fuse_cohorts(currentSite, currentPatch, bc_in)

currentCohort%dmort = (currentCohort%n*currentCohort%dmort + &
nextc%n*nextc%dmort)/newn
currentCohort%lmort_direct = (currentCohort%n*currentCohort%lmort_direct + &
nextc%n*nextc%lmort_direct)/newn
currentCohort%lmort_infra = (currentCohort%n*currentCohort%lmort_infra + &
nextc%n*nextc%lmort_infra)/newn
currentCohort%lmort_collateral = (currentCohort%n*currentCohort%lmort_collateral + &
nextc%n*nextc%lmort_collateral)/newn

currentCohort%fire_mort = (currentCohort%n*currentCohort%fire_mort + &
nextc%n*nextc%fire_mort)/newn
Expand All @@ -1175,7 +1173,9 @@ subroutine fuse_cohorts(currentSite, currentPatch, bc_in)
nextc%n*nextc%lmort_collateral)/newn
currentCohort%lmort_infra = (currentCohort%n*currentCohort%lmort_infra + &
nextc%n*nextc%lmort_infra)/newn

currentCohort%l_degrad = (currentCohort%n*currentCohort%l_degrad + &
nextc%n*nextc%l_degrad)/newn

! biomass and dbh tendencies
currentCohort%ddbhdt = (currentCohort%n*currentCohort%ddbhdt + &
nextc%n*nextc%ddbhdt)/newn
Expand Down Expand Up @@ -1550,9 +1550,6 @@ subroutine copy_cohort( currentCohort,copyc )

! ALLOCATION
n%dmort = o%dmort
n%lmort_direct = o%lmort_direct
n%lmort_infra = o%lmort_infra
n%lmort_collateral= o%lmort_collateral
n%seed_prod = o%seed_prod
n%treelai = o%treelai
n%treesai = o%treesai
Expand All @@ -1565,9 +1562,10 @@ subroutine copy_cohort( currentCohort,copyc )
n%frmort = o%frmort

! logging mortalities, Yi Xu
n%lmort_direct=o%lmort_direct
n%lmort_direct =o%lmort_direct
n%lmort_collateral =o%lmort_collateral
n%lmort_infra =o%lmort_infra
n%lmort_infra =o%lmort_infra
n%l_degrad =o%l_degrad

! Flags
n%isnew = o%isnew
Expand Down
22 changes: 17 additions & 5 deletions biogeochem/EDLoggingMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ subroutine IsItLoggingTime(is_master,currentSite)

else if(icode < 0 .and. icode > -366) then
! Logging event every year on specific day of year
if(hlm_day_of_year .eq. icode ) then
if(hlm_day_of_year .eq. abs(icode) ) then
logging_time = .true.
end if

Expand Down Expand Up @@ -151,14 +151,20 @@ end subroutine IsItLoggingTime

! ======================================================================================

subroutine LoggingMortality_frac( pft_i, dbh, lmort_direct,lmort_collateral,lmort_infra )
subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
lmort_collateral, lmort_infra, l_degrad )

! Arguments
integer, intent(in) :: pft_i ! pft index
real(r8), intent(in) :: dbh ! diameter at breast height (cm)
integer, intent(in) :: canopy_layer ! canopy layer of this cohort
real(r8), intent(out) :: lmort_direct ! direct (harvestable) mortality fraction
real(r8), intent(out) :: lmort_collateral ! collateral damage mortality fraction
real(r8), intent(out) :: lmort_infra ! infrastructure mortality fraction
real(r8), intent(out) :: l_degrad ! fraction of trees that are not killed
! but suffer from forest degradation (i.e. they
! are moved to newly-anthro-disturbed secondary
! forest patch)

! Parameters
real(r8), parameter :: adjustment = 1.0 ! adjustment for mortality rates
Expand All @@ -170,31 +176,37 @@ subroutine LoggingMortality_frac( pft_i, dbh, lmort_direct,lmort_collateral,lmor

if (dbh >= logging_dbhmin ) then
lmort_direct = logging_direct_frac * adjustment
lmort_collateral = logging_collateral_frac * adjustment
l_degrad = 0._r8
else
lmort_direct = 0.0_r8
lmort_collateral = 0.0_r8
l_degrad = logging_direct_frac * adjustment
end if

if (dbh >= logging_dbhmax_infra) then
lmort_infra = 0.0_r8
l_degrad = l_degrad + logging_mechanical_frac * adjustment
else
lmort_infra = logging_mechanical_frac * adjustment
end if
!damage rates for size class < & > threshold_size need to be specified seperately

! Collateral damage to smaller plants below the direct logging size threshold
! Collateral damage to smaller plants below the canopy layer
! will be applied via "understory_death" via the disturbance algorithm
if (canopy_layer .eq. 1) then
lmort_collateral = logging_collateral_frac * adjustment
endif

else
lmort_direct = 0.0_r8
lmort_collateral = 0.0_r8
lmort_infra = 0.0_r8
l_degrad = 0.0_r8
end if
else
lmort_direct = 0.0_r8
lmort_collateral = 0.0_r8
lmort_infra = 0.0_r8
l_degrad = 0.0_r8
end if

end subroutine LoggingMortality_frac
Expand Down
5 changes: 3 additions & 2 deletions biogeochem/EDMortalityFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,11 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in)
! Mortality for trees in the understorey.
!if trees are in the canopy, then their death is 'disturbance'. This probably needs a different terminology
call mortality_rates(currentCohort,bc_in,cmort,hmort,bmort,frmort)
call LoggingMortality_frac(ipft, currentCohort%dbh, &
call LoggingMortality_frac(ipft, currentCohort%dbh, currentCohort%canopy_layer, &
currentCohort%lmort_direct, &
currentCohort%lmort_collateral, &
currentCohort%lmort_infra )
currentCohort%lmort_infra, &
currentCohort%l_degrad)

if (currentCohort%canopy_layer > 1)then

Expand Down
Loading

0 comments on commit c7fa7c2

Please sign in to comment.