Skip to content

Commit c48bf41

Browse files
committed
Conflict resolution with master, resolving kmax_rsurf, q10 and export fractions.
2 parents 363aaff + 552e9de commit c48bf41

11 files changed

+411
-272
lines changed

biogeochem/EDLoggingMortalityMod.F90

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ module EDLoggingMortalityMod
5959

6060
character(len=*), parameter, private :: sourcefile = &
6161
__FILE__
62+
63+
64+
real(r8), public, parameter :: logging_export_frac = 0.8_r8
6265

6366
public :: LoggingMortality_frac
6467
public :: logging_litter_fluxes
@@ -170,6 +173,8 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
170173
real(r8), parameter :: adjustment = 1.0 ! adjustment for mortality rates
171174

172175
if (logging_time) then
176+
177+
173178
if(EDPftvarcon_inst%woody(pft_i) == 1)then ! only set logging rates for trees
174179

175180
! Pass logging rates to cohort level
@@ -192,8 +197,14 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
192197

193198
! Collateral damage to smaller plants below the canopy layer
194199
! will be applied via "understory_death" via the disturbance algorithm
200+
! Important: Degredation rates really only have an impact when
201+
! applied to the canopy layer. So we don't add to degredation
202+
! for collateral damage, even understory collateral damage.
203+
195204
if (canopy_layer .eq. 1) then
196205
lmort_collateral = logging_collateral_frac * adjustment
206+
else
207+
lmort_collateral = 0._r8
197208
endif
198209

199210
else
@@ -202,6 +213,7 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
202213
lmort_infra = 0.0_r8
203214
l_degrad = 0.0_r8
204215
end if
216+
205217
else
206218
lmort_direct = 0.0_r8
207219
lmort_collateral = 0.0_r8
@@ -309,10 +321,19 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
309321
(currentCohort%lmort_collateral + currentCohort%lmort_infra)
310322

311323
else
324+
325+
! This routine is only called during disturbance. The litter
326+
! fluxes from non-disturbance generating mortality are
327+
! handled in EDPhysiology. Disturbance generating mortality
328+
! are those cohorts in the top canopy layer, or those
329+
! plants that were impacted. Thus, no direct dead can occur
330+
! here, and indirect are impacts.
331+
312332
if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
313333
direct_dead = 0.0_r8
314-
indirect_dead = logging_coll_under_frac * currentCohort%n * &
315-
(patch_site_areadis/currentPatch%area) !kgC/site/day
334+
indirect_dead = logging_coll_under_frac * &
335+
(1._r8-currentPatch%fract_ldist_not_harvested) * currentCohort%n * &
336+
(patch_site_areadis/currentPatch%area) !kgC/site/day
316337
else
317338
! If the cohort of interest is grass, it will not experience
318339
! any mortality associated with the logging disturbance

biogeochem/EDMortalityFunctionsMod.F90

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,18 @@ subroutine Mortality_Derivative( currentSite, currentCohort, bc_in)
200200
currentCohort%lmort_infra, &
201201
currentCohort%l_degrad)
202202

203+
204+
205+
203206
if (currentCohort%canopy_layer > 1)then
204-
205207
! Include understory logging mortality rates not associated with disturbance
206208
dndt_logging = (currentCohort%lmort_direct + &
207209
currentCohort%lmort_collateral + &
208210
currentCohort%lmort_infra)/hlm_freq_day
209-
210211
currentCohort%dndt = -1.0_r8 * (cmort+hmort+bmort+frmort+dndt_logging) * currentCohort%n
211212
else
213+
! Mortality from logging in the canopy is ONLY disturbance generating, don't
214+
! update number densities via non-disturbance inducing death
212215
currentCohort%dndt = -(1.0_r8 - fates_mortality_disturbance_fraction) &
213216
* (cmort+hmort+bmort+frmort) * currentCohort%n
214217
endif

biogeochem/EDPatchDynamicsMod.F90

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module EDPatchDynamicsMod
2020
use EDTypesMod , only : dtype_ilog
2121
use EDTypesMod , only : dtype_ifire
2222
use EDTypesMod , only : ican_upper
23+
use EDTypesMod , only : lg_sf
2324
use FatesInterfaceMod , only : hlm_use_planthydro
2425
use FatesInterfaceMod , only : hlm_numSWb
2526
use FatesInterfaceMod , only : bc_in_type
@@ -151,7 +152,7 @@ subroutine disturbance_rates( site_in, bc_in)
151152
call LoggingMortality_frac(currentCohort%pft, currentCohort%dbh, currentCohort%canopy_layer, &
152153
lmort_direct,lmort_collateral,lmort_infra,l_degrad )
153154

154-
currentCohort%lmort_direct = lmort_direct
155+
currentCohort%lmort_direct = lmort_direct
155156
currentCohort%lmort_collateral = lmort_collateral
156157
currentCohort%lmort_infra = lmort_infra
157158
currentCohort%l_degrad = l_degrad
@@ -186,7 +187,7 @@ subroutine disturbance_rates( site_in, bc_in)
186187

