Skip to content

Commit 78fbc4a

Browse files
committed
Removed a testing artifact where non-mortality turnover was flushed to zero.
1 parent 2fb2f5d commit 78fbc4a

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed

biogeochem/EDPhysiologyMod.F90

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,6 @@ subroutine phenology_leafonoff(currentSite)
576576
! add lost carbon to litter
577577
currentCohort%leaf_litter = currentCohort%bl
578578
currentCohort%bl = 0.0_r8
579-
580-
! write(fates_log(),*) 'cold drop kicking in'
581-
! call endrun(msg=errMsg(sourcefile, __LINE__))
582-
583579

584580
endif !leaf status
585581
endif !currentSite status
@@ -593,7 +589,9 @@ subroutine phenology_leafonoff(currentSite)
593589
if (currentCohort%laimemory <= currentCohort%bstore)then
594590
currentCohort%bl = currentCohort%laimemory !extract stored carbon to make new leaves.
595591
else
596-
currentCohort%bl = currentCohort%bstore * store_output !we can only put on as much carbon as there is in the store...
592+
593+
!we can only put on as much carbon as there is in the store.
594+
currentCohort%bl = currentCohort%bstore * store_output
597595
endif
598596

599597
if ( DEBUG ) write(fates_log(),*) 'EDPhysMod 3 ',currentCohort%bstore
@@ -618,9 +616,6 @@ subroutine phenology_leafonoff(currentSite)
618616
currentCohort%leaf_litter = currentCohort%bl
619617
currentCohort%bl = 0.0_r8
620618

621-
! write(fates_log(),*) 'drought drop kicking in'
622-
! call endrun(msg=errMsg(sourcefile, __LINE__))
623-
624619
endif
625620
endif !status
626621
endif !drought dec.
@@ -875,7 +870,7 @@ subroutine PlantGrowth( currentSite, currentCohort, bc_in )
875870
real(r8), parameter :: cbal_prec = 1.0e-15_r8 ! Desired precision in carbon balance
876871
! non-integrator part
877872
integer , parameter :: max_substeps = 300
878-
real(r8), parameter :: max_trunc_error = 0.1_r8
873+
real(r8), parameter :: max_trunc_error = 1.0_r8
879874
integer, parameter :: ODESolve = 2 ! 1=RKF45, 2=Euler
880875
real(r8), parameter :: global_branch_turnover = 0.0_r8 ! Temporary branch turnover setting
881876
! Branch-turnover control will be
@@ -948,12 +943,6 @@ subroutine PlantGrowth( currentSite, currentCohort, bc_in )
948943
! Target leaf biomass according to allometry and trimming
949944
call bleaf(currentCohort%dbh,ipft,currentCohort%canopy_trim,bt_leaf,dbt_leaf_dd)
950945

951-
! ! If status_coh is 1, then leaves are in a dropped (off allometry)
952-
! if( currentcohort%status_coh == 1 ) then
953-
! bt_leaf = 0.0_r8
954-
! dbt_leaf_dd = 0.0_r8
955-
! end if
956-
957946
! Target fine-root biomass and deriv. according to allometry and trimming [kgC, kgC/cm]
958947
call bfineroot(currentCohort%dbh,ipft,currentCohort%canopy_trim,bt_fineroot,dbt_fineroot_dd)
959948

@@ -1047,23 +1036,16 @@ subroutine PlantGrowth( currentSite, currentCohort, bc_in )
10471036
currentCohort%root_md = currentCohort%br /EDPftvarcon_inst%root_long(ipft)
10481037
endif
10491038

1050-
currentCohort%leaf_md = 0.0_r8
1051-
currentCohort%bsw_md = 0.0_r8
1052-
currentCohort%bdead_md = 0.0_r8
1053-
currentCohort%bstore_md = 0.0_r8
1054-
currentCohort%root_md = 0.0_r8
1055-
10561039
! -----------------------------------------------------------------------------------
10571040
! IV. Remove turnover from the appropriate pools
10581041
!
10591042
! Units: kgC/year * (year/days_per_year) = kgC/day -> (day elapsed) -> kgC
10601043
! -----------------------------------------------------------------------------------
1061-
10621044

1063-
currentCohort%bl = currentCohort%bl - currentCohort%leaf_md*hlm_freq_day
1064-
currentcohort%br = currentcohort%br - currentCohort%root_md*hlm_freq_day
1065-
currentcohort%bsw = currentcohort%bsw - currentCohort%bsw_md*hlm_freq_day
1066-
currentCohort%bdead = currentCohort%bdead - currentCohort%bdead_md*hlm_freq_day
1045+
currentCohort%bl = currentCohort%bl - currentCohort%leaf_md*hlm_freq_day
1046+
currentcohort%br = currentcohort%br - currentCohort%root_md*hlm_freq_day
1047+
currentcohort%bsw = currentcohort%bsw - currentCohort%bsw_md*hlm_freq_day
1048+
currentCohort%bdead = currentCohort%bdead - currentCohort%bdead_md*hlm_freq_day
10671049
currentCohort%bstore = currentCohort%bstore - currentCohort%bstore_md*hlm_freq_day
10681050

10691051

@@ -1287,12 +1269,12 @@ subroutine PlantGrowth( currentSite, currentCohort, bc_in )
12871269

12881270
elseif(ODESolve == 2) then
12891271
call Euler(AllomCGrowthDeriv,c_pool,c_mask,deltaC,totalC,currentCohort,c_pool_out)
1290-
step_pass = .true.
1291-
! call CheckIntegratedAllometries(c_pool_out(i_dbh),ipft,currentCohort%canopy_trim, &
1292-
! c_pool_out(i_cleaf), c_pool_out(i_cfroot), c_pool_out(i_csap), &
1293-
! c_pool_out(i_cstore), c_pool_out(i_cdead), &
1294-
! c_mask(i_cleaf), c_mask(i_cfroot), c_mask(i_csap), &
1295-
! c_mask(i_cstore),c_mask(i_cdead), max_trunc_error, step_pass)
1272+
! step_pass = .true.
1273+
call CheckIntegratedAllometries(c_pool_out(i_dbh),ipft,currentCohort%canopy_trim, &
1274+
c_pool_out(i_cleaf), c_pool_out(i_cfroot), c_pool_out(i_csap), &
1275+
c_pool_out(i_cstore), c_pool_out(i_cdead), &
1276+
c_mask(i_cleaf), c_mask(i_cfroot), c_mask(i_csap), &
1277+
c_mask(i_cstore),c_mask(i_cdead), max_trunc_error, step_pass)
12961278
if(step_pass) then
12971279
currentCohort%ode_opt_step = deltaC
12981280
else
@@ -1505,9 +1487,6 @@ function AllomCGrowthDeriv(c_pools,c_mask,cbalance,currentCohort) result(dCdx)
15051487
dCdx(i_cstore) = 0.0_r8
15061488
dCdx(i_crepro) = 1.0_r8
15071489

1508-
write(fates_log(),*) 'exiting because of forced seed 0'
1509-
call endrun(msg=errMsg(sourcefile, __LINE__))
1510-
15111490
else
15121491

15131492
dCdx(i_cdead) = (ct_ddeaddd/ct_dtotaldd)*(1.0_r8-repro_fraction)

0 commit comments

Comments
 (0)