@@ -17,6 +17,7 @@ module EDPatchDynamicsMod
1717 use EDTypesMod , only : dtype_ifall
1818 use EDTypesMod , only : dtype_ilog
1919 use EDTypesMod , only : dtype_ifire
20+ use EDTypesMod , only : ican_upper
2021 use FatesInterfaceMod , only : hlm_use_planthydro
2122 use FatesInterfaceMod , only : hlm_numSWb
2223 use FatesInterfaceMod , only : bc_in_type
@@ -139,7 +140,6 @@ subroutine disturbance_rates( site_in, bc_in)
139140 currentCohort% bmort = bmort
140141 currentCohort% hmort = hmort
141142 currentCohort% frmort = frmort
142- currentCohort% fmort = 0.0_r8 ! Fire mortality is initialized as zero, but may be changed
143143
144144 call LoggingMortality_frac(currentCohort% pft, currentCohort% dbh, &
145145 lmort_direct,lmort_collateral,lmort_infra )
@@ -216,7 +216,6 @@ subroutine disturbance_rates( site_in, bc_in)
216216 currentCohort = > currentPatch% shortest
217217 do while (associated (currentCohort))
218218 if (currentCohort% canopy_layer == 1 )then
219- currentCohort% fmort = 0.0_r8
220219 currentCohort% cmort = currentCohort% cmort* (1.0_r8 - fates_mortality_disturbance_fraction)
221220 currentCohort% hmort = currentCohort% hmort* (1.0_r8 - fates_mortality_disturbance_fraction)
222221 currentCohort% bmort = currentCohort% bmort* (1.0_r8 - fates_mortality_disturbance_fraction)
@@ -267,7 +266,6 @@ subroutine disturbance_rates( site_in, bc_in)
267266 currentCohort% lmort_direct = 0.0_r8
268267 currentCohort% lmort_collateral = 0.0_r8
269268 currentCohort% lmort_infra = 0.0_r8
270- currentCohort% fmort = 0.0_r8
271269 end if
272270 currentCohort = > currentCohort% taller
273271 enddo ! currentCohort
@@ -323,13 +321,15 @@ subroutine spawn_patches( currentSite, bc_in)
323321 real (r8 ) :: leaf_litter_local(maxpft) ! initial value of leaf litter. KgC/m2
324322 real (r8 ) :: cwd_ag_local(ncwd) ! initial value of above ground coarse woody debris. KgC/m2
325323 real (r8 ) :: cwd_bg_local(ncwd) ! initial value of below ground coarse woody debris. KgC/m2
324+ integer :: levcan ! canopy level
326325 real (r8 ) :: leaf_c ! leaf carbon [kg]
327- real (r8 ) :: fnrt_c ! fineroot carbon [kg]
328- real (r8 ) :: sapw_c ! sapwood carbon [kg]
329- real (r8 ) :: store_c ! storage carbon [kg]
330- real (r8 ) :: struct_c ! structure carbon [kg]
331- real (r8 ) :: total_c ! total carbon of plant [kg]
326+ real (r8 ) :: fnrt_c ! fineroot carbon [kg]
327+ real (r8 ) :: sapw_c ! sapwood carbon [kg]
328+ real (r8 ) :: store_c ! storage carbon [kg]
329+ real (r8 ) :: struct_c ! structure carbon [kg]
330+ real (r8 ) :: total_c ! total carbon of plant [kg]
332331
332+ !- --------------------------------------------------------------------
333333
334334 storesmallcohort = > null () ! storage of the smallest cohort for insertion routine
335335 storebigcohort = > null () ! storage of the largest cohort for insertion routine
@@ -449,7 +449,6 @@ subroutine spawn_patches( currentSite, bc_in)
449449 nc% cmort = nan ! The mortality diagnostics are set to nan because the cohort should dissappear
450450 nc% hmort = nan
451451 nc% bmort = nan
452- nc% fmort = nan
453452 nc% frmort = nan
454453 nc% lmort_direct = nan
455454 nc% lmort_collateral = nan
@@ -492,7 +491,6 @@ subroutine spawn_patches( currentSite, bc_in)
492491 ! number density in EDCLMLink, and the number density of this new patch is donated
493492 ! so with the number density must come the effective mortality rates.
494493
495- nc% fmort = 0.0_r8 ! Should had also been zero in the donor
496494 nc% cmort = currentCohort% cmort
497495 nc% hmort = currentCohort% hmort
498496 nc% bmort = currentCohort% bmort
@@ -517,7 +515,6 @@ subroutine spawn_patches( currentSite, bc_in)
517515 ! Those remaining in the existing
518516 currentCohort% n = currentCohort% n * (1._r8 - patch_site_areadis/ currentPatch% area)
519517
520- nc% fmort = 0.0_r8
521518 nc% cmort = currentCohort% cmort
522519 nc% hmort = currentCohort% hmort
523520 nc% bmort = currentCohort% bmort
@@ -540,11 +537,40 @@ subroutine spawn_patches( currentSite, bc_in)
540537 ! loss of individuals from source patch due to area shrinking
541538 currentCohort% n = currentCohort% n * (1._r8 - patch_site_areadis/ currentPatch% area)
542539
540+ levcan = currentCohort% canopy_layer
541+
542+ if (levcan== ican_upper) then
543+
544+ ! before changing number densities, track total rate of trees that died
545+ ! due to fire, as well as from each fire mortality term
546+ currentSite% fmort_rate_canopy(currentCohort% size_class, currentCohort% pft) = &
547+ currentSite% fmort_rate_canopy(currentCohort% size_class, currentCohort% pft) + &
548+ nc% n * currentCohort% fire_mort / hlm_freq_day
549+
550+ currentSite% fmort_carbonflux_canopy = currentSite% fmort_carbonflux_canopy + &
551+ (nc% n * currentCohort% fire_mort) * &
552+ total_c * g_per_kg * days_per_sec * ha_per_m2
553+
554+ else
555+ currentSite% fmort_rate_ustory(currentCohort% size_class, currentCohort% pft) = &
556+ currentSite% fmort_rate_ustory(currentCohort% size_class, currentCohort% pft) + &
557+ nc% n * currentCohort% fire_mort / hlm_freq_day
558+
559+ currentSite% fmort_carbonflux_ustory = currentSite% fmort_carbonflux_ustory + &
560+ (nc% n * currentCohort% fire_mort) * &
561+ total_c * g_per_kg * days_per_sec * ha_per_m2
562+ end if
563+
564+ currentSite% fmort_rate_cambial(currentCohort% size_class, currentCohort% pft) = &
565+ currentSite% fmort_rate_cambial(currentCohort% size_class, currentCohort% pft) + &
566+ nc% n * currentCohort% cambial_mort / hlm_freq_day
567+ currentSite% fmort_rate_crown(currentCohort% size_class, currentCohort% pft) = &
568+ currentSite% fmort_rate_crown(currentCohort% size_class, currentCohort% pft) + &
569+ nc% n * currentCohort% crownfire_mort / hlm_freq_day
570+
543571 ! loss of individual from fire in new patch.
544572 nc% n = nc% n * (1.0_r8 - currentCohort% fire_mort)
545573
546- nc% fmort = currentCohort% fire_mort/ hlm_freq_day
547-
548574 nc% cmort = currentCohort% cmort
549575 nc% hmort = currentCohort% hmort
550576 nc% bmort = currentCohort% bmort
@@ -553,7 +579,8 @@ subroutine spawn_patches( currentSite, bc_in)
553579 nc% lmort_direct = currentCohort% lmort_direct
554580 nc% lmort_collateral = currentCohort% lmort_collateral
555581 nc% lmort_infra = currentCohort% lmort_infra
556-
582+
583+
557584 ! Logging is the dominant disturbance
558585 elseif (currentPatch% disturbance_rates(dtype_ilog) > currentPatch% disturbance_rates(dtype_ifall) .and. &
559586 currentPatch% disturbance_rates(dtype_ilog) > currentPatch% disturbance_rates(dtype_ifire)) then ! Logging
@@ -574,7 +601,6 @@ subroutine spawn_patches( currentSite, bc_in)
574601 nc% hmort = nan
575602 nc% bmort = nan
576603 nc% frmort = nan
577- nc% fmort = nan
578604 nc% lmort_direct = nan
579605 nc% lmort_collateral = nan
580606 nc% lmort_infra = nan
@@ -616,7 +642,6 @@ subroutine spawn_patches( currentSite, bc_in)
616642 currentCohort% n = currentCohort% n * (1._r8 - patch_site_areadis/ currentPatch% area)
617643
618644
619- nc% fmort = 0.0_r8
620645 nc% cmort = currentCohort% cmort
621646 nc% hmort = currentCohort% hmort
622647 nc% bmort = currentCohort% bmort
@@ -636,7 +661,6 @@ subroutine spawn_patches( currentSite, bc_in)
636661 currentCohort% n = currentCohort% n * (1._r8 - patch_site_areadis/ currentPatch% area)
637662
638663 ! No grass impact mortality imposed on the newly created patch
639- nc% fmort = 0.0_r8
640664 nc% cmort = currentCohort% cmort
641665 nc% hmort = currentCohort% hmort
642666 nc% bmort = currentCohort% bmort
0 commit comments