File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments