Skip to content

Commit be04146

Browse files
authored
Merge pull request #4 from rgknox/fire_mortality
fire mortality -- restart diagnostics
2 parents 5c77081 + 3df34c2 commit be04146

File tree

6 files changed

+367
-79
lines changed

6 files changed

+367
-79
lines changed

biogeochem/EDCohortDynamicsMod.F90

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module EDCohortDynamicsMod
2121
use EDTypesMod , only : min_npm2, min_nppatch
2222
use EDTypesMod , only : min_n_safemath
2323
use EDTypesMod , only : nlevleaf
24+
use EDTypesMod , only : ican_upper
2425
use FatesInterfaceMod , only : hlm_use_planthydro
2526
use FatesInterfaceMod , only : hlm_parteh_mode
2627
use FatesPlantHydraulicsMod, only : FuseCohortHydraulics
@@ -606,12 +607,19 @@ subroutine terminate_cohorts( currentSite, currentPatch, level )
606607
! preserve a record of the to-be-terminated cohort for mortality accounting
607608
levcan = currentCohort%canopy_layer
608609

609-
currentSite%terminated_nindivs(currentCohort%size_class,currentCohort%pft,levcan) = &
610-
currentSite%terminated_nindivs(currentCohort%size_class,currentCohort%pft,levcan) + currentCohort%n
611-
!
612-
currentSite%termination_carbonflux(levcan) = currentSite%termination_carbonflux(levcan) + &
613-
currentCohort%n * (struct_c+sapw_c+leaf_c+fnrt_c+store_c+repro_c)
614-
610+
if(levcan==ican_upper) then
611+
currentSite%term_nindivs_canopy(currentCohort%size_class,currentCohort%pft) = &
612+
currentSite%term_nindivs_canopy(currentCohort%size_class,currentCohort%pft) + currentCohort%n
613+
614+
currentSite%term_carbonflux_canopy = currentSite%term_carbonflux_canopy + &
615+
currentCohort%n * (struct_c+sapw_c+leaf_c+fnrt_c+store_c+repro_c)
616+
else
617+
currentSite%term_nindivs_ustory(currentCohort%size_class,currentCohort%pft) = &
618+
currentSite%term_nindivs_ustory(currentCohort%size_class,currentCohort%pft) + currentCohort%n
619+
620+
currentSite%term_carbonflux_ustory = currentSite%term_carbonflux_ustory + &
621+
currentCohort%n * (struct_c+sapw_c+leaf_c+fnrt_c+store_c+repro_c)
622+
end if
615623

616624
!put the litter from the terminated cohorts straight into the fragmenting pools
617625
if (currentCohort%n.gt.0.0_r8) then

biogeochem/EDPatchDynamicsMod.F90

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -538,20 +539,35 @@ subroutine spawn_patches( currentSite, bc_in)
538539

539540
levcan = currentCohort%canopy_layer
540541

541-
! before changing number densities, track total rate of trees that died due to fire, as well as from each fire mortality term
542-
currentSite%fmort_rate(currentCohort%size_class, currentCohort%pft, levcan) = &
543-
currentSite%fmort_rate(currentCohort%size_class, currentCohort%pft, levcan) + &
544-
nc%n * currentCohort%fire_mort / hlm_freq_day
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+
545564
currentSite%fmort_rate_cambial(currentCohort%size_class, currentCohort%pft) = &
546565
currentSite%fmort_rate_cambial(currentCohort%size_class, currentCohort%pft) + &
547566
nc%n * currentCohort%cambial_mort / hlm_freq_day
548567
currentSite%fmort_rate_crown(currentCohort%size_class, currentCohort%pft) = &
549568
currentSite%fmort_rate_crown(currentCohort%size_class, currentCohort%pft) + &
550569
nc%n * currentCohort%crownfire_mort / hlm_freq_day
551-
currentSite%fmort_carbonflux(levcan) = currentSite%fmort_carbonflux(levcan) + &
552-
(nc%n * currentCohort%fire_mort) * &
553-
total_c * g_per_kg * days_per_sec * ha_per_m2
554-
570+
555571
! loss of individual from fire in new patch.
556572
nc%n = nc%n * (1.0_r8 - currentCohort%fire_mort)
557573

