Skip to content

Commit

Permalink
Merge pull request ESCOMP#542 from rgknox/remove-redund-treelai
Browse files Browse the repository at this point in the history
Remove unnecessary (and erroneous) calls to treesai and treelai
  • Loading branch information
glemieux authored Jun 5, 2019
2 parents dbc56ea + 87db059 commit 0cf63a9
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions main/EDMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ subroutine ed_integrate_state_variables(currentSite, bc_in )
real(r8) :: dbh_old ! dbh of plant before daily PRT [cm]
real(r8) :: hite_old ! height of plant before daily PRT [m]
logical :: is_drought ! logical for if the plant (site) is in a drought state
real(r8) :: leaf_c
real(r8) :: delta_dbh ! correction for dbh
real(r8) :: delta_hite ! correction for hite

Expand Down Expand Up @@ -354,15 +353,6 @@ subroutine ed_integrate_state_variables(currentSite, bc_in )

currentSite%flux_in = currentSite%flux_in + currentCohort%npp_acc * currentCohort%n

leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements)
currentCohort%treelai = tree_lai(leaf_c, currentCohort%pft, currentCohort%c_area, currentCohort%n, &
currentCohort%canopy_layer, currentPatch%canopy_layer_tlai, &
currentCohort%vcmax25top)
currentCohort%treesai = tree_sai(currentCohort%pft, currentCohort%dbh, currentCohort%canopy_trim, &
currentCohort%c_area, currentCohort%n, currentCohort%canopy_layer, &
currentPatch%canopy_layer_tlai, currentCohort%treelai,currentCohort%vcmax25top,6 )


! Conduct Maintenance Turnover (parteh)
call currentCohort%prt%CheckMassConservation(ft,3)
if(any(currentSite%dstatus == [phen_dstat_moiston,phen_dstat_timeon])) then
Expand All @@ -373,15 +363,6 @@ subroutine ed_integrate_state_variables(currentSite, bc_in )
call PRTMaintTurnover(currentCohort%prt,ft,is_drought)
call currentCohort%prt%CheckMassConservation(ft,4)

leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements)
currentCohort%treelai = tree_lai(leaf_c, currentCohort%pft, currentCohort%c_area, currentCohort%n, &
currentCohort%canopy_layer, currentPatch%canopy_layer_tlai, &
currentCohort%vcmax25top)
currentCohort%treesai = tree_sai(currentCohort%pft, currentCohort%dbh, currentCohort%canopy_trim, &
currentCohort%c_area, currentCohort%n, currentCohort%canopy_layer, &
currentPatch%canopy_layer_tlai, currentCohort%treelai,currentCohort%vcmax25top,7 )


! If the current diameter of a plant is somehow less than what is consistent
! with what is allometrically consistent with the stuctural biomass, then
! correct the dbh to match.
Expand All @@ -401,14 +382,6 @@ subroutine ed_integrate_state_variables(currentSite, bc_in )
! routine is also called following fusion
call UpdateCohortBioPhysRates(currentCohort)

leaf_c = currentCohort%prt%GetState(leaf_organ, all_carbon_elements)
currentCohort%treelai = tree_lai(leaf_c, currentCohort%pft, currentCohort%c_area, currentCohort%n, &
currentCohort%canopy_layer, currentPatch%canopy_layer_tlai, &
currentCohort%vcmax25top)
currentCohort%treesai = tree_sai(currentCohort%pft, currentCohort%dbh, currentCohort%canopy_trim, &
currentCohort%c_area, currentCohort%n, currentCohort%canopy_layer, &
currentPatch%canopy_layer_tlai, currentCohort%treelai,currentCohort%vcmax25top,3 )

! Transfer all reproductive tissues into seed production
call PRTReproRelease(currentCohort%prt,repro_organ,carbon12_element, &
1.0_r8, currentCohort%seed_prod)
Expand Down

0 comments on commit 0cf63a9

Please sign in to comment.