Skip to content

Commit

Permalink
Merge pull request #739 from glemieux/ai_min-reinstate
Browse files Browse the repository at this point in the history
Manually reinstating `ai_min` after test failure
  • Loading branch information
rgknox authored Apr 19, 2021
2 parents 74433f4 + 6065b9a commit ee7fc46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2040,11 +2040,15 @@ function calc_areaindex(cpatch,ai_type) result(ai)

integer :: cl,ft
real(r8) :: ai
! TODO: THIS MIN LAI IS AN ARTIFACT FROM TESTING LONG-AGO AND SHOULD BE REMOVED
! THIS HAS BEEN KEPT THUS FAR TO MAINTAIN B4B IN TESTING OTHER COMMITS
real(r8),parameter :: ai_min = 0.1_r8

real(r8),pointer :: ai_profile

ai = 0._r8
if (trim(ai_type) == 'elai') then
do cl = 1,cpatch%NCL_p
do cl = 1,cpatch%NCL_p
do ft = 1,numpft
ai = ai + sum(cpatch%canopy_area_profile(cl,ft,1:cpatch%nrad(cl,ft)) * &
cpatch%elai_profile(cl,ft,1:cpatch%nrad(cl,ft)))
Expand Down Expand Up @@ -2076,6 +2080,8 @@ function calc_areaindex(cpatch,ai_type) result(ai)
write(fates_log(),*) 'Unsupported area index sent to calc_areaindex'
call endrun(msg=errMsg(sourcefile, __LINE__))
end if

ai = max(ai_min,ai)

return

Expand Down

0 comments on commit ee7fc46

Please sign in to comment.