Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/multilayer_canopy/MLCanopyFluxesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,9 @@ subroutine MLCanopyFluxes (bounds, num_exposedvegp, filter_exposedvegp, &
do ic = 1, ncan(p)
dlai(p,ic) = dlai_frac(p,ic) * lai(p)
dsai(p,ic) = dsai_frac(p,ic) * sai(p)
dpai(p,ic) = dlai(p,ic) + dsai(p,ic)
! Now reset values to minimum
dlai(p,ic) = max(dlai(p,ic), 0.01_r8)
dsai(p,ic) = max(dsai(p,ic), 0.01_r8)
if (dlai(p,ic) > 0._r8) dlai(p,ic) = max(dlai(p,ic), 0.01_r8)
if (dsai(p,ic) > 0._r8) dsai(p,ic) = max(dsai(p,ic), 0.01_r8)
dpai(p,ic) = dlai(p,ic) + dsai(p,ic)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gordon, these are the lines that you recommended changing (410 - 411).

end do

Expand Down
7 changes: 4 additions & 3 deletions src/multilayer_canopy/MLCanopyNitrogenProfileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,13 @@ subroutine CanopyNitrogenProfile (num_filter, filter, mlcanopy_inst)
end do

! Check that canopy sum of vcmax25 equals the expected value obtained by analytical integration
! NB slevis 2024/3/22: The next was a valid error check before introducing minimum dlai and dsai

numerical = sum(vcmax25_profile(p,1:ncan(p)) * dpai(p,1:ncan(p)))
analytical = vcmax25top * (1._r8 - exp(-kn*(lai(p) + sai(p)))) / kn
if (abs(numerical-analytical) > 1.e-06_r8) then
call endrun (msg='ERROR: CanopyNitrogenProfile: canopy integration error')
end if
! if (abs(numerical-analytical) > 1.e-06_r8) then
! call endrun (msg='ERROR: CanopyNitrogenProfile: canopy integration error')
! end if
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After changing lines 410-411 in MLCanopyFluxesMod.F90, this error got triggered, so I commented it out, because I do not think that we should expect it to pass anymore.


end do

Expand Down