Skip to content

Commit 0c3e161

Browse files
authored
Merge pull request #379 from rgknox/canopy-photo-unix-fixes
canopy resistance unit fixes
2 parents b968437 + 743dfe4 commit 0c3e161

File tree

8 files changed

+318
-119
lines changed

8 files changed

+318
-119
lines changed

biogeochem/EDCohortDynamicsMod.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ subroutine nan_cohort(cc_p)
241241
currentCohort%br = nan ! fine root biomass: kGC per indiv
242242
currentCohort%lai = nan ! leaf area index of cohort m2/m2
243243
currentCohort%sai = nan ! stem area index of cohort m2/m2
244-
currentCohort%gscan = nan ! Stomatal resistance of cohort.
244+
currentCohort%g_sb_laweight = nan ! Total leaf conductance of cohort (stomata+blayer) weighted by leaf-area [m/s]*[m2]
245245
currentCohort%canopy_trim = nan ! What is the fraction of the maximum leaf biomass that we are targeting? :-
246246
currentCohort%leaf_cost = nan ! How much does it cost to maintain leaves: kgC/m2/year-1
247247
currentCohort%excl_weight = nan ! How much of this cohort is demoted each year, as a proportion of all cohorts:-
@@ -362,7 +362,7 @@ subroutine zero_cohort(cc_p)
362362
currentcohort%npp_acc_hold = 0._r8
363363
currentcohort%gpp_acc_hold = 0._r8
364364
currentcohort%dmort = 0._r8
365-
currentcohort%gscan = 0._r8
365+
currentcohort%g_sb_laweight = 0._r8
366366
currentcohort%treesai = 0._r8
367367
currentCohort%lmort_direct = 0._r8
368368
currentCohort%lmort_infra = 0._r8
@@ -1112,7 +1112,7 @@ subroutine copy_cohort( currentCohort,copyc )
11121112
n%br = o%br
11131113
n%lai = o%lai
11141114
n%sai = o%sai
1115-
n%gscan = o%gscan
1115+
n%g_sb_laweight = o%g_sb_laweight
11161116
n%leaf_cost = o%leaf_cost
11171117
n%canopy_layer = o%canopy_layer
11181118
n%canopy_layer_yesterday = o%canopy_layer_yesterday

biogeochem/EDPatchDynamicsMod.F90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,8 @@ subroutine zero_patch(cp_p)
13101310
currentPatch%sabs_dir(:) = 0.0_r8
13111311
currentPatch%sabs_dif(:) = 0.0_r8
13121312
currentPatch%zstar = 0.0_r8
1313+
currentPatch%c_stomata = 0.0_r8 ! This is calculated immediately before use
1314+
currentPatch%c_lblayer = 0.0_r8
13131315

13141316
end subroutine zero_patch
13151317

@@ -1588,7 +1590,9 @@ subroutine fuse_2_patches(csite, dp, rp)
15881590
rp%burnt_frac_litter(:) = (dp%burnt_frac_litter(:)*dp%area + rp%burnt_frac_litter(:)*rp%area) * inv_sum_area
15891591
rp%btran_ft(:) = (dp%btran_ft(:)*dp%area + rp%btran_ft(:)*rp%area) * inv_sum_area
15901592
rp%zstar = (dp%zstar*dp%area + rp%zstar*rp%area) * inv_sum_area
1591-
1593+
rp%c_stomata = (dp%c_stomata*dp%area + rp%c_stomata*rp%area) * inv_sum_area
1594+
rp%c_lblayer = (dp%c_lblayer*dp%area + rp%c_lblayer*rp%area) * inv_sum_area
1595+
15921596
rp%area = rp%area + dp%area !THIS MUST COME AT THE END!
15931597

15941598
!insert donor cohorts into recipient patch

biogeochem/FatesAllometryMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ subroutine carea_allom(d,nplant,site_spread,ipft,c_area)
430430
real(r8),intent(in) :: site_spread ! site level spread factor (crowdedness)
431431
real(r8),intent(in) :: nplant ! number of plants [1/ha]
432432
integer(i4),intent(in) :: ipft ! PFT index
433-
real(r8),intent(out) :: c_area ! crown area per plant (m2)
433+
real(r8),intent(out) :: c_area ! crown area per cohort (m2)
434434

435435
real(r8) :: d_eff ! Effective diameter (cm)
436436

biogeophys/EDBtranMod.F90

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ subroutine btran_ed( nsites, sites, bc_in, bc_out)
112112
real(r8) :: smp_node ! matrix potential
113113
real(r8) :: rresis ! suction limitation to transpiration independent
114114
! of root density
115-
real(r8) :: pftgs(maxpft) ! pft weighted stomatal conductance s/m
115+
real(r8) :: pftgs(maxpft) ! pft weighted stomatal conductance m/s
116116
real(r8) :: temprootr
117117
real(r8) :: sum_pftgs ! sum of weighted conductances (for normalization)
118118
!------------------------------------------------------------------------------
@@ -173,11 +173,13 @@ subroutine btran_ed( nsites, sites, bc_in, bc_out)
173173
end do !PFT
174174

175175
! PFT-averaged point level root fraction for extraction purposese.
176-
! This probably needs to be weighted by actual transpiration from each pft. FIX(RF,032414).
177-
pftgs(:) = 0._r8
176+
! The cohort's conductance g_sb_laweighted, contains a weighting factor
177+
! based on the cohort's leaf area. units: [m/s] * [m2]
178+
179+
pftgs(1:maxpft) = 0._r8
178180
ccohort => cpatch%tallest
179181
do while(associated(ccohort))
180-
pftgs(ccohort%pft) = pftgs(ccohort%pft) + ccohort%gscan * ccohort%n
182+
pftgs(ccohort%pft) = pftgs(ccohort%pft) + ccohort%g_sb_laweight
181183
ccohort => ccohort%shorter
182184
enddo
183185

@@ -196,7 +198,7 @@ subroutine btran_ed( nsites, sites, bc_in, bc_out)
196198
cpatch%rootr_ft(ft,j) * pftgs(ft)/sum_pftgs
197199
else
198200
bc_out(s)%rootr_pagl(ifp,j) = bc_out(s)%rootr_pagl(ifp,j) + &
199-
cpatch%rootr_ft(ft,j) * 1./numpft
201+
cpatch%rootr_ft(ft,j) * 1._r8/dble(numpft)
200202
end if
201203
enddo
202204
enddo

0 commit comments

Comments
 (0)