Skip to content

Commit

Permalink
Bugfix: Add termination mortality to _SZAP outputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsrabin committed Oct 10, 2024
1 parent eec1545 commit 1d1c44f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4899,20 +4899,27 @@ subroutine update_history_dyn2_ageclass(this,nc,nsites,sites,bc_in)
! treat as such
iscag = i_scls

! TODO: Why not also *cpatch%area like other mortality terms?
weight = AREA_INV

! add imort to other mortality terms. consider imort as understory mortality even if it happens in
! cohorts that may have been promoted as part of the patch creation, and use the pre-calculated site-level
! values to avoid biasing the results by the dramatically-reduced number densities in cohorts that are subject to imort
weight = AREA_INV
hio_mortality_understory_si_scag(io_si,iscag) = hio_mortality_understory_si_scag(io_si,iscag) + &
sites(s)%imort_rate(i_scls, ft) * weight

! add fire mortality to other mortality terms
weight = AREA_INV
hio_mortality_canopy_si_scag(io_si,iscag) = hio_mortality_canopy_si_scag(io_si,iscag) + &
sites(s)%fmort_rate_canopy(i_scls, ft) * weight
hio_mortality_understory_si_scag(io_si,iscag) = hio_mortality_understory_si_scag(io_si,iscag) + &
sites(s)%fmort_rate_ustory(i_scls, ft) * weight

! add termination mortality to other mortality terms
weight = AREA_INV * days_per_year
hio_mortality_canopy_si_scag(io_si,iscag) = hio_mortality_canopy_si_scag(io_si,iscag) + &
sum(sites(s)%term_nindivs_canopy(:,i_scls,ft)) * weight
hio_mortality_understory_si_scag(io_si,iscag) = hio_mortality_understory_si_scag(io_si,iscag) + &
sum(sites(s)%term_nindivs_ustory(:,i_scls,ft)) * weight

end do ! size class loop
end do ! pft loop
end do siteloop
Expand Down

0 comments on commit 1d1c44f

Please sign in to comment.