main/EDInitMod.F90

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ subroutine init_site_vars( site_in )
7070
! !LOCAL VARIABLES:
7171
!----------------------------------------------------------------------
7272
!
73-
allocate(site_in%terminated_nindivs(1:nlevsclass,1:numpft,1:nclmax))
73+
allocate(site_in%term_nindivs_canopy(1:nlevsclass,1:numpft))
74+
allocate(site_in%term_nindivs_ustory(1:nlevsclass,1:numpft))
7475
allocate(site_in%demotion_rate(1:nlevsclass))
7576
allocate(site_in%promotion_rate(1:nlevsclass))
7677
allocate(site_in%imort_rate(1:nlevsclass,1:numpft))
77-
allocate(site_in%fmort_rate(1:nlevsclass,1:numpft,1:nclmax))
78+
allocate(site_in%fmort_rate_canopy(1:nlevsclass,1:numpft))
79+
allocate(site_in%fmort_rate_ustory(1:nlevsclass,1:numpft))
7880
allocate(site_in%fmort_rate_cambial(1:nlevsclass,1:numpft))
7981
allocate(site_in%fmort_rate_crown(1:nlevsclass,1:numpft))
8082
allocate(site_in%growthflux_fusion(1:nlevsclass,1:numpft))
@@ -127,13 +129,17 @@ subroutine zero_site( site_in )
127129
site_in%fates_to_bgc_last_ts = 0.0_r8
128130

129131
! termination and recruitment info
130-
site_in%terminated_nindivs(:,:,:) = 0._r8
131-
site_in%termination_carbonflux(:) = 0._r8
132+
site_in%term_nindivs_canopy(:,:) = 0._r8
133+
site_in%term_nindivs_ustory(:,:) = 0._r8
134+
site_in%term_carbonflux_canopy = 0._r8
135+
site_in%term_carbonflux_ustory = 0._r8
132136
site_in%recruitment_rate(:) = 0._r8
133137
site_in%imort_rate(:,:) = 0._r8
134138
site_in%imort_carbonflux = 0._r8
135-
site_in%fmort_rate(:,:,:) = 0._r8
136-
site_in%fmort_carbonflux(:) = 0._r8
139+
site_in%fmort_rate_canopy(:,:) = 0._r8
140+
site_in%fmort_rate_ustory(:,:) = 0._r8
141+
site_in%fmort_carbonflux_canopy = 0._r8
142+
site_in%fmort_carbonflux_ustory = 0._r8
137143
site_in%fmort_rate_cambial(:,:) = 0._r8
138144
site_in%fmort_rate_crown(:,:) = 0._r8
139145

main/EDTypesMod.F90

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -605,26 +605,40 @@ module EDTypesMod
605605

606606
! PLANT HYDRAULICS
607607
type(ed_site_hydr_type), pointer :: si_hydr
608-
608+
609+
! DIAGNOSTICS
609610
! TERMINATION, RECRUITMENT, DEMOTION, and DISTURBANCE
610-
611-
real(r8), allocatable :: terminated_nindivs(:,:,:) ! number of individuals that were in cohorts which were terminated this timestep, on size x pft x canopy array.
612-
real(r8) :: termination_carbonflux(nclmax) ! carbon flux from live to dead pools associated with termination mortality, per canopy level
613-
real(r8) :: recruitment_rate(1:maxpft) ! number of individuals that were recruited into new cohorts
614-
real(r8), allocatable :: demotion_rate(:) ! rate of individuals demoted from canopy to understory per FATES timestep
611+
612+
real(r8), allocatable :: term_nindivs_canopy(:,:) ! number of canopy individuals that were in cohorts which
613+
! were terminated this timestep, on size x pft
614+
real(r8), allocatable :: term_nindivs_ustory(:,:) ! number of understory individuals that were in cohorts which
615+
! were terminated this timestep, on size x pft
616+
real(r8) :: term_carbonflux_canopy ! carbon flux from live to dead pools associated
617+
! with termination mortality, per canopy level
618+
real(r8) :: term_carbonflux_ustory ! carbon flux from live to dead pools associated
619+
! with termination mortality, per canopy level
620+
621+
real(r8) :: recruitment_rate(1:maxpft) ! number of individuals that were recruited into new cohorts
622+
real(r8), allocatable :: demotion_rate(:) ! rate of individuals demoted from canopy to understory per FATES timestep
615623
real(r8) :: demotion_carbonflux ! biomass of demoted individuals from canopy to understory [kgC/ha/day]
616624
real(r8), allocatable :: promotion_rate(:) ! rate of individuals promoted from understory to canopy per FATES timestep
617625
real(r8) :: promotion_carbonflux ! biomass of promoted individuals from understory to canopy [kgC/ha/day]
618626
real(r8), allocatable :: imort_rate(:,:) ! rate of individuals killed due to impact mortality per year. on size x pft array
619627
real(r8) :: imort_carbonflux ! biomass of individuals killed due to impact mortality per year. [kgC/ha/day]
620628

