Skip to content

Commit d121971

Browse files
authored
Merge pull request #1395 from ckoven/min_trim
actually use trim_limit as floor of trimming
2 parents c319e67 + 6977f99 commit d121971

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

biogeochem/EDPhysiologyMod.F90

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ subroutine trim_canopy( currentSite )
822822
! Check leaf cost against the yearly net uptake for that cohort leaf layer
823823
if (currentCohort%year_net_uptake(z) < currentCohort%leaf_cost) then
824824
! Make sure the cohort trim fraction is great than the pft trim limit
825-
if (currentCohort%canopy_trim > EDPftvarcon_inst%trim_limit(ipft)) then
825+
if (currentCohort%canopy_trim > (EDPftvarcon_inst%trim_limit(ipft) + EDPftvarcon_inst%trim_inc(ipft))) then
826826

827827
! keep trimming until none of the canopy is in negative carbon balance.
828828
if (currentCohort%height > EDPftvarcon_inst%hgt_min(ipft)) then
@@ -871,11 +871,14 @@ subroutine trim_canopy( currentSite )
871871
optimum_trim = (nnu_clai_b(1,1) / cumulative_lai_cohort) * initial_trim
872872

873873
! Determine if the optimum trim value makes sense. The smallest cohorts tend to have unrealistic fits.
874-
if (optimum_trim > 0. .and. optimum_trim < 1.) then
874+
if (optimum_trim > EDPftvarcon_inst%trim_limit(ipft) .and. optimum_trim < 1.) then
875875
currentCohort%canopy_trim = optimum_trim
876876

877877
trimmed = .true.
878878

879+
else if (optimum_trim <= EDPftvarcon_inst%trim_limit(ipft)) then
880+
currentCohort%canopy_trim = EDPftvarcon_inst%trim_limit(ipft)
881+
trimmed = .true.
879882
endif
880883
endif
881884
endif

0 commit comments

Comments
 (0)