Skip to content

Commit

Permalink
adding hist var for sp lai by pft
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoven committed Sep 2, 2021
1 parent 1341f4b commit a260f31
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ module FatesHistoryInterfaceMod
! indices to (site x pft) variables
integer :: ih_biomass_si_pft
integer :: ih_leafbiomass_si_pft
integer :: ih_splai_si_pft
integer :: ih_storebiomass_si_pft
integer :: ih_nindivs_si_pft
integer :: ih_recruitment_si_pft
Expand Down Expand Up @@ -1792,6 +1793,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
hio_canopy_spread_si => this%hvars(ih_canopy_spread_si)%r81d, &
hio_biomass_si_pft => this%hvars(ih_biomass_si_pft)%r82d, &
hio_leafbiomass_si_pft => this%hvars(ih_leafbiomass_si_pft)%r82d, &
hio_splai_si_pft => this%hvars(ih_splai_si_pft)%r82d, &
hio_storebiomass_si_pft => this%hvars(ih_storebiomass_si_pft)%r82d, &
hio_nindivs_si_pft => this%hvars(ih_nindivs_si_pft)%r82d, &
hio_recruitment_si_pft => this%hvars(ih_recruitment_si_pft)%r82d, &
Expand Down Expand Up @@ -2131,6 +2133,11 @@ subroutine update_history_dyn(this,nc,nsites,sites)

hio_harvest_carbonflux_si(io_si) = sites(s)%harvest_carbon_flux

do i_pft = 1,numpft
hio_splai_si_pft(io_si,i_pft) = sites(s)%sp_tlai(i_pft)
end do


ipa = 0
cpatch => sites(s)%oldest_patch
do while(associated(cpatch))
Expand Down Expand Up @@ -4337,6 +4344,11 @@ subroutine define_history_vars(this, initialize_variables)
avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, &
ivar=ivar, initialize=initialize_variables, index = ih_leafbiomass_si_pft )

call this%set_history_var(vname='PFT_SP_LAI', units='m2/m2', &
long='total PFT-level LAI', use_default='active', &
avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, &
ivar=ivar, initialize=initialize_variables, index = ih_splai_si_pft )

call this%set_history_var(vname='PFTstorebiomass', units='gC/m2', &
long='total PFT level stored biomass', use_default='active', &
avgflag='A', vtype=site_pft_r8, hlms='CLM:ALM', flushval=0.0_r8, upfreq=1, &
Expand Down

0 comments on commit a260f31

Please sign in to comment.