621-
real(r8), allocatable :: fmort_rate(:,:,:) ! rate of individuals killed due to fire mortality per year. on size x pft x can-layer array
622-
! (1:nlevsclass,1:numpft,1:nclmax)
623-
real(r8) :: fmort_carbonflux(nclmax) ! biomass of individuals killed due to fire mortality per year. [gC/m2/sec]
624-
real(r8), allocatable :: fmort_rate_cambial(:,:) ! rate of individuals killed due to fire mortality from cambial damage per year. on size x pft array
625-
real(r8), allocatable :: fmort_rate_crown(:,:) ! rate of individuals killed due to fire mortality from crown damage per year. on size x pft array
626-
627-
real(r8), allocatable :: growthflux_fusion(:,:) ! rate of individuals moving into a given size class bin due to fusion in a given day. on size x pft array
629+
real(r8), allocatable :: fmort_rate_canopy(:,:) ! rate of canopy individuals killed due to fire mortality per year.
630+
! on size x pft array (1:nlevsclass,1:numpft)
631+
real(r8), allocatable :: fmort_rate_ustory(:,:) ! rate of understory individuals killed due to fire mortality per year.
632+
! on size x pft array (1:nlevsclass,1:numpft)
633+
real(r8) :: fmort_carbonflux_canopy ! biomass of canopy indivs killed due to fire per year. [gC/m2/sec]
634+
real(r8) :: fmort_carbonflux_ustory ! biomass of understory indivs killed due to fire per year [gC/m2/sec]
635+
real(r8), allocatable :: fmort_rate_cambial(:,:) ! rate of individuals killed due to fire mortality
636+
! from cambial damage per year. on size x pft array
637+
real(r8), allocatable :: fmort_rate_crown(:,:) ! rate of individuals killed due to fire mortality
638+
! from crown damage per year. on size x pft array
639+
640+
real(r8), allocatable :: growthflux_fusion(:,:) ! rate of individuals moving into a given size class bin
641+
! due to fusion in a given day. on size x pft array
628642

629643

630644
! some diagnostic-only (i.e. not resolved by ODE solver) flux of carbon to CWD and litter pools from termination and canopy mortality

main/FatesHistoryInterfaceMod.F90

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,24 +2123,27 @@ subroutine update_history_dyn(this,nc,nsites,sites)
21232123
i_scpf = (i_pft-1)*nlevsclass + i_scls
21242124
!
21252125
! termination mortality. sum of canopy and understory indices
2126-
hio_m6_si_scpf(io_si,i_scpf) = sum(sites(s)%terminated_nindivs(i_scls,i_pft,1:nclmax)) * days_per_year
2126+
hio_m6_si_scpf(io_si,i_scpf) = (sites(s)%term_nindivs_canopy(i_scls,i_pft) + &
2127+
sites(s)%term_nindivs_ustory(i_scls,i_pft)) * days_per_year
21272128

21282129
hio_m6_si_scls(io_si,i_scls) = hio_m6_si_scls(io_si,i_scls) + &
2129-
sum(sites(s)%terminated_nindivs(i_scls,i_pft,1:nclmax)) * days_per_year
2130+
(sites(s)%term_nindivs_canopy(i_scls,i_pft) + &
2131+
sites(s)%term_nindivs_ustory(i_scls,i_pft)) * days_per_year
2132+
21302133

21312134
!
21322135
! add termination mortality to canopy and understory mortality
21332136
hio_mortality_canopy_si_scls(io_si,i_scls) = hio_mortality_canopy_si_scls(io_si,i_scls) + &
2134-
sites(s)%terminated_nindivs(i_scls,i_pft,ican_upper) * days_per_year
2137+
sites(s)%term_nindivs_canopy(i_scls,i_pft) * days_per_year
21352138

