Skip to content

Commit d5bbb15

Browse files
rgknoxglemieux
authored andcommitted
Refactored timing of fates-elm fragmentation fluxes to fix restart b4b bug on cbalance errors
1 parent 64b674a commit d5bbb15

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

components/elm/src/main/elmfates_interfaceMod.F90

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,10 @@ subroutine UpdateLitterFluxes(this,bounds_clump)
14261426
do s = 1, this%fates(nc)%nsites
14271427
c = this%f2hmap(nc)%fcolumn(s)
14281428

1429+
call FluxIntoLitterPools(this%fates(nc)%sites(s), &
1430+
this%fates(nc)%bc_in(s), &
1431+
this%fates(nc)%bc_out(s))
1432+
14291433
col_cf%decomp_cpools_sourcesink(c,1:nlevdecomp,i_met_lit) = &
14301434
col_cf%decomp_cpools_sourcesink(c,1:nlevdecomp,i_met_lit) + &
14311435
this%fates(nc)%bc_out(s)%litt_flux_lab_c_si(1:nlevdecomp) * dtime
@@ -1959,14 +1963,6 @@ subroutine restart( this, bounds_proc, ncid, flag, &
19591963
this%fates(nc)%bc_out(s), &
19601964
is_restarting = .true.)
19611965

1962-
! This call sends internal fates variables into the
1963-
! output boundary condition structures. Note: this is called
1964-
! internally in fates dynamics as well.
1965-
1966-
call FluxIntoLitterPools(this%fates(nc)%sites(s), &
1967-
this%fates(nc)%bc_in(s), &
1968-
this%fates(nc)%bc_out(s))
1969-
19701966
end do
19711967

19721968
if(use_fates_sp)then
@@ -2214,13 +2210,6 @@ subroutine init_coldstart(this, canopystate_inst, soilstate_inst, frictionvel_in
22142210
this%fates(nc)%bc_out(s), &
22152211
is_restarting = .false.)
22162212

2217-
! This call sends internal fates variables into the
2218-
! output boundary condition structures. Note: this is called
2219-
! internally in fates dynamics as well.
2220-
2221-
call FluxIntoLitterPools(this%fates(nc)%sites(s), &
2222-
this%fates(nc)%bc_in(s), &
2223-
this%fates(nc)%bc_out(s))
22242213
end do
22252214

22262215
! ------------------------------------------------------------------------

0 commit comments

Comments
 (0)