Skip to content

Commit 6b02c8d

Browse files
authored
Merge pull request #360 from ckoven/laicanfix
laican bugfix
2 parents 0090297 + 07a0a7a commit 6b02c8d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

biogeophys/FatesPlantRespPhotosynthMod.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,12 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
324324
! are there any leaves of this pft in this layer?
325325
if(currentPatch%canopy_mask(cl,ft) == 1)then
326326

327-
if(cl==NCL_p)then !are we in the top canopy layer or a shaded layer?
327+
if(cl==1)then !are we in the top canopy layer or a shaded layer?
328328
laican = 0._r8
329329
else
330-
laican = sum(currentPatch%canopy_layer_tai(cl+1:NCL_p))
330+
331+
laican = sum(currentPatch%canopy_layer_tai(1:cl-1))
332+
331333
end if
332334

333335
! Loop over leaf-layers
@@ -366,7 +368,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime)
366368
laican = laican + 0.5_r8 * vai
367369
else
368370
laican = laican + 0.5_r8 * (currentPatch%elai_profile(cl,ft,iv-1)+ &
369-
currentPatch%esai_profile(cl,ft,iv-1))+vai
371+
currentPatch%esai_profile(cl,ft,iv-1)+vai)
370372
end if
371373

372374
! Scale for leaf nitrogen profile

0 commit comments

Comments
 (0)