Skip to content

Commit

Permalink
first pass adding understory leaf longevity
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaNeedham authored and glemieux committed Oct 2, 2024
1 parent e06e0df commit a235f11
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 29 deletions.
4 changes: 2 additions & 2 deletions main/EDMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,15 @@ subroutine ed_integrate_state_variables(currentSite, bc_in, bc_out )
is_drought = .true.
end if

call PRTMaintTurnover(currentCohort%prt,ft,is_drought)
call PRTMaintTurnover(currentCohort%prt,ft, currentCohort%canopy_layer,is_drought)

! -----------------------------------------------------------------------------------
! Call the routine that advances leaves in age.
! This will move a portion of the leaf mass in each
! age bin, to the next bin. This will not handle movement
! of mass from the oldest bin into the litter pool, that is something else.
! -----------------------------------------------------------------------------------
call currentCohort%prt%AgeLeaves(ft,sec_per_day)
call currentCohort%prt%AgeLeaves(ft,currentCohort%canopy_layer, sec_per_day)

! Plants can acquire N from 3 sources (excluding re-absorption),
! the source doesn't affect how its allocated (yet), so they
Expand Down
15 changes: 11 additions & 4 deletions parteh/PRTGenericMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ end subroutine SetState

! ====================================================================================

subroutine AgeLeaves(this,ipft,period_sec)
subroutine AgeLeaves(this,ipft,icanlayer,period_sec)

! -----------------------------------------------------------------------------------
! If we have more than one leaf age classification, allow
Expand All @@ -1282,6 +1282,7 @@ subroutine AgeLeaves(this,ipft,period_sec)

class(prt_vartypes) :: this
integer,intent(in) :: ipft
integer,intent(in) :: icanlayer
real(r8),intent(in) :: period_sec ! Time period over which this routine
! is called [seconds] daily=86400
integer :: nleafage
Expand All @@ -1291,7 +1292,7 @@ subroutine AgeLeaves(this,ipft,period_sec)
integer :: element_id
real(r8) :: leaf_age_flux_frac
real(r8),dimension(max_nleafage) :: leaf_m0

real(r8) :: leaf_long

do el = 1, num_elements

Expand All @@ -1311,9 +1312,15 @@ subroutine AgeLeaves(this,ipft,period_sec)
do i_age = 1,nleafage-1
if (prt_params%leaf_long(ipft,i_age)>nearzero) then

if (icanlayer .eq. 1) then
leaf_long = prt_params%leaf_long(ipft,i_age)
else
leaf_long = prt_params%leaf_long_ustory(ipft,i_age)
end if

! Units: [-] = [sec] * [day/sec] * [years/day] * [1/years]
leaf_age_flux_frac = period_sec * days_per_sec * years_per_day / prt_params%leaf_long(ipft,i_age)

leaf_age_flux_frac = period_sec * days_per_sec * years_per_day / leaf_long
leaf_m(i_age) = leaf_m(i_age) - leaf_m0(i_age) * leaf_age_flux_frac
leaf_m(i_age+1) = leaf_m(i_age+1) + leaf_m0(i_age) * leaf_age_flux_frac

Expand Down
71 changes: 48 additions & 23 deletions parteh/PRTLossFluxesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -627,26 +627,27 @@ end subroutine DeciduousTurnoverSimpleRetranslocation

! ====================================================================================

subroutine PRTMaintTurnover(prt,ipft,is_drought)
subroutine PRTMaintTurnover(prt,ipft,icanlayer,is_drought)

! ---------------------------------------------------------------------------------
! Generic subroutine (wrapper) calling specialized routines handling
! the turnover of tissues in living plants (non-mortal)
! ---------------------------------------------------------------------------------
class(prt_vartypes) :: prt
integer,intent(in) :: ipft
integer,intent(in) :: icanlayer
logical,intent(in) :: is_drought ! Is this plant/cohort operating in a drought
! stress context?

call MaintTurnoverSimpleRetranslocation(prt,ipft,is_drought)
call MaintTurnoverSimpleRetranslocation(prt,ipft,icanlayer,is_drought)


return
end subroutine PRTMaintTurnover

! ===================================================================================

subroutine MaintTurnoverSimpleRetranslocation(prt,ipft,is_drought)
subroutine MaintTurnoverSimpleRetranslocation(prt,ipft,icanlayer,is_drought)

! ---------------------------------------------------------------------------------
! This subroutine removes biomass from all applicable pools due to
Expand All @@ -667,6 +668,7 @@ subroutine MaintTurnoverSimpleRetranslocation(prt,ipft,is_drought)

class(prt_vartypes) :: prt
integer, intent(in) :: ipft
integer, intent(in) :: icanlayer
logical, intent(in) :: is_drought ! Is this plant/cohort operating in a drought
! stress context?

Expand Down Expand Up @@ -737,29 +739,52 @@ subroutine MaintTurnoverSimpleRetranslocation(prt,ipft,is_drought)
base_turnover(fnrt_organ) = 0.0_r8
end if

