Skip to content

Commit

Permalink
Merge pull request #11 from glemieux/xu-pr554-flush-adjust
Browse files Browse the repository at this point in the history
Add stem drop fraction check for flushing
  • Loading branch information
xuchongang authored Feb 4, 2020
2 parents b9a5483 + ca148d0 commit ef10ec8
Showing 1 changed file with 38 additions and 18 deletions.
56 changes: 38 additions & 18 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -994,14 +994,24 @@ subroutine phenology_leafonoff(currentSite)

else

call PRTPhenologyFlush(currentCohort%prt, ipft, leaf_organ, &
store_c_transfer_frac*currentCohort%laimemory/totalmemory)
! Check that the stem drop fraction is set to non-zero amount otherwise flush all carbon store to leaves
if (stem_drop_fraction .gt. 0.0_r8) then

call PRTPhenologyFlush(currentCohort%prt, ipft, sapw_organ, &
store_c_transfer_frac*currentCohort%sapwmemory/totalmemory)
call PRTPhenologyFlush(currentCohort%prt, ipft, leaf_organ, &
store_c_transfer_frac*currentCohort%laimemory/totalmemory)

call PRTPhenologyFlush(currentCohort%prt, ipft, struct_organ, &
store_c_transfer_frac*currentCohort%structmemory/totalmemory)
call PRTPhenologyFlush(currentCohort%prt, ipft, sapw_organ, &
store_c_transfer_frac*currentCohort%sapwmemory/totalmemory)

call PRTPhenologyFlush(currentCohort%prt, ipft, struct_organ, &
store_c_transfer_frac*currentCohort%structmemory/totalmemory)

else

call PRTPhenologyFlush(currentCohort%prt, ipft, leaf_organ, &
store_c_transfer_frac)

end if

currentCohort%laimemory = 0.0_r8
currentCohort%structmemory = 0.0_r8
Expand Down Expand Up @@ -1048,7 +1058,7 @@ subroutine phenology_leafonoff(currentSite)
call PRTDeciduousTurnover(currentCohort%prt,ipft, &
struct_organ, stem_drop_fraction)

endif
endif ! woody plant check
endif ! individual dbh size check
endif !leaf status
endif !currentSite status
Expand Down Expand Up @@ -1078,9 +1088,9 @@ subroutine phenology_leafonoff(currentSite)

if(EDPftvarcon_inst%woody(ipft).ne.itrue)then

totalmemory=currentCohort%laimemory+currentCohort%sapwmemory+currentCohort%structmemory
store_c_transfer_frac = min(EDPftvarcon_inst%phenflush_fraction(ipft)* &
totalmemory, store_c)/store_c
totalmemory=currentCohort%laimemory+currentCohort%sapwmemory+currentCohort%structmemory
store_c_transfer_frac = min(EDPftvarcon_inst%phenflush_fraction(ipft)* &
totalmemory, store_c)/store_c

endif

Expand All @@ -1098,21 +1108,31 @@ subroutine phenology_leafonoff(currentSite)
currentCohort%laimemory = 0.0_r8

else

call PRTPhenologyFlush(currentCohort%prt, ipft, leaf_organ, &
store_c_transfer_frac*currentCohort%laimemory/totalmemory)

call PRTPhenologyFlush(currentCohort%prt, ipft, sapw_organ, &
store_c_transfer_frac*currentCohort%sapwmemory/totalmemory)
! Check that the stem drop fraction is set to non-zero amount otherwise flush all carbon store to leaves
if (stem_drop_fraction .gt. 0.0_r8) then

call PRTPhenologyFlush(currentCohort%prt, ipft, leaf_organ, &
store_c_transfer_frac*currentCohort%laimemory/totalmemory)

call PRTPhenologyFlush(currentCohort%prt, ipft, sapw_organ, &
store_c_transfer_frac*currentCohort%sapwmemory/totalmemory)

call PRTPhenologyFlush(currentCohort%prt, ipft, struct_organ, &
store_c_transfer_frac*currentCohort%structmemory/totalmemory)

else

call PRTPhenologyFlush(currentCohort%prt, ipft, leaf_organ, &
store_c_transfer_frac)

call PRTPhenologyFlush(currentCohort%prt, ipft, struct_organ, &
store_c_transfer_frac*currentCohort%structmemory/totalmemory)
end if

currentCohort%laimemory = 0.0_r8
currentCohort%structmemory = 0.0_r8
currentCohort%sapwmemory = 0.0_r8

endif
endif ! woody plant check
endif !currentCohort status again?
endif !currentSite status

Expand Down

0 comments on commit ef10ec8

Please sign in to comment.