Skip to content

Commit

Permalink
Merge pull request #2 from rgknox/jaholm_freezing_stress
Browse files Browse the repository at this point in the history
Jaholm freezing stress
  • Loading branch information
rgknox authored Feb 16, 2018
2 parents 93f2aef + ae20478 commit 1ad0701
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 148 deletions.
16 changes: 8 additions & 8 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ subroutine nan_cohort(cc_p)
currentCohort%root_md = nan ! root maintenance demand: kgC/indiv/year
currentCohort%carbon_balance = nan ! carbon remaining for growth and storage: kg/indiv/year
currentCohort%dmort = nan ! proportional mortality rate. (year-1)
currentCohort%lmort_logging = nan
currentCohort%lmort_direct = nan
currentCohort%lmort_infra = nan
currentCohort%lmort_collateral = nan

Expand Down Expand Up @@ -514,7 +514,7 @@ subroutine zero_cohort(cc_p)
currentcohort%dmort = 0._r8
currentcohort%gscan = 0._r8
currentcohort%treesai = 0._r8
currentCohort%lmort_logging = 0._r8
currentCohort%lmort_direct = 0._r8
currentCohort%lmort_infra = 0._r8
currentCohort%lmort_collateral = 0._r8
! currentCohort%npp_leaf = 0._r8
Expand Down Expand Up @@ -866,8 +866,8 @@ subroutine fuse_cohorts(patchptr, bc_in)

currentCohort%dmort = (currentCohort%n*currentCohort%dmort + &
nextc%n*nextc%dmort)/newn
currentCohort%lmort_logging = (currentCohort%n*currentCohort%lmort_logging + &
nextc%n*nextc%lmort_logging)/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 + &
Expand All @@ -886,8 +886,8 @@ subroutine fuse_cohorts(patchptr, bc_in)
currentCohort%frmort = (currentCohort%n*currentCohort%frmort + nextc%n*nextc%frmort)/newn

! logging mortality, Yi Xu
currentCohort%lmort_logging = (currentCohort%n*currentCohort%lmort_logging + &
nextc%n*nextc%lmort_logging)/newn
currentCohort%lmort_direct = (currentCohort%n*currentCohort%lmort_direct + &
nextc%n*nextc%lmort_direct)/newn
currentCohort%lmort_collateral = (currentCohort%n*currentCohort%lmort_collateral + &
nextc%n*nextc%lmort_collateral)/newn
currentCohort%lmort_infra = (currentCohort%n*currentCohort%lmort_infra + &
Expand Down Expand Up @@ -1260,7 +1260,7 @@ subroutine copy_cohort( currentCohort,copyc )
n%root_md = o%root_md
n%carbon_balance = o%carbon_balance
n%dmort = o%dmort
n%lmort_logging = o%lmort_logging
n%lmort_direct = o%lmort_direct
n%lmort_infra = o%lmort_infra
n%lmort_collateral= o%lmort_collateral
n%seed_prod = o%seed_prod
Expand All @@ -1278,7 +1278,7 @@ subroutine copy_cohort( currentCohort,copyc )
n%frmort = o%frmort

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

Expand Down
38 changes: 22 additions & 16 deletions biogeochem/EDLoggingMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ module EDLoggingMortalityMod

! ====================================================================================
! Purpose: 1. create logging mortalities:
! (a)logging mortality (cohort level)
! (b)collateral mortality (cohort level)
! (c)infrastructure mortality (cohort level)
! (a) direct logging mortality (cohort level)
! (b) collateral mortality (cohort level)
! (c) infrastructure mortality (cohort level)
! 2. move the logged trunk fluxes from live into product pool
! 3. move logging-associated mortality fluxes from live to CWD
! 4. keep carbon balance (in ed_total_balance_check)
!
! Yi Xu
! Date: 2017
! Yi Xu & M.Huang
! Date: 09/2017
! Last updated: 10/2017
! ====================================================================================

use FatesConstantsMod , only : r8 => fates_r8
Expand All @@ -29,7 +30,7 @@ module EDLoggingMortalityMod
use EDParamsMod , only : logging_collateral_frac
use EDParamsMod , only : logging_direct_frac
use EDParamsMod , only : logging_mechanical_frac
use EDParamsMod , only : ED_val_understorey_death
use EDParamsMod , only : logging_coll_under_frac
use FatesInterfaceMod , only : hlm_current_year
use FatesInterfaceMod , only : hlm_current_month
use FatesInterfaceMod , only : hlm_current_day
Expand Down Expand Up @@ -142,44 +143,49 @@ end subroutine IsItLoggingTime

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

subroutine LoggingMortality_frac( pft_i, dbh, lmort_logging,lmort_collateral,lmort_infra )
subroutine LoggingMortality_frac( pft_i, dbh, lmort_direct,lmort_collateral,lmort_infra )

! Arguments
integer, intent(in) :: pft_i ! pft index
real(r8), intent(in) :: dbh ! diameter at breast height (cm)
real(r8), intent(out) :: lmort_logging ! direct (harvestable) mortality fraction
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

! Parameters
real(r8), parameter :: adjustment = 1.0 ! adjustment for mortality rates

real(r8), parameter :: logging_dbhmax_infra = 35 !(cm), based on Feldpaush et al. (2005) and Ferry et al. (2010)

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

! Pass logging rates to cohort level

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

lmort_infra = logging_mechanical_frac * adjustment
if (dbh >= logging_dbhmax_infra) then
lmort_infra = 0.0_r8
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
! will be applied via "understory_death" via the disturbance algorithm

else
lmort_logging = 0.0_r8
lmort_direct = 0.0_r8
lmort_collateral = 0.0_r8
lmort_infra = 0.0_r8
end if
else
lmort_logging = 0.0_r8
lmort_direct = 0.0_r8
lmort_collateral = 0.0_r8
lmort_infra = 0.0_r8
end if
Expand Down Expand Up @@ -269,14 +275,14 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site


if(currentCohort%canopy_layer == 1)then
direct_dead = currentCohort%n * currentCohort%lmort_logging
direct_dead = currentCohort%n * currentCohort%lmort_direct
indirect_dead = currentCohort%n * &
(currentCohort%lmort_collateral + currentCohort%lmort_infra)

else
if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
direct_dead = 0.0_r8
indirect_dead = ED_val_understorey_death * currentCohort%n * &
indirect_dead = logging_coll_under_frac * currentCohort%n * &
(patch_site_areadis/currentPatch%area) !kgC/site/day
else
! If the cohort of interest is grass, it will not experience
Expand Down
47 changes: 23 additions & 24 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ subroutine disturbance_rates( site_in, bc_in)
! be one disturbance type for each timestep.
! all disturbance rates here are per daily timestep.

! 2016-2017
! Modify to add logging disturbance
! 2016-2017
! Modify to add logging disturbance

! !USES:
use EDMortalityFunctionsMod , only : mortality_rates
! loging flux
Expand All @@ -97,7 +97,7 @@ subroutine disturbance_rates( site_in, bc_in)
real(r8) :: hmort
real(r8) :: frmort

real(r8) :: lmort_logging
real(r8) :: lmort_direct
real(r8) :: lmort_collateral
real(r8) :: lmort_infra

Expand Down Expand Up @@ -128,9 +128,9 @@ subroutine disturbance_rates( site_in, bc_in)
currentCohort%fmort = 0.0_r8 ! Fire mortality is initialized as zero, but may be changed

call LoggingMortality_frac(currentCohort%pft, currentCohort%dbh, &
lmort_logging,lmort_collateral,lmort_infra )
lmort_direct,lmort_collateral,lmort_infra )