21362139
hio_mortality_understory_si_scls(io_si,i_scls) = hio_mortality_understory_si_scls(io_si,i_scls) + &
2137-
sum(sites(s)%terminated_nindivs(i_scls,i_pft,ican_upper+1:nclmax)) * days_per_year
2140+
sites(s)%term_nindivs_ustory(i_scls,i_pft) * days_per_year
21382141

21392142
hio_mortality_canopy_si_scpf(io_si,i_scpf) = hio_mortality_canopy_si_scpf(io_si,i_scpf) + &
2140-
sites(s)%terminated_nindivs(i_scls,i_pft,ican_upper) * days_per_year
2143+
sites(s)%term_nindivs_canopy(i_scls,i_pft) * days_per_year
21412144

21422145
hio_mortality_understory_si_scpf(io_si,i_scpf) = hio_mortality_understory_si_scpf(io_si,i_scpf) + &
2143-
sum(sites(s)%terminated_nindivs(i_scls,i_pft,ican_upper+1:nclmax)) * days_per_year
2146+
sites(s)%term_nindivs_ustory(i_scls,i_pft) * days_per_year
21442147

21452148
!
21462149
! imort on its own
@@ -2158,44 +2161,45 @@ subroutine update_history_dyn(this,nc,nsites,sites)
21582161
iscag = i_scls ! since imort is by definition something that only happens in newly disturbed patches, treat as such
21592162
hio_mortality_understory_si_scag(io_si,iscag) = hio_mortality_understory_si_scag(io_si,iscag) + &
21602163
sites(s)%imort_rate(i_scls, i_pft)
2161-
!
21622164

21632165
! fire mortality from the site-level diagnostic rates
2164-
hio_m5_si_scpf(io_si,i_scpf) = sum(sites(s)%fmort_rate(i_scls, i_pft,1:nclmax))
2165-
hio_m5_si_scls(io_si,i_scls) = hio_m5_si_scls(io_si,i_scls) + sum(sites(s)%fmort_rate(i_scls, i_pft,1:nclmax))
2166+
hio_m5_si_scpf(io_si,i_scpf) = sites(s)%fmort_rate_canopy(i_scls, i_pft) + &
2167+
sites(s)%fmort_rate_ustory(i_scls, i_pft)
2168+
hio_m5_si_scls(io_si,i_scls) = hio_m5_si_scls(io_si,i_scls) + &
2169+
sites(s)%fmort_rate_canopy(i_scls, i_pft) + sites(s)%fmort_rate_ustory(i_scls, i_pft)
21662170
!
21672171
hio_crownfiremort_si_scpf(io_si,i_scpf) = sites(s)%fmort_rate_crown(i_scls, i_pft)
21682172
hio_cambialfiremort_si_scpf(io_si,i_scpf) = sites(s)%fmort_rate_cambial(i_scls, i_pft)
21692173
!
21702174
! fire components of overall canopy and understory mortality
21712175
hio_mortality_canopy_si_scpf(io_si,i_scpf) = hio_mortality_canopy_si_scpf(io_si,i_scpf) + &
2172-
sites(s)%fmort_rate(i_scls, i_pft,ican_upper)
2176+
sites(s)%fmort_rate_canopy(i_scls, i_pft)
21732177
hio_mortality_canopy_si_scls(io_si,i_scls) = hio_mortality_canopy_si_scls(io_si,i_scls) + &
2174-
sites(s)%fmort_rate(i_scls, i_pft,ican_upper)
2178+
sites(s)%fmort_rate_canopy(i_scls, i_pft)
21752179

21762180
! the fire mortality rates for each layer are total dead, since the usable
21772181
! output will then normalize by the counts, we are allowed to sum over layers
21782182
hio_mortality_understory_si_scpf(io_si,i_scpf) = hio_mortality_understory_si_scpf(io_si,i_scpf) + &
2179-
sum(sites(s)%fmort_rate(i_scls, i_pft,ican_upper+1:nclmax))
2183+
sites(s)%fmort_rate_ustory(i_scls, i_pft)
21802184

21812185
hio_mortality_understory_si_scls(io_si,i_scls) = hio_mortality_understory_si_scls(io_si,i_scls) + &
2182-
sum(sites(s)%fmort_rate(i_scls, i_pft,ican_upper+1:nclmax))
2186+
sites(s)%fmort_rate_ustory(i_scls, i_pft)
21832187