if (icanlayer .eq. 1) then

! The last index of the leaf longevity array contains the turnover
! timescale for the senescent pool.
aclass_sen_id = size(prt_params%leaf_long(ipft,:))

! Only evergreens have maintenance turnover (must also change trimming logic
! if we want to change this)
! -------------------------------------------------------------------------------------
if ( (prt_params%leaf_long(ipft,aclass_sen_id) > nearzero ) .and. &
int(prt_params%evergreen(ipft))==itrue ) then

if(is_drought) then
base_turnover(leaf_organ) = years_per_day / &
(prt_params%leaf_long(ipft,aclass_sen_id) * &
prt_params%senleaf_long_fdrought(ipft) )
! The last index of the leaf longevity array contains the turnover
! timescale for the senescent pool.
aclass_sen_id = size(prt_params%leaf_long(ipft,:))

! Only evergreens have maintenance turnover (must also change trimming logic
! if we want to change this)
! -------------------------------------------------------------------------------------
if ( (prt_params%leaf_long(ipft,aclass_sen_id) > nearzero ) .and. &
int(prt_params%evergreen(ipft))==itrue ) then

if(is_drought) then
base_turnover(leaf_organ) = years_per_day / &
(prt_params%leaf_long(ipft,aclass_sen_id) * &
prt_params%senleaf_long_fdrought(ipft) )
else
base_turnover(leaf_organ) = years_per_day / &
prt_params%leaf_long(ipft,aclass_sen_id)
end if
else
base_turnover(leaf_organ) = years_per_day / &
prt_params%leaf_long(ipft,aclass_sen_id)
end if
else
base_turnover(leaf_organ) = 0.0_r8
endif
base_turnover(leaf_organ) = 0.0_r8
endif

else ! understory trees
aclass_sen_id = size(prt_params%leaf_long_ustory(ipft,:))
if ( (prt_params%leaf_long_ustory(ipft,aclass_sen_id) > nearzero ) .and. &
int(prt_params%evergreen(ipft))==itrue ) then

if(is_drought) then
base_turnover(leaf_organ) = years_per_day / &
(prt_params%leaf_long_ustory(ipft,aclass_sen_id) * &
prt_params%senleaf_long_fdrought(ipft) )
else
base_turnover(leaf_organ) = years_per_day / &
prt_params%leaf_long_ustory(ipft,aclass_sen_id)
end if
else
base_turnover(leaf_organ) = 0.0_r8
endif

end if ! end if canopy layer




base_turnover(repro_organ) = 0.0_r8

do i_var = 1, prt_global%num_vars
Expand Down
1 change: 1 addition & 0 deletions parteh/PRTParametersMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module PRTParametersMod
! longevity across all leaf age classes is also
! the maximum length of the growing (i.e., leaves on)
! season.
real(r8), allocatable :: leaf_long_ustory(:,:) ! As above but for understory trees
real(r8), allocatable :: root_long(:) ! root turnover time (longevity) (pft) [yr]
real(r8), allocatable :: branch_long(:) ! Turnover time for branchfall on live trees (pft) [yr]
real(r8), allocatable :: turnover_nitr_retrans(:,:) ! nitrogen re-translocation fraction (pft x organ)
Expand Down
9 changes: 9 additions & 0 deletions parteh/PRTParamsFATESMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,10 @@ subroutine PRTRegisterPFTLeafAge(fates_params)
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)

name = 'fates_turnover_leaf_ustory'
call fates_params%RegisterParameter(name=name, dimension_shape=dimension_shape_2d, &
dimension_names=dim_names, lower_bounds=dim_lower_bound)

return
end subroutine PRTRegisterPFTLeafAge

Expand Down Expand Up @@ -874,6 +878,10 @@ subroutine PRTReceivePFTLeafAge(fates_params)
call fates_params%RetrieveParameterAllocate(name=name, &
data=prt_params%leaf_long)

name = 'fates_turnover_leaf_ustory'
call fates_params%RetrieveParameterAllocate(name=name, &
data=prt_params%leaf_long_ustory)

return
end subroutine PRTReceivePFTLeafAge

Expand Down Expand Up @@ -1005,6 +1013,7 @@ subroutine FatesReportPFTParams(is_master)
write(fates_log(),fmt0) 'slatop = ',prt_params%slatop
write(fates_log(),fmt0) 'allom_sai_scaler = ',prt_params%allom_sai_scaler
write(fates_log(),fmt0) 'leaf_long = ',prt_params%leaf_long
write(fates_log(),fmt0) 'leaf_long_ustory = ',prt_params%leaf_long_ustory
write(fates_log(),fmt0) 'grperc = ',prt_params%grperc
write(fates_log(),fmt0) 'c2b = ',prt_params%c2b
write(fates_log(),fmt0) 'branch_turnover = ',prt_params%branch_long
Expand Down

0 comments on commit a235f11

Please sign in to comment.