@@ -13,7 +13,7 @@ module EDPhysiologyMod
1313 use FatesInterfaceTypesMod, only : hlm_day_of_year
1414 use FatesInterfaceTypesMod, only : numpft
1515 use FatesInterfaceTypesMod, only : nleafage
16- use FatesInterfaceTypesMod, only : hlm_use_planthydro
16+ use FatesInterfaceTypesMod, only : hlm_use_planthydro,hlm_use_hydrohard
1717 use FatesInterfaceTypesMod, only : hlm_parteh_mode
1818 use FatesInterfaceTypesMod, only : hlm_use_fixed_biogeog
1919 use FatesInterfaceTypesMod, only : hlm_use_nocomp
@@ -1108,11 +1108,11 @@ subroutine phenology_leafonoff(currentSite)
11081108 ! COLD LEAF ON
11091109 ! The site level flags signify that it is no-longer too cold
11101110 ! for leaves. Time to signal flushing
1111-
11121111 if (prt_params% season_decid(ipft) == itrue)then
1112+ if (hlm_use_hydrohard .eq. itrue) then
11131113 if ( currentSite% cstatus == phen_cstat_notcold )then ! we have just moved to leaves being on .
1114- ! max_h=min(max(EDPftvarcon_inst%freezetol(currentCohort%pft),max(currentSite%hardtemp,-60._r8)-10._r8),-2._r8)
1115- ! if ( currentSite%hard_level2(ipft) > max_h/2._r8)then ! we have just moved to leaves being on . marius
1114+ max_h= min (max (EDPftvarcon_inst% freezetol(currentCohort% pft),max (currentSite% hardtemp,- 60._r8 )- 10._r8 ),- 2._r8 )
1115+ if ( currentSite% hard_level2(ipft) > max_h/ 2._r8 )then ! we have just moved to leaves being on . marius
11161116 if (currentCohort% status_coh == leaves_off)then ! Are the leaves currently off?
11171117 currentCohort% status_coh = leaves_on ! Leaves are on, so change status to
11181118 ! stop flow of carbon out of bstore.
@@ -1168,8 +1168,70 @@ subroutine phenology_leafonoff(currentSite)
11681168
11691169 endif
11701170 endif ! pft phenology
1171- ! endif !marius
1171+ endif ! marius
11721172 endif ! growing season
1173+ else ! marius
1174+ if ( currentSite% cstatus == phen_cstat_notcold )then ! we have just moved to leaves being on .
1175+ if (currentCohort% status_coh == leaves_off)then ! Are the leaves currently off?
1176+ currentCohort% status_coh = leaves_on ! Leaves are on, so change status to
1177+ ! stop flow of carbon out of bstore.
1178+
1179+ if (store_c> nearzero) then
1180+ ! flush either the amount required from the laimemory, or -most- of the storage pool
1181+ ! RF: added a criterion to stop the entire store pool emptying and triggering termination mortality
1182+ ! n.b. this might not be necessary if we adopted a more gradual approach to leaf flushing...
1183+ store_c_transfer_frac = min ((EDPftvarcon_inst% phenflush_fraction(ipft)* &
1184+ currentCohort% laimemory)/ store_c,(1.0_r8 - carbon_store_buffer))
1185+
1186+ if (prt_params% woody(ipft).ne. itrue)then
1187+ totalmemory= currentCohort% laimemory+ currentCohort% sapwmemory+ currentCohort% structmemory
1188+ store_c_transfer_frac = min ((EDPftvarcon_inst% phenflush_fraction(ipft)* &
1189+ totalmemory)/ store_c, (1.0_r8 - carbon_store_buffer))
1190+ endif
1191+
1192+ else
1193+ store_c_transfer_frac = 0.0_r8
1194+ end if
1195+
1196+ ! This call will request that storage carbon will be transferred to
1197+ ! leaf tissues. It is specified as a fraction of the available storage
1198+ if (prt_params% woody(ipft) == itrue) then
1199+
1200+ call PRTPhenologyFlush(currentCohort% prt, ipft, leaf_organ, store_c_transfer_frac)
1201+ currentCohort% laimemory = 0.0_r8
1202+
1203+ else
1204+
1205+ ! Check that the stem drop fraction is set to non-zero amount otherwise flush all carbon store to leaves
1206+ if (stem_drop_fraction .gt. 0.0_r8 ) then
1207+
1208+ call PRTPhenologyFlush(currentCohort% prt, ipft, leaf_organ, &
1209+ store_c_transfer_frac* currentCohort% laimemory/ totalmemory)
1210+
1211+ call PRTPhenologyFlush(currentCohort% prt, ipft, sapw_organ, &
1212+ store_c_transfer_frac* currentCohort% sapwmemory/ totalmemory)
1213+
1214+ call PRTPhenologyFlush(currentCohort% prt, ipft, struct_organ, &
1215+ store_c_transfer_frac* currentCohort% structmemory/ totalmemory)
1216+
1217+ else
1218+
1219+ call PRTPhenologyFlush(currentCohort% prt, ipft, leaf_organ, &
1220+ store_c_transfer_frac)
1221+
1222+ end if
1223+
1224+ currentCohort% laimemory = 0.0_r8
1225+ currentCohort% structmemory = 0.0_r8
1226+ currentCohort% sapwmemory = 0.0_r8
1227+
1228+ endif
1229+ endif ! pft phenology
1230+ endif ! growing season
1231+ endif ! marius
1232+
1233+
1234+
11731235
11741236 ! COLD LEAF OFF
11751237 if (currentSite% cstatus == phen_cstat_nevercold .or. &
0 commit comments