187188
! Logging Disturbance Rate
188189
currentPatch%disturbance_rates(dtype_ilog) = currentPatch%disturbance_rates(dtype_ilog) + &
189-
min(1.0_r8, currentCohort%lmort_direct + &
190+
min(1.0_r8, currentCohort%lmort_direct + &
190191
currentCohort%lmort_collateral + &
191192
currentCohort%lmort_infra + &
192193
currentCohort%l_degrad ) * &
@@ -226,7 +227,7 @@ subroutine disturbance_rates( site_in, bc_in)
226227
! to still diagnose and track the non-disturbance rate
227228
! ------------------------------------------------------------------------------------------
228229

229-
230+
! DISTURBANCE IS LOGGING
230231
if (currentPatch%disturbance_rates(dtype_ilog) > currentPatch%disturbance_rates(dtype_ifall) .and. &
231232
currentPatch%disturbance_rates(dtype_ilog) > currentPatch%disturbance_rates(dtype_ifire) ) then
232233

@@ -245,7 +246,7 @@ subroutine disturbance_rates( site_in, bc_in)
245246
currentCohort => currentCohort%taller
246247
enddo !currentCohort
247248

248-
! DISTURBANCE IS FIRE
249+
! DISTURBANCE IS FIRE
249250
elseif (currentPatch%disturbance_rates(dtype_ifire) > currentPatch%disturbance_rates(dtype_ifall) .and. &
250251
currentPatch%disturbance_rates(dtype_ifire) > currentPatch%disturbance_rates(dtype_ilog) ) then
251252

@@ -275,7 +276,7 @@ subroutine disturbance_rates( site_in, bc_in)
275276
currentCohort => currentCohort%taller
276277
enddo !currentCohort
277278

278-
else ! If fire and loggin are not greater than treefall, just set disturbance rate to tree-fall
279+
else ! If fire and logging are not greater than treefall, just set disturbance rate to tree-fall
279280
! which is most likely a 0.0
280281

281282
currentPatch%disturbance_rate = currentPatch%disturbance_rates(dtype_ifall)
@@ -477,6 +478,8 @@ subroutine spawn_patches( currentSite, bc_in)
477478

478479
call logging_litter_fluxes(currentSite, currentPatch, new_patch, patch_site_areadis)
479480

481+
if(debug) write(fates_log(),*) "Logging disturbance generated:",patch_site_areadis
482+
480483
elseif ((currentPatch%disturbance_rates(dtype_ifire) > &
481484
currentPatch%disturbance_rates(dtype_ifall)) .and. &
482485
(currentPatch%disturbance_rates(dtype_ifire) > &
@@ -681,7 +684,7 @@ subroutine spawn_patches( currentSite, bc_in)
681684
nc%lmort_infra = currentCohort%lmort_infra
682685

683686

684-
! Logging is the dominant disturbance
687+
! Logging is the dominant disturbance
685688
elseif ((currentPatch%disturbance_rates(dtype_ilog) > &
686689
currentPatch%disturbance_rates(dtype_ifall)) .and. &
687690
(currentPatch%disturbance_rates(dtype_ilog) > &
@@ -756,7 +759,7 @@ subroutine spawn_patches( currentSite, bc_in)
756759
! LOGGING SURVIVORSHIP OF UNDERSTORY PLANTS IS SET AS A NEW PARAMETER
757760
! in the fatesparameter files
758761
nc%n = nc%n * (1.0_r8 - &
759-
currentPatch%fract_ldist_not_harvested * logging_coll_under_frac)
762+
(1.0_r8-currentPatch%fract_ldist_not_harvested) * logging_coll_under_frac)
760763

761764
! Step 3: Reduce the number count of cohorts in the
762765
! original/donor/non-disturbed patch to reflect the area change
@@ -1085,7 +1088,7 @@ subroutine fire_litter_fluxes(currentSite, cp_target, new_patch_target, patch_si
10851088
!************************************/
10861089
do c = 1,ncwd
10871090
burned_litter = new_patch%cwd_ag(c) * patch_site_areadis/new_patch%area * &
1088-
currentPatch%burnt_frac_litter(c+1) !kG/m2/day
1091+
currentPatch%burnt_frac_litter(c) !kG/m2/day
10891092
new_patch%cwd_ag(c) = new_patch%cwd_ag(c) - burned_litter
10901093
currentSite%flux_out = currentSite%flux_out + burned_litter * new_patch%area !kG/site/day
10911094
currentSite%total_burn_flux_to_atm = currentSite%total_burn_flux_to_atm + &
@@ -1240,7 +1243,7 @@ subroutine fire_litter_fluxes(currentSite, cp_target, new_patch_target, patch_si
12401243
if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
12411244
burned_leaves = leaf_c * currentCohort%fraction_crown_burned
12421245
else
1243-
burned_leaves = leaf_c * currentPatch%burnt_frac_litter(6)
1246+
burned_leaves = leaf_c * currentPatch%burnt_frac_litter(lg_sf)
12441247
endif
12451248

12461249
if (burned_leaves > 0.0_r8) then

0 commit comments

Comments
 (0)