21842188
!
21852189
! carbon flux associated with mortality of trees dying by fire
21862190
hio_canopy_mortality_carbonflux_si(io_si) = hio_canopy_mortality_carbonflux_si(io_si) + &
2187-
sites(s)%fmort_carbonflux(ican_upper)
2188-
2191+
sites(s)%fmort_carbonflux_canopy
2192+
21892193
hio_understory_mortality_carbonflux_si(io_si) = hio_understory_mortality_carbonflux_si(io_si) + &
2190-
sum(sites(s)%fmort_carbonflux(ican_upper+1:nclmax))
2191-
2194+
sites(s)%fmort_carbonflux_ustory
2195+
21922196
!
21932197
! for scag variables, also treat as happening in the newly-disurbed patch
21942198

21952199
hio_mortality_canopy_si_scag(io_si,iscag) = hio_mortality_canopy_si_scag(io_si,iscag) + &
2196-
sites(s)%fmort_rate(i_scls, i_pft,ican_upper)
2200+
sites(s)%fmort_rate_canopy(i_scls, i_pft)
21972201
hio_mortality_understory_si_scag(io_si,iscag) = hio_mortality_understory_si_scag(io_si,iscag) + &
2198-
sum(sites(s)%fmort_rate(i_scls, i_pft,ican_upper+1:nclmax))
2202+
sites(s)%fmort_rate_ustory(i_scls, i_pft)
21992203

22002204
! while in this loop, pass the fusion-induced growth rate flux to history
22012205
hio_growthflux_fusion_si_scpf(io_si,i_scpf) = hio_growthflux_fusion_si_scpf(io_si,i_scpf) + &
@@ -2208,11 +2212,14 @@ subroutine update_history_dyn(this,nc,nsites,sites)
22082212
hio_understory_mortality_carbonflux_si(io_si) = hio_understory_mortality_carbonflux_si(io_si) + &
22092213
sites(s)%imort_carbonflux
22102214
!
2211-
sites(s)%terminated_nindivs(:,:,:) = 0._r8
2215+
sites(s)%term_nindivs_canopy(:,:) = 0._r8
2216+
sites(s)%term_nindivs_ustory(:,:) = 0._r8
22122217
sites(s)%imort_carbonflux = 0._r8
22132218
sites(s)%imort_rate(:,:) = 0._r8
2214-
sites(s)%fmort_rate(:,:,:) = 0._r8
2215-
sites(s)%fmort_carbonflux(:) = 0._r8
2219+
sites(s)%fmort_rate_canopy(:,:) = 0._r8
2220+
sites(s)%fmort_rate_ustory(:,:) = 0._r8
2221+
sites(s)%fmort_carbonflux_canopy = 0._r8
2222+
sites(s)%fmort_carbonflux_ustory = 0._r8
22162223
sites(s)%fmort_rate_cambial(:,:) = 0._r8
22172224
sites(s)%fmort_rate_crown(:,:) = 0._r8
22182225
sites(s)%growthflux_fusion(:,:) = 0._r8
@@ -2254,13 +2261,14 @@ subroutine update_history_dyn(this,nc,nsites,sites)
22542261
! mortality-associated carbon fluxes
22552262

22562263
hio_canopy_mortality_carbonflux_si(io_si) = hio_canopy_mortality_carbonflux_si(io_si) + &
2257-
sites(s)%termination_carbonflux(ican_upper) * g_per_kg * days_per_sec * ha_per_m2
2258-
2264+
sites(s)%term_carbonflux_canopy * g_per_kg * days_per_sec * ha_per_m2
2265+
22592266
hio_understory_mortality_carbonflux_si(io_si) = hio_understory_mortality_carbonflux_si(io_si) + &
2260-
sum(sites(s)%termination_carbonflux(ican_upper+1:nclmax)) * g_per_kg * days_per_sec * ha_per_m2
2267+
sites(s)%term_carbonflux_ustory * g_per_kg * days_per_sec * ha_per_m2
22612268

22622269
! and zero the site-level termination carbon flux variable
2263-
sites(s)%termination_carbonflux(:) = 0._r8
2270+
sites(s)%term_carbonflux_canopy = 0._r8
2271+
sites(s)%term_carbonflux_ustory = 0._r8
22642272
!
22652273
! add the site-level disturbance-associated cwd and litter input fluxes to thir respective flux fields
22662274
do i_cwd = 1, ncwd

0 commit comments

Comments
 (0)