Skip to content

Commit f788ffc

Browse files
authored
Merge pull request #317 from rgknox/rgknox-uninit-fixes
Fixed uninitialized dhdd
2 parents f079069 + fb165ea commit f788ffc

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

biogeochem/EDCohortDynamicsMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ subroutine allocate_live_biomass(cc_p,mode)
235235

236236
call bleaf(currentcohort%dbh,currentcohort%hite,ft,currentcohort%canopy_trim,tar_bl)
237237
call bfineroot(currentcohort%dbh,currentcohort%hite,ft,currentcohort%canopy_trim,tar_br)
238-
call bsap_allom(currentcohort%dbh,currentcohort%hite,ft,currentcohort%canopy_trim,tar_bsw)
238+
call bsap_allom(currentcohort%dbh,ft,currentcohort%canopy_trim,tar_bsw)
239239

240240
leaf_frac = tar_bl/(tar_bl+tar_br+tar_bsw)
241241
bfr_per_leaf = tar_br/tar_bl

biogeochem/EDPhysiologyMod.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
885885
call bfineroot(currentCohort%dbh,currentCohort%hite,ipft,currentCohort%canopy_trim,b_fineroot)
886886

887887
! Calculate sapwood biomass
888-
call bsap_allom(currentCohort%dbh,currentCohort%hite,ipft,currentCohort%canopy_trim,b_sap)
888+
call bsap_allom(currentCohort%dbh,ipft,currentCohort%canopy_trim,b_sap)
889889

890890
target_balive = b_leaf + b_fineroot + b_sap
891891

@@ -1055,7 +1055,7 @@ subroutine Growth_Derivatives( currentSite, currentCohort, bc_in)
10551055
currentCohort%canopy_trim,b_leaf,db_leaf_dd)
10561056
call bfineroot(currentCohort%dbh,currentCohort%hite,ipft, &
10571057
currentCohort%canopy_trim,b_fineroot,db_fineroot_dd)
1058-
call bsap_allom(currentCohort%dbh,currentCohort%hite,ipft, &
1058+
call bsap_allom(currentCohort%dbh,ipft, &
10591059
currentCohort%canopy_trim,b_sap,db_sap_dd)
10601060

10611061
! Total change in alive biomass relative to dead biomass [kgC/kgC]
@@ -1190,7 +1190,7 @@ subroutine recruitment( currentSite, currentPatch, bc_in )
11901190
! Initialize balive (leaf+fineroot+sapwood)
11911191
call bleaf(temp_cohort%dbh,temp_cohort%hite,ft,temp_cohort%canopy_trim,b_leaf)
11921192
call bfineroot(temp_cohort%dbh,temp_cohort%hite,ft,temp_cohort%canopy_trim,b_fineroot)
1193-
call bsap_allom(temp_cohort%dbh,temp_cohort%hite,ft,temp_cohort%canopy_trim,b_sapwood)
1193+
call bsap_allom(temp_cohort%dbh,ft,temp_cohort%canopy_trim,b_sapwood)
11941194

11951195
call bag_allom(temp_cohort%dbh,temp_cohort%hite,ft,b_aboveground)
11961196
call bcr_allom(temp_cohort%dbh,temp_cohort%hite,ft,b_coarseroot)

biogeochem/FatesAllometryMod.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,15 +377,15 @@ end subroutine bleaf
377377
! Generic sapwood biomass interface
378378
! ============================================================================
379379

380-
subroutine bsap_allom(d,h,ipft,canopy_trim,bsap,dbsapdd)
380+
subroutine bsap_allom(d,ipft,canopy_trim,bsap,dbsapdd)
381381

382382
real(r8),intent(in) :: d ! plant diameter [cm]
383-
real(r8),intent(in) :: h ! plant height [m]
384383
integer(i4),intent(in) :: ipft ! PFT index
385384
real(r8),intent(in) :: canopy_trim
386385
real(r8),intent(out) :: bsap ! plant leaf biomass [kgC]
387386
real(r8),intent(out),optional :: dbsapdd ! change leaf bio per d [kgC/cm]
388387

388+
real(r8) :: h ! Plant height [m]
389389
real(r8) :: dhdd
390390
real(r8) :: blmax
391391
real(r8) :: dblmaxdd
@@ -401,6 +401,7 @@ subroutine bsap_allom(d,h,ipft,canopy_trim,bsap,dbsapdd)
401401
! ---------------------------------------------------------------------
402402
case(1,2) !"constant","dlinear")
403403

404+
call h_allom(d,ipft,h,dhdd)
404405
if(test_b4b)then
405406
call bleaf(d,h,ipft,canopy_trim,blmax,dblmaxdd)
406407
else

main/EDInitMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ subroutine init_cohorts( patch_in, bc_in)
384384
call bfineroot(temp_cohort%dbh,temp_cohort%hite,pft,temp_cohort%canopy_trim,b_fineroot)
385385

386386
! Calculate sapwood biomass
387-
call bsap_allom(temp_cohort%dbh,temp_cohort%hite,pft,temp_cohort%canopy_trim,b_sapwood)
387+
call bsap_allom(temp_cohort%dbh,pft,temp_cohort%canopy_trim,b_sapwood)
388388

389389
temp_cohort%balive = b_leaf + b_fineroot + b_sapwood
390390

main/FatesInventoryInitMod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ subroutine set_inventory_edcohort_type1(csite,bc_in,css_file_unit,npatches, &
889889
call bfineroot(temp_cohort%dbh,temp_cohort%hite,c_pft,temp_cohort%canopy_trim,b_fineroot)
890890

891891
! Calculate sapwood biomass
892-
call bsap_allom(temp_cohort%dbh,temp_cohort%hite,c_pft,temp_cohort%canopy_trim,b_sapwood)
892+
call bsap_allom(temp_cohort%dbh,c_pft,temp_cohort%canopy_trim,b_sapwood)
893893

894894
temp_cohort%balive = b_leaf + b_fineroot + b_sapwood
895895

0 commit comments

Comments
 (0)