currentCohort%lmort_logging = lmort_logging
currentCohort%lmort_direct = lmort_direct
currentCohort%lmort_collateral = lmort_collateral
currentCohort%lmort_infra = lmort_infra

Expand Down Expand Up @@ -162,7 +162,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_logging + &
min(1.0_r8, currentCohort%lmort_direct + &
currentCohort%lmort_collateral + &
currentCohort%lmort_infra ) * &
currentCohort%c_area/currentPatch%area
Expand Down Expand Up @@ -226,7 +226,7 @@ subroutine disturbance_rates( site_in, bc_in)
currentCohort%bmort = currentCohort%bmort*(1.0_r8 - fates_mortality_disturbance_fraction)
currentCohort%dmort = currentCohort%dmort*(1.0_r8 - fates_mortality_disturbance_fraction)
currentCohort%frmort = currentCohort%frmort*(1.0_r8 - fates_mortality_disturbance_fraction)
currentCohort%lmort_logging = 0.0_r8
currentCohort%lmort_direct = 0.0_r8
currentCohort%lmort_collateral = 0.0_r8
currentCohort%lmort_infra = 0.0_r8
end if
Expand All @@ -249,7 +249,7 @@ subroutine disturbance_rates( site_in, bc_in)
currentCohort => currentPatch%shortest
do while(associated(currentCohort))
if(currentCohort%canopy_layer == 1)then
currentCohort%lmort_logging = 0.0_r8
currentCohort%lmort_direct = 0.0_r8
currentCohort%lmort_collateral = 0.0_r8
currentCohort%lmort_infra = 0.0_r8
currentCohort%fmort = 0.0_r8
Expand Down Expand Up @@ -284,7 +284,7 @@ subroutine spawn_patches( currentSite, bc_in)
!
! !USES:

use EDParamsMod , only : ED_val_understorey_death
use EDParamsMod , only : ED_val_understorey_death, logging_coll_under_frac
use EDCohortDynamicsMod , only : zero_cohort, copy_cohort, terminate_cohorts

