From 8ff6f9c601422a8169df94fc55522e8afd5f09c2 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Mon, 3 Jun 2019 14:32:23 -0600 Subject: [PATCH 1/2] Remove unnecessary (and erroneous) calls to treesai and treelai during EDMain. --- main/EDMainMod.F90 | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/main/EDMainMod.F90 b/main/EDMainMod.F90 index 20aa3b3103..2f0701b790 100644 --- a/main/EDMainMod.F90 +++ b/main/EDMainMod.F90 @@ -354,15 +354,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 @@ -373,15 +364,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. @@ -401,14 +383,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) From 87db0594ca2590bcc6b83be7f0fe5c6f91e6ff31 Mon Sep 17 00:00:00 2001 From: Ryan Knox Date: Wed, 5 Jun 2019 11:39:14 -0600 Subject: [PATCH 2/2] Removed unused leaf_c variable declaration. --- main/EDMainMod.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/main/EDMainMod.F90 b/main/EDMainMod.F90 index 2f0701b790..0ebf700c3e 100644 --- a/main/EDMainMod.F90 +++ b/main/EDMainMod.F90 @@ -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