Skip to content

Commit

Permalink
Add if statement to prevent negative leafc_slamax
Browse files Browse the repository at this point in the history
  • Loading branch information
kovenock authored Jun 15, 2018
1 parent f50bb38 commit a389cf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions biogeochem/FatesAllometryMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,9 @@ real(r8) function tree_lai( bl, status_coh, pft, c_area, n, cl, canopy_layer_tai
! Leafc_per_unitarea at which sla_max is reached due to exponential sla profile in canopy:
leafc_slamax = (slat - sla_max * exp(-1.0_r8 * kn * laican)) / &
(-1.0_r8 * kn * tai_to_lai * slat * sla_max)
if(leafc_slamax < 0.0_r8)then
leafc_slamax = 0.0_r8
endif

! Calculate tree_lai (m2 leaf area /m2 ground) = unitless LAI
!----------------------------------------------------------------------
Expand Down

0 comments on commit a389cf8

Please sign in to comment.