Skip to content

Commit

Permalink
Merge pull request ESCOMP#9 from ekluzek/master
Browse files Browse the repository at this point in the history
Merge in sci.1.6.0_api.3.0.0 from NGEET
  • Loading branch information
ekluzek authored Apr 11, 2018
2 parents 6baebdc + 00242d5 commit f082bf6
Show file tree
Hide file tree
Showing 12 changed files with 282 additions and 221 deletions.
18 changes: 10 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 @@ -883,10 +883,11 @@ subroutine fuse_cohorts(patchptr, bc_in)
currentCohort%hmort = (currentCohort%n*currentCohort%hmort + nextc%n*nextc%hmort)/newn
currentCohort%bmort = (currentCohort%n*currentCohort%bmort + nextc%n*nextc%bmort)/newn
currentCohort%fmort = (currentCohort%n*currentCohort%fmort + nextc%n*nextc%fmort)/newn
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 @@ -1259,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 @@ -1274,9 +1275,10 @@ subroutine copy_cohort( currentCohort,copyc )
n%bmort = o%bmort
n%fmort = o%fmort
n%hmort = o%hmort
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
39 changes: 31 additions & 8 deletions biogeochem/EDMortalityFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module EDMortalityFunctionsMod
use FatesAllometryMod, only : bleaf
use EDParamsMod , only : ED_val_stress_mort
use FatesInterfaceMod, only : hlm_use_ed_prescribed_phys
use FatesInterfaceMod, only : bc_in_type

implicit none
private
Expand All @@ -29,27 +30,35 @@ module EDMortalityFunctionsMod



subroutine mortality_rates( cohort_in,cmort,hmort,bmort )
subroutine mortality_rates( cohort_in,bc_in,cmort,hmort,bmort,frmort )

! ============================================================================
! Calculate mortality rates as a function of carbon storage
! Calculate mortality rates from carbon storage, hydraulic cavitation,
! background and freezing
! ============================================================================


use FatesConstantsMod, only : tfrz => t_water_freeze_k_1atm


type (ed_cohort_type), intent(in) :: cohort_in
type (ed_cohort_type), intent(in) :: cohort_in
type (bc_in_type), intent(in) :: bc_in
real(r8),intent(out) :: bmort ! background mortality : Fraction per year
real(r8),intent(out) :: cmort ! carbon starvation mortality
real(r8),intent(out) :: hmort ! hydraulic failure mortality
real(r8),intent(out) :: frmort ! freezing stress mortality

real(r8) :: frac ! relativised stored carbohydrate
real(r8) :: b_leaf ! leaf biomass kgC
real(r8) :: hf_sm_threshold ! hydraulic failure soil moisture threshold

real(r8) :: temp_dep ! Temp. function (freezing mortality)
real(r8) :: temp_in_C ! Daily averaged temperature in Celcius
real(r8),parameter :: frost_mort_scaler = 3.0_r8 ! Scaling factor for freezing mortality
real(r8),parameter :: frost_mort_buffer = 5.0_r8 ! 5deg buffer for freezing mortality

if (hlm_use_ed_prescribed_phys .eq. ifalse) then

! 'Background' mortality (can vary as a function of density as in ED1.0 and ED2.0, but doesn't here for tractability)
! 'Background' mortality (can vary as a function of
! density as in ED1.0 and ED2.0, but doesn't here for tractability)
bmort = EDPftvarcon_inst%bmort(cohort_in%pft)

! Proxy for hydraulic failure induced mortality.
Expand All @@ -76,6 +85,19 @@ subroutine mortality_rates( cohort_in,cmort,hmort,bmort )
cohort_in%dbh,cohort_in%pft,cohort_in%n,cohort_in%canopy_layer
endif


! Mortality due to cold and freezing stress (frmort), based on ED2 and:
! Albani, M.; D. Medvigy; G. C. Hurtt; P. R. Moorcroft, 2006: The contributions
! of land-use change, CO2 fertilization, and climate variability to the
! Eastern US carbon sink. Glob. Change Biol., 12, 2370-2390,
! doi: 10.1111/j.1365-2486.2006.01254.x

temp_in_C = bc_in%t_veg24_si - tfrz
temp_dep = max(0.0,min(1.0,1.0 - (temp_in_C - &
EDPftvarcon_inst%freezetol(cohort_in%pft))/frost_mort_buffer) )
frmort = frost_mort_scaler * temp_dep


!mortality_rates = bmort + hmort + cmort

else ! i.e. hlm_use_ed_prescribed_phys is true
Expand All @@ -84,8 +106,9 @@ subroutine mortality_rates( cohort_in,cmort,hmort,bmort )
else
bmort = EDPftvarcon_inst%prescribed_mortality_understory(cohort_in%pft)
endif
cmort = 0._r8
hmort = 0._r8
cmort = 0._r8
hmort = 0._r8
frmort = 0._r8
endif

end subroutine mortality_rates
Expand Down
Loading

0 comments on commit f082bf6

Please sign in to comment.