Skip to content

Commit

Permalink
Merge pull request ESCOMP#546 from huangmy/fix_export_frac
Browse files Browse the repository at this point in the history
fix the direct-logging caused changes in trunk product, CWD, and litt…
  • Loading branch information
glemieux authored Jul 12, 2019
2 parents 39d0635 + 84e9eaa commit 28052bd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 19 deletions.
38 changes: 27 additions & 11 deletions biogeochem/EDLoggingMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ module EDLoggingMortalityMod
__FILE__


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

public :: LoggingMortality_frac
public :: logging_litter_fluxes
public :: logging_time
Expand Down Expand Up @@ -249,15 +247,17 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
! the mortality rates governing the fluxes, follow a different rule set.
! We also compute an export flux (product) that does not go to litter.
!
! Trunk Product Flux: Only usable wood is exported from a site. This is the above-ground
! portion of the bole, and only boles associated with direct-logging,
! not inftrastructure or collateral damage mortality.
! Trunk Product Flux: Only usable wood is exported from a site, substracted by a
! transportation loss fraction. This is the above-ground portion of the bole,
! and only boles associated with direct-logging, not inftrastructure or
! collateral damage mortality.
!
! -------------------------------------------------------------------------------------------


!USES:
use SFParamsMod, only : SF_val_cwd_frac
use EDParamsMod, only : logging_export_frac
use EDtypesMod, only : area
use EDtypesMod, only : ed_site_type
use EDtypesMod, only : ed_patch_type
Expand Down Expand Up @@ -432,17 +432,33 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site

! ----------------------------------------------------------------------------------------
! Handle harvest (export, flux-out) flux for the above ground boles
! In this case the boles from direct logging are exported off-site and are not added
! to the litter pools. That is why we handle this outside the loop above. Only the
! collateral damange and infrastructure logging is applied to litter
! In this case a fraction (export_frac) of the boles from direct logging are
! exported off-site, while the remainder (1-export_frac) is added to the litter pools.
!
! Losses to the system as a whole, for C-balancing (kGC/site/day)
! Site level product, (kgC/site, accumulated over simulation)
! ----------------------------------------------------------------------------------------

trunk_product_site = trunk_product_site + &
SF_val_CWD_frac(ncwd) * agb_frac * direct_dead * (struct_c + sapw_c)

! CWD contributed by logged boles due to losses in transportation
newPatch%cwd_ag(ncwd) = newPatch%cwd_ag(ncwd) + agb_frac * &
(1.0_r8-logging_export_frac) * cwd_litter_density * np_mult
currentPatch%cwd_ag(ncwd) = currentPatch%cwd_ag(ncwd) + &
(1.0_r8 - logging_export_frac) * agb_frac * cwd_litter_density

currentSite%CWD_AG_diagnostic_input_carbonflux(ncwd) = &
currentSite%CWD_AG_diagnostic_input_carbonflux(ncwd) + &
(1.0_r8-logging_export_frac) * SF_val_CWD_frac(ncwd) * &
woody_litter * hlm_days_per_year * agb_frac/ AREA

delta_litter_stock = delta_litter_stock + (1.0_r8-logging_export_frac) *&
woody_litter * SF_val_CWD_frac(ncwd)

! Send export_frac * AGB component of boles from direct-logging activities to
! export/harvest pool
! Generate trunk product (kgC/day/site)
trunk_product_site = trunk_product_site + &
logging_export_frac * SF_val_CWD_frac(ncwd) * agb_frac * &
direct_dead * (struct_c + sapw_c)

! ----------------------------------------------------------------------------------------
! Handle fluxes of leaf, root and storage carbon into litter pools.
Expand Down
19 changes: 11 additions & 8 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1331,33 +1331,36 @@ subroutine CWD_Input( currentSite, currentPatch)
currentPatch%cwd_BG_in(c) = currentPatch%cwd_BG_in(c) + (struct_c + sapw_c) * &
SF_val_CWD_frac(c) * dead_n * (1.0_r8-EDPftvarcon_inst%allom_agb_frac(currentCohort%pft))

! Send AGB component of boles from non direct-logging activities to AGB litter pool
! Send AGB component of boles from logging activities into the litter.
! This includes fluxes from indirect modes of death, as well as the
! non-exported boles due to direct harvesting.
if (c==ncwd) then

! CWD contributed by indirect damage
currentPatch%cwd_AG_in(c) = currentPatch%cwd_AG_in(c) + (struct_c + sapw_c) * &
SF_val_CWD_frac(c) * (dead_n_natural+ dead_n_ilogging) * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)
! CWD contributed by logged boles due to losses in transportation

! CWD contributed by directly logged boles due to losses in transportation
currentPatch%cwd_AG_in(c) = currentPatch%cwd_AG_in(c) + &
(1.0_r8 - logging_export_frac) * (struct_c + sapw_c) * SF_val_CWD_frac(c) * &
dead_n_dlogging * EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)
(1.0_r8 - logging_export_frac) * (struct_c + sapw_c) * &
SF_val_CWD_frac(c) * dead_n_dlogging * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)

! Send AGB component of boles from direct-logging activities to
! export/harvest pool
! Generate trunk product (kgC/day/site)
trunk_product = logging_export_frac * (struct_c + sapw_c) * &
SF_val_CWD_frac(c) * dead_n_dlogging * EDPftvarcon_inst%allom_agb_frac(currentCohort%pft) * &
SF_val_CWD_frac(c) * dead_n_dlogging * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft) * &
hlm_freq_day * currentPatch%area

currentSite%flux_out = currentSite%flux_out + trunk_product

! Update diagnostics that track resource management
currentSite%resources_management%trunk_product_site = &
currentSite%resources_management%trunk_product_site + &
trunk_product

trunk_product
else

currentPatch%cwd_AG_in(c) = currentPatch%cwd_AG_in(c) + (struct_c + sapw_c) * &
Expand Down

0 comments on commit 28052bd

Please sign in to comment.