@@ -67,6 +67,8 @@ module EDPhysiologyMod
6767 use EDParamsMod , only : nclmax
6868 use EDTypesMod , only : AREA,AREA_INV
6969 use FatesConstantsMod , only : leaves_shedding
70+ use FatesConstantsMod , only : ievergreen
71+ use FatesConstantsMod , only : ihard_season_decid
7072 use FatesConstantsMod , only : ihard_stress_decid
7173 use FatesConstantsMod , only : isemi_stress_decid
7274 use EDParamsMod , only : nlevleaf
@@ -766,20 +768,21 @@ subroutine trim_canopy( currentSite )
766768 sla_levleaf = min (sla_max,prt_params% slatop(ipft)/ nscaler_levleaf)
767769
768770 ! Find the realised leaf lifespan, depending on the leaf phenology.
769- if (prt_params% season_decid(ipft) == itrue) then
771+ select case (prt_params% phen_leaf_habit(ipft))
772+ case (ihard_season_decid)
770773 ! Cold-deciduous costs. Assume time-span to be 1 year to be consistent
771774 ! with FATES default
772775 pft_leaf_lifespan = decid_leaf_long_max
773776
774- elseif ( any (prt_params % stress_decid(ipft) == [ ihard_stress_decid,isemi_stress_decid]) ) then
777+ case ( ihard_stress_decid,isemi_stress_decid)
775778 ! Drought-decidous costs. Assume time-span to be the least between
776779 ! 1 year and the life span provided by the parameter file.
777780 pft_leaf_lifespan = &
778781 min (decid_leaf_long_max,leaf_long)
779782
780- else ! evergreen costs
783+ case (ievergreen) ! evergreen costs
781784 pft_leaf_lifespan = leaf_long
782- end if
785+ end select
783786
784787 ! Leaf cost at leaf level z (kgC m-2 year-1) accounting for sla profile
785788 ! (Convert from SLA in m2g-1 to m2kg-1)
@@ -1289,7 +1292,7 @@ subroutine phenology( currentSite, bc_in )
12891292 ! the leaf biomass will be capped at 40% of the biomass the cohort would have if
12901293 ! it were in well-watered conditions.
12911294 !- --~---
1292- case_drought_phen: select case (prt_params% stress_decid (ipft))
1295+ case_drought_phen: select case (prt_params% phen_leaf_habit (ipft))
12931296 case (ihard_stress_decid)
12941297 !- --~---
12951298 ! Default ("hard") drought deciduous phenology. The decision on whether to
@@ -1508,11 +1511,11 @@ subroutine phenology( currentSite, bc_in )
15081511
15091512 ! Assign elongation factors for non-drought deciduous PFTs, which will be used
15101513 ! to define the cohort status.
1511- case_cold_phen: select case (prt_params% season_decid (ipft))
1512- case (ifalse )
1514+ case_cold_phen: select case (prt_params% phen_leaf_habit (ipft))
1515+ case (ievergreen )
15131516 ! Evergreen, ensure that elongation factor is always one.
15141517 currentSite% elong_factor(ipft) = 1.0_r8
1515- case (itrue )
1518+ case (ihard_season_decid )
15161519 ! Cold-deciduous. Define elongation factor based on cold status
15171520 select case (currentSite% cstatus)
15181521 case (phen_cstat_nevercold,phen_cstat_iscold)
@@ -1611,7 +1614,8 @@ subroutine phenology_leafonoff(currentSite)
16111614 ! MLO. To avoid duplicating code for drought and cold deciduous PFTs, we first
16121615 ! check whether or not it's time to flush or time to shed leaves, then
16131616 ! use a common code for flushing or shedding leaves.
1614- is_time_block: if (prt_params% season_decid(ipft) == itrue) then ! Cold deciduous
1617+ is_time_block: select case (prt_params% phen_leaf_habit(ipft))
1618+ case (ihard_season_decid) ! Cold deciduous
16151619
16161620 ! A. Is this the time for COLD LEAVES to switch to ON?
16171621 is_flushing_time = ( currentSite% cstatus == phen_cstat_notcold .and. & ! We just moved to leaves being on
@@ -1622,7 +1626,7 @@ subroutine phenology_leafonoff(currentSite)
16221626 ( currentCohort% dbh > EDPftvarcon_inst% phen_cold_size_threshold(ipft) .or. & ! Grasses are big enough or...
16231627 prt_params% woody(ipft) == itrue ) ! this is a woody PFT.
16241628
1625- elseif ( any (prt_params % stress_decid(ipft) == [ ihard_stress_decid,isemi_stress_decid]) ) then ! Drought deciduous
1629+ case ( ihard_stress_decid,isemi_stress_decid) ! Drought deciduous
16261630
16271631 ! A. Is this the time for DROUGHT LEAVES to switch to ON?
16281632 is_flushing_time = any ( currentSite% dstatus(ipft) == [phen_dstat_moiston,phen_dstat_timeon] ) .and. & ! Leaf flushing time (moisture or time)
@@ -1631,11 +1635,11 @@ subroutine phenology_leafonoff(currentSite)
16311635 ! This will be true when leaves are abscissing (partially or fully) due to moisture or time
16321636 is_shedding_time = any ( currentSite% dstatus(ipft) == [phen_dstat_moistoff,phen_dstat_timeoff,phen_dstat_pshed] ) .and. &
16331637 any ( currentCohort% status_coh == [leaves_on,leaves_shedding] )
1634- else
1638+ case (ievergreen)
16351639 ! This PFT is not deciduous.
16361640 is_flushing_time = .false.
16371641 is_shedding_time = .false.
1638- end if is_time_block
1642+ end select is_time_block
16391643
16401644
16411645
@@ -2421,19 +2425,17 @@ subroutine SeedGermination( litt, cold_stat, drought_stat, bc_in, currentPatch )
24212425 litt% seed_germ_in(pft) = litt% seed(pft) * seedling_emerg_rate
24222426
24232427 end if if_tfs_or_def
2424-
2425- ! set the germination only under the growing season...c.xu
24262428
2427- if ((prt_params% season_decid(pft) == itrue ) .and. &
2428- (any (cold_stat == [phen_cstat_nevercold,phen_cstat_iscold]))) then
2429- ! no germination for all PFTs when cold
2430- litt% seed_germ_in(pft) = 0.0_r8
2431- endif
2432-
2433- ! Drought deciduous, halt germination when status is shedding, even leaves are not
2434- ! completely abscissed. MLO
2435- select case (prt_params% stress_decid(pft))
2429+ select case (prt_params% phen_leaf_habit(pft))
2430+ case (ihard_season_decid)
2431+ ! set the germination only under the growing season...c.xu
2432+ if (any (cold_stat == [phen_cstat_nevercold,phen_cstat_iscold])) then
2433+ ! no germination for all PFTs when cold
2434+ litt% seed_germ_in(pft) = 0.0_r8
2435+ end if
24362436 case (ihard_stress_decid,isemi_stress_decid)
2437+ ! Drought deciduous, halt germination when status is shedding, even leaves are not
2438+ ! completely abscissed. MLO
24372439 if (any (drought_stat(pft) == [phen_dstat_timeoff,phen_dstat_moistoff,phen_dstat_pshed])) then
24382440 litt% seed_germ_in(pft) = 0.0_r8
24392441 end if
@@ -2542,23 +2544,24 @@ subroutine recruitment(currentSite, currentPatch, bc_in)
25422544 efstem_coh = 1.0_r8
25432545 leaf_status = leaves_on
25442546
2545- ! but if the plant is seasonally (cold) deciduous, and the site status is flagged
2546- ! as "cold", then set the cohort's status to leaves_off, and remember the leaf biomass
2547- if ((prt_params% season_decid(ft) == itrue) .and. &
2548- (any (currentSite% cstatus == [phen_cstat_nevercold, phen_cstat_iscold]))) then
2549- efleaf_coh = 0.0_r8
2550- effnrt_coh = 1.0_r8 - fnrt_drop_fraction
2551- efstem_coh = 1.0_r8 - stem_drop_fraction
2552- leaf_status = leaves_off
2553- end if
2554-
2555- ! Or.. if the plant is drought deciduous, make sure leaf status is consistent with the
2556- ! leaf elongation factor.
2557- ! For tissues other than leaves, the actual drop fraction is a combination of the
2558- ! elongation factor (e) and the drop fraction (x), which will ensure that the remaining
2559- ! tissue biomass will be exactly e when x=1, and exactly the original biomass when x = 0.
2560- select case (prt_params% stress_decid(ft))
2547+ ! look for cases in which leaves should be off
2548+ select case (prt_params% phen_leaf_habit(ft))
2549+ case (ihard_season_decid)
2550+ select case (currentSite% cstatus)
2551+ case (phen_cstat_nevercold, phen_cstat_iscold)
2552+ ! If the plant is seasonally (cold) deciduous, and the site status is flagged
2553+ ! as "cold", then set the cohort's status to leaves_off.
2554+ efleaf_coh = 0.0_r8
2555+ effnrt_coh = 1.0_r8 - fnrt_drop_fraction
2556+ efstem_coh = 1.0_r8 - stem_drop_fraction
2557+ leaf_status = leaves_off
2558+ end select
25612559 case (ihard_stress_decid, isemi_stress_decid)
2560+ ! If the plant is drought deciduous, make sure leaf status is consistent with the
2561+ ! leaf elongation factor.
2562+ ! For tissues other than leaves, the actual drop fraction is a combination of the
2563+ ! elongation factor (e) and the drop fraction (x), which will ensure that the remaining
2564+ ! tissue biomass will be exactly e when x=1, and exactly the original biomass when x = 0.
25622565 efleaf_coh = currentSite% elong_factor(ft)
25632566 effnrt_coh = 1.0_r8 - (1.0_r8 - efleaf_coh)* fnrt_drop_fraction
25642567 efstem_coh = 1.0_r8 - (1.0_r8 - efleaf_coh)* stem_drop_fraction
0 commit comments