@@ -66,6 +66,8 @@ module EDPhysiologyMod
6666 use EDParamsMod , only : nclmax
6767 use EDTypesMod , only : AREA,AREA_INV
6868 use FatesConstantsMod , only : leaves_shedding
69+ use FatesConstantsMod , only : ievergreen
70+ use FatesConstantsMod , only : ihard_season_decid
6971 use FatesConstantsMod , only : ihard_stress_decid
7072 use FatesConstantsMod , only : isemi_stress_decid
7173 use EDParamsMod , only : nlevleaf
@@ -769,20 +771,21 @@ subroutine trim_canopy( currentSite )
769771 sla_levleaf = min (sla_max,prt_params% slatop(ipft)/ nscaler_levleaf)
770772
771773 ! Find the realised leaf lifespan, depending on the leaf phenology.
772- if (prt_params% season_decid(ipft) == itrue) then
774+ select case (prt_params% phen_leaf_habit(ipft))
775+ case (ihard_season_decid)
773776 ! Cold-deciduous costs. Assume time-span to be 1 year to be consistent
774777 ! with FATES default
775778 pft_leaf_lifespan = decid_leaf_long_max
776779
777- elseif ( any (prt_params % stress_decid(ipft) == [ ihard_stress_decid,isemi_stress_decid]) ) then
780+ case ( ihard_stress_decid,isemi_stress_decid)
778781 ! Drought-decidous costs. Assume time-span to be the least between
779782 ! 1 year and the life span provided by the parameter file.
780783 pft_leaf_lifespan = &
781784 min (decid_leaf_long_max,leaf_long)
782785
783- else ! evergreen costs
786+ case (ievergreen) ! evergreen costs
784787 pft_leaf_lifespan = leaf_long
785- end if
788+ end select
786789
787790 ! Leaf cost at leaf level z (kgC m-2 year-1) accounting for sla profile
788791 ! (Convert from SLA in m2g-1 to m2kg-1)
@@ -1234,7 +1237,7 @@ subroutine phenology( currentSite, bc_in )
12341237 ! the leaf biomass will be capped at 40% of the biomass the cohort would have if
12351238 ! it were in well-watered conditions.
12361239 !- --~---
1237- case_drought_phen: select case (prt_params% stress_decid (ipft))
1240+ case_drought_phen: select case (prt_params% phen_leaf_habit (ipft))
12381241 case (ihard_stress_decid)
12391242 !- --~---
12401243 ! Default ("hard") drought deciduous phenology. The decision on whether to
@@ -1453,11 +1456,11 @@ subroutine phenology( currentSite, bc_in )
14531456
14541457 ! Assign elongation factors for non-drought deciduous PFTs, which will be used
14551458 ! to define the cohort status.
1456- case_cold_phen: select case (prt_params% season_decid (ipft))
1457- case (ifalse )
1459+ case_cold_phen: select case (prt_params% phen_leaf_habit (ipft))
1460+ case (ievergreen )
14581461 ! Evergreen, ensure that elongation factor is always one.
14591462 currentSite% elong_factor(ipft) = 1.0_r8
1460- case (itrue )
1463+ case (ihard_season_decid )
14611464 ! Cold-deciduous. Define elongation factor based on cold status
14621465 select case (currentSite% phen_status(ipft))
14631466 case (phen_cstat_nevercold,phen_cstat_iscold)
@@ -1556,7 +1559,8 @@ subroutine phenology_leafonoff(currentSite)
15561559 ! MLO. To avoid duplicating code for drought and cold deciduous PFTs, we first
15571560 ! check whether or not it's time to flush or time to shed leaves, then
15581561 ! use a common code for flushing or shedding leaves.
1559- is_time_block: if (prt_params% season_decid(ipft) == itrue) then ! Cold deciduous
1562+ is_time_block: select case (prt_params% phen_leaf_habit(ipft))
1563+ case (ihard_season_decid) ! Cold deciduous
15601564
15611565 ! A. Is this the time for COLD LEAVES to switch to ON?
15621566 is_flushing_time = ( currentSite% phen_status(ipft) == phen_cstat_notcold .and. & ! We just moved to leaves being on
@@ -1567,7 +1571,7 @@ subroutine phenology_leafonoff(currentSite)
15671571 ( currentCohort% dbh > EDPftvarcon_inst% phen_cold_size_threshold(ipft) .or. & ! Grasses are big enough or...
15681572 prt_params% woody(ipft) == itrue ) ! this is a woody PFT.
15691573
1570- elseif ( any (prt_params % stress_decid(ipft) == [ ihard_stress_decid,isemi_stress_decid]) ) then ! Drought deciduous
1574+ case ( ihard_stress_decid,isemi_stress_decid) ! Drought deciduous
15711575
15721576 ! A. Is this the time for DROUGHT LEAVES to switch to ON?
15731577 is_flushing_time = any ( currentSite% phen_status(ipft) == [phen_dstat_moiston,phen_dstat_timeon] ) .and. & ! Leaf flushing time (moisture or time)
@@ -1576,11 +1580,11 @@ subroutine phenology_leafonoff(currentSite)
15761580 ! This will be true when leaves are abscissing (partially or fully) due to moisture or time
15771581 is_shedding_time = any ( currentSite% phen_status(ipft) == [phen_dstat_moistoff,phen_dstat_timeoff,phen_dstat_pshed] ) .and. &
15781582 any ( currentCohort% status_coh == [leaves_on,leaves_shedding] )
1579- else
1583+ case (ievergreen)
15801584 ! This PFT is not deciduous.
15811585 is_flushing_time = .false.
15821586 is_shedding_time = .false.
1583- end if is_time_block
1587+ end select is_time_block
15841588
15851589
15861590
@@ -2365,19 +2369,17 @@ subroutine SeedGermination( litt, phen_stat, bc_in, currentPatch )
23652369 litt% seed_germ_in(pft) = litt% seed(pft) * seedling_emerg_rate
23662370
23672371 end if if_tfs_or_def
2368-
2369- ! set the germination only under the growing season...c.xu
23702372
2371- if ((prt_params% season_decid(pft) == itrue ) .and. &
2372- (any (phen_stat(pft) == [phen_cstat_nevercold,phen_cstat_iscold]))) then
2373- ! no germination for all PFTs when cold
2374- litt% seed_germ_in(pft) = 0.0_r8
2375- endif
2376-
2377- ! Drought deciduous, halt germination when status is shedding, even leaves are not
2378- ! completely abscissed. MLO
2379- select case (prt_params% stress_decid(pft))
2373+ select case (prt_params% phen_leaf_habit(pft))
2374+ case (ihard_season_decid)
2375+ ! set the germination only under the growing season...c.xu
2376+ if (any (phen_stat(pft) == [phen_cstat_nevercold,phen_cstat_iscold])) then
2377+ ! no germination for all PFTs when cold
2378+ litt% seed_germ_in(pft) = 0.0_r8
2379+ end if
23802380 case (ihard_stress_decid,isemi_stress_decid)
2381+ ! Drought deciduous, halt germination when status is shedding, even leaves are not
2382+ ! completely abscissed. MLO
23812383 if (any (phen_stat(pft) == [phen_dstat_timeoff,phen_dstat_moistoff,phen_dstat_pshed])) then
23822384 litt% seed_germ_in(pft) = 0.0_r8
23832385 end if
@@ -2486,23 +2488,24 @@ subroutine recruitment(currentSite, currentPatch, bc_in)
24862488 efstem_coh = 1.0_r8
24872489 leaf_status = leaves_on
24882490
2489- ! but if the plant is seasonally (cold) deciduous, and the site status is flagged
2490- ! as "cold", then set the cohort's status to leaves_off, and remember the leaf biomass
2491- if ((prt_params% season_decid(ft) == itrue) .and. &
2492- (any (currentSite% phen_status(ft) == [phen_cstat_nevercold, phen_cstat_iscold]))) then
2493- efleaf_coh = 0.0_r8
2494- effnrt_coh = 1.0_r8 - fnrt_drop_fraction
2495- efstem_coh = 1.0_r8 - stem_drop_fraction
2496- leaf_status = leaves_off
2497- end if
2498-
2499- ! Or.. if the plant is drought deciduous, make sure leaf status is consistent with the
2500- ! leaf elongation factor.
2501- ! For tissues other than leaves, the actual drop fraction is a combination of the
2502- ! elongation factor (e) and the drop fraction (x), which will ensure that the remaining
2503- ! tissue biomass will be exactly e when x=1, and exactly the original biomass when x = 0.
2504- select case (prt_params% stress_decid(ft))
2491+ ! look for cases in which leaves should be off
2492+ select case (prt_params% phen_leaf_habit(ft))
2493+ case (ihard_season_decid)
2494+ select case (currentSite% phen_status(ft))
2495+ case (phen_cstat_nevercold, phen_cstat_iscold)
2496+ ! If the plant is seasonally (cold) deciduous, and the site status is flagged
2497+ ! as "cold", then set the cohort's status to leaves_off.
2498+ efleaf_coh = 0.0_r8
2499+ effnrt_coh = 1.0_r8 - fnrt_drop_fraction
2500+ efstem_coh = 1.0_r8 - stem_drop_fraction
2501+ leaf_status = leaves_off
2502+ end select
25052503 case (ihard_stress_decid, isemi_stress_decid)
2504+ ! If the plant is drought deciduous, make sure leaf status is consistent with the
2505+ ! leaf elongation factor.
2506+ ! For tissues other than leaves, the actual drop fraction is a combination of the
2507+ ! elongation factor (e) and the drop fraction (x), which will ensure that the remaining
2508+ ! tissue biomass will be exactly e when x=1, and exactly the original biomass when x = 0.
25062509 efleaf_coh = currentSite% elong_factor(ft)
25072510 effnrt_coh = 1.0_r8 - (1.0_r8 - efleaf_coh)* fnrt_drop_fraction
25082511 efstem_coh = 1.0_r8 - (1.0_r8 - efleaf_coh)* stem_drop_fraction
0 commit comments