!
Expand Down Expand Up @@ -408,7 +408,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%bmort = nan
nc%fmort = nan
nc%frmort = nan
nc%lmort_logging = nan
nc%lmort_direct = nan
nc%lmort_collateral = nan
nc%lmort_infra = nan

Expand Down Expand Up @@ -452,7 +452,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%bmort = currentCohort%bmort
nc%frmort = currentCohort%frmort
nc%dmort = currentCohort%dmort
nc%lmort_logging = currentCohort%lmort_logging
nc%lmort_direct = currentCohort%lmort_direct
nc%lmort_collateral = currentCohort%lmort_collateral
nc%lmort_infra = currentCohort%lmort_infra

Expand All @@ -477,7 +477,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%bmort = currentCohort%bmort
nc%frmort = currentCohort%frmort
nc%dmort = currentCohort%dmort
nc%lmort_logging = currentCohort%lmort_logging
nc%lmort_direct = currentCohort%lmort_direct
nc%lmort_collateral = currentCohort%lmort_collateral
nc%lmort_infra = currentCohort%lmort_infra

Expand All @@ -504,7 +504,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%bmort = currentCohort%bmort
nc%frmort = currentCohort%frmort
nc%dmort = currentCohort%dmort
nc%lmort_logging = currentCohort%lmort_logging
nc%lmort_direct = currentCohort%lmort_direct
nc%lmort_collateral = currentCohort%lmort_collateral
nc%lmort_infra = currentCohort%lmort_infra

Expand All @@ -519,7 +519,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%n = 0.0_r8

! Reduce counts in the existing/donor patch according to the logging rate
currentCohort%n = currentCohort%n * (1.0_r8 - min(1.0_r8,(currentCohort%lmort_logging + &
currentCohort%n = currentCohort%n * (1.0_r8 - min(1.0_r8,(currentCohort%lmort_direct + &
currentCohort%lmort_collateral + &
currentCohort%lmort_infra)))

Expand All @@ -529,7 +529,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%bmort = nan
nc%frmort = nan
nc%fmort = nan
nc%lmort_logging = nan
nc%lmort_direct = nan
nc%lmort_collateral = nan
nc%lmort_infra = nan

Expand All @@ -553,30 +553,29 @@ subroutine spawn_patches( currentSite, bc_in)
! the number density.
currentSite%imort_rate(currentCohort%size_class, currentCohort%pft) = &
currentSite%imort_rate(currentCohort%size_class, currentCohort%pft) + &
nc%n * ED_val_understorey_death / hlm_freq_day
nc%n * logging_coll_under_frac / hlm_freq_day
currentSite%imort_carbonflux = currentSite%imort_carbonflux + &
(nc%n * ED_val_understorey_death / hlm_freq_day ) * &
(nc%n * logging_coll_under_frac/ hlm_freq_day ) * &
currentCohort%b * g_per_kg * days_per_sec * years_per_day * ha_per_m2

! Step 2: Apply survivor ship function based on the understory death fraction

! remaining of understory plants of those that are knocked over by the overstorey trees dying...
! CURRENTLY ASSUMING THAT LOGGING SURVIVORSHIP OF UNDERSTORY PLANTS IS SAME AS NATURAL
! TREEFALL (STILL BEING DISCUSSED)
nc%n = nc%n * (1.0_r8 - ED_val_understorey_death)
! LOGGING SURVIVORSHIP OF UNDERSTORY PLANTS IS SET AS A NEW PARAMETER in the fatesparameter files
nc%n = nc%n * (1.0_r8 - logging_coll_under_frac)

! Step 3: Reduce the number count of cohorts in the original/donor/non-disturbed patch
! to reflect the area change
currentCohort%n = currentCohort%n * (1._r8 - patch_site_areadis/currentPatch%area)


nc%fmort = 0.0_r8
nc%fmort = 0.0_r8
nc%cmort = currentCohort%cmort
nc%hmort = currentCohort%hmort
nc%bmort = currentCohort%bmort
nc%frmort = currentCohort%frmort
nc%dmort = currentCohort%dmort
nc%lmort_logging = currentCohort%lmort_logging
nc%lmort_direct = currentCohort%lmort_direct
nc%lmort_collateral = currentCohort%lmort_collateral
nc%lmort_infra = currentCohort%lmort_infra

Expand All @@ -596,7 +595,7 @@ subroutine spawn_patches( currentSite, bc_in)
nc%bmort = currentCohort%bmort
nc%frmort = currentCohort%frmort
nc%dmort = currentCohort%dmort
nc%lmort_logging = currentCohort%lmort_logging
nc%lmort_direct = currentCohort%lmort_direct
nc%lmort_collateral = currentCohort%lmort_collateral
nc%lmort_infra = currentCohort%lmort_infra

Expand Down
Loading

0 comments on commit 1ad0701

Please sign in to comment.