Skip to content

Commit 743dfe4

Browse files
committed
Added dimension indices to whole array operations.
1 parent 567853f commit 743dfe4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

biogeophys/EDBtranMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ subroutine btran_ed( nsites, sites, bc_in, bc_out)
176176
! The cohort's conductance g_sb_laweighted, contains a weighting factor
177177
! based on the cohort's leaf area. units: [m/s] * [m2]
178178

179-
pftgs(:) = 0._r8
179+
pftgs(1:maxpft) = 0._r8
180180
ccohort => cpatch%tallest
181181
do while(associated(ccohort))
182182
pftgs(ccohort%pft) = pftgs(ccohort%pft) + ccohort%g_sb_laweight

main/FatesHistoryInterfaceMod.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,8 +2091,8 @@ subroutine update_history_prod(this,nc,nsites,sites,dt_tstep)
20912091
ipa = 0
20922092
cpatch => sites(s)%oldest_patch
20932093

2094-
patch_area_by_age(:) = 0._r8
2095-
canopy_area_by_age(:) = 0._r8
2094+
patch_area_by_age(1:nlevage) = 0._r8
2095+
canopy_area_by_age(1:nlevage) = 0._r8
20962096

20972097
do while(associated(cpatch))
20982098

@@ -2369,9 +2369,9 @@ subroutine update_history_prod(this,nc,nsites,sites,dt_tstep)
23692369
end do
23702370

23712371
! Normalize resistance diagnostics
2372-
if ( sum(canopy_area_by_age(:)) .gt. tiny) then
2373-
hio_c_stomata_si(io_si) = hio_c_stomata_si(io_si) / sum(canopy_area_by_age(:))
2374-
hio_c_lblayer_si(io_si) = hio_c_lblayer_si(io_si) / sum(canopy_area_by_age(:))
2372+
if ( sum(canopy_area_by_age(1:nlevage)) .gt. tiny) then
2373+
hio_c_stomata_si(io_si) = hio_c_stomata_si(io_si) / sum(canopy_area_by_age(1:nlevage))
2374+
hio_c_lblayer_si(io_si) = hio_c_lblayer_si(io_si) / sum(canopy_area_by_age(1:nlevage))
23752375
else
23762376
hio_c_stomata_si(io_si) = 0._r8
23772377
hio_c_lblayer_si(io_si) = 0._r8

0 commit comments

Comments
 (0)