Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e60762c
First step towards separating the calculation of averaged/cumulative …
mpaiao Apr 10, 2025
4069686
Update the code for obtaining the average temperature, so it is in li…
mpaiao Apr 10, 2025
4b5d5ee
Missing variable declaration for loop counter.
mpaiao Apr 11, 2025
9b3b5f8
Loading nearzero.
mpaiao Apr 11, 2025
59aa4cf
Added numpft to the list of parameters to be loaded.
mpaiao Apr 11, 2025
7d76245
Fix missing calls to moisture memory update, and added documentation …
mpaiao Apr 14, 2025
340e190
Remove variables that are no longer used in sub-routine phenology.
mpaiao Apr 17, 2025
72246d9
Remove unused parameter from FatesCumulativeMemoryMod.F90
mpaiao Apr 18, 2025
041d914
Temporary commit so I can fix a bug in another pull request.
mpaiao Apr 15, 2025
8f8753d
Updated several site-level variables related to cold-deciduous phenol…
mpaiao Apr 15, 2025
93c3b51
This commit turns several variables and parameters associated with se…
mpaiao Apr 17, 2025
7b0bf8b
Remove code that handled formerly global cold deciduous parameters fr…
mpaiao Apr 17, 2025
4e9e9c8
Fixed names for a few variables in FatesHistoryInterfaceMod.F90
mpaiao Apr 17, 2025
2eff124
Fix missing multiline command marker
mpaiao Apr 17, 2025
7e5596e
Fix typo in PRTParamsFATESMod.F90
mpaiao Apr 17, 2025
8dc02aa
Fix typo in the loop name.
mpaiao Apr 18, 2025
ca21d01
Reverted incorrect update to phenology date, which is not defined by …
mpaiao Apr 18, 2025
67d34c4
Temporary commit before I simplify the phenology variables.
mpaiao Apr 19, 2025
2f21b8f
Consolidate phenological variables to a single set that can be used b…
mpaiao Apr 20, 2025
7faaefd
Fix typo
mpaiao Apr 20, 2025
d06cfbd
Temporary commit, to merge the branch linked to #1355 to this branch.
mpaiao Apr 21, 2025
a7181f4
This PR replaces the multiple leaf phenological habit flags with a si…
mpaiao Mar 10, 2025
4308427
Update several tests in PRTParamsFATESMod.F90 to comply with the sing…
mpaiao Mar 10, 2025
4655e06
Load flag for season deciduous PFT to the mortality function module.
mpaiao Mar 10, 2025
7bc8f58
Fix forgotten endif when transitioning to select case.
mpaiao Mar 10, 2025
3ae4837
Fix another bug in the if/select case transition.
mpaiao Mar 10, 2025
8e13312
Removed fates_phen_evergreen that was left in fates_params_default.cdl
mpaiao Mar 10, 2025
244c35c
Replace if statement with select case, following @glemieux's suggestion.
mpaiao Mar 24, 2025
f96f2ff
This commit introduces multiple changes in the phenology code aiming …
mpaiao Apr 23, 2025
e815b8e
Delete code that reappeared in sub-routine phenology. I am not sure w…
mpaiao May 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Module EDCohortDynamicsMod
use PRTGenericMod , only : num_elements
use FatesConstantsMod , only : leaves_off
use FatesConstantsMod , only : leaves_shedding
use FatesConstantsMod , only : ihard_season_decid
use FatesConstantsMod , only : ihard_stress_decid
use FatesConstantsMod , only : isemi_stress_decid
use EDParamsMod , only : ED_val_cohort_age_fusion_tol
Expand Down Expand Up @@ -1389,10 +1390,10 @@ subroutine DamageRecovery(csite,cpatch,ccohort,newly_recovered)

!--- Set some logical flags to simplify "if" blocks
is_hydecid_dormant = &
any(prt_params%stress_decid(ipft) == [ihard_stress_decid,isemi_stress_decid] ) &
any(prt_params%phen_leaf_habit(ipft) == [ihard_stress_decid,isemi_stress_decid] ) &
.and. any(ccohort%status_coh == [leaves_off,leaves_shedding] )
is_sedecid_dormant = &
( prt_params%season_decid(ipft) == itrue ) &
( prt_params%phen_leaf_habit(ipft) == ihard_season_decid ) &
.and. any(ccohort%status_coh == [leaves_off,leaves_shedding] )

! If plants are drought deciduous and are losing or lost all leaves, they cannot
Expand Down
9 changes: 4 additions & 5 deletions biogeochem/EDMortalityFunctionsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module EDMortalityFunctionsMod
use FatesConstantsMod , only : cstarvation_model_lin
use FatesConstantsMod , only : cstarvation_model_exp
use FatesConstantsMod , only : nearzero
use FatesConstantsMod , only : ihard_season_decid
use FatesConstantsMod , only : ihard_stress_decid
use FatesConstantsMod , only : isemi_stress_decid
use FatesConstantsMod , only : leaves_off
Expand Down Expand Up @@ -112,11 +113,9 @@ subroutine mortality_rates( cohort_in,bc_in, btran_ft, mean_temp, &
! the future we could accelerate senescence to avoid mortality. Note that both drought
! deciduous and cold deciduous are considered here to be consistent with the idea that
! plants without leaves cannot die of hydraulic failure.
is_decid_dormant = & !
( prt_params%stress_decid(cohort_in%pft) == ihard_stress_decid .or. & ! Drought deciduous
prt_params%stress_decid(cohort_in%pft) == isemi_stress_decid .or. & ! Semi-deciduous
prt_params%season_decid(cohort_in%pft) == itrue ) .and. & ! Cold deciduous
( cohort_in%status_coh == leaves_off ) ! ! Fully abscised
is_decid_dormant = & !
any ( prt_params%phen_leaf_habit(cohort_in%pft) == [ihard_season_decid,ihard_stress_decid,isemi_stress_decid]) .and. & ! Deciduous
( cohort_in%status_coh == leaves_off ) ! ! Fully abscised

! Size Dependent Senescence
! rate (r) and inflection point (ip) define the increase in mortality rate with dbh
Expand Down
861 changes: 419 additions & 442 deletions biogeochem/EDPhysiologyMod.F90

Large diffs are not rendered by default.

32 changes: 3 additions & 29 deletions functional_unit_testing/parteh/PartehDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,35 +176,9 @@ def main():
for iplnt in range(num_plants):

ipft = use_pfts[iplnt]
evergreen = np.int(fates_params['evergreen'].data[ipft])
cold_deciduous = np.int(fates_params['season_decid'].data[ipft])
stress_deciduous = np.int(fates_params['stress_decid'].data[ipft])
if(evergreen==1):
if(cold_deciduous==1):
print("Poorly defined phenology mode 0")
exit(2)
if(stress_deciduous==1):
print("Poorly defined phenology mode 1")
exit(2)
phen_type.append(1)
elif(cold_deciduous==1):
if(evergreen==1):
print("Poorly defined phenology mode 2")
exit(2)
if(stress_deciduous==1):
print("Poorly defined phenology mode 3")
exit(2)
phen_type.append(2)
elif(stress_deciduous==1):
if(evergreen==1):
print("Poorly defined phenology mode 4")
exit(2)
if(cold_deciduous==1):
print("Poorly defined phenology mode 5")
exit(2)
phen_type.append(3)
else:
print("Unknown phenology mode ? {} {} {}".format(evergreen,cold_deciduous,stress_deciduous))
phen_leaf_habit = np.int(fates_params['phen_leaf_habit'].data[ipft])
if(phen_leaf_habit < 1 or phen_leaf_habit > 4):
print("Unknown phenology mode ? {}".format(phen_leaf_habit))
exit(2)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@

<parteh_parameters >
<pft_par name="parteh_model "> 1 , 1 , 2 , 2 , 2 </pft_par>
<pft_par name="fates_phen_evergreen "> 1 , 0 , 1 , 0 , 0</pft_par>
<pft_par name="fates_phen_season_decid "> 0 , 1 , 0 , 1 , 1</pft_par>
<pft_par name="fates_phen_stress_decid "> 0 , 0 , 0 , 0 , 0</pft_par>
<pft_par name="fates_phen_leaf_habit "> 1 , 2 , 1 , 2 , 2</pft_par>
<pft_par name="fates_seed_alloc "> 0.2 , 0.2 , 0.2 , 0.2 , 0.2</pft_par>
<pft_par name="fates_seed_alloc_mature "> 0.2 , 0.2, 0.2, 0.2, 0.2 </pft_par>
<pft_par name="fates_dbh_repro_threshold "> 30.0 , 30.0 , 30.0, 30.0 , 30.0 </pft_par>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@

<parteh_parameters >
<pft_par name="parteh_model "> 1 , 2 , 2 , 2 , 2 </pft_par>
<pft_par name="fates_phen_evergreen "> 1 , 1 , 1 , 1 , 1</pft_par>
<pft_par name="fates_phen_season_decid "> 0 , 0 , 0 , 0 , 0</pft_par>
<pft_par name="fates_phen_stress_decid "> 0 , 0 , 0 , 0 , 0</pft_par>
<pft_par name="fates_phen_leaf_habit "> 1 , 1 , 1 , 1 , 1</pft_par>
<pft_par name="fates_seed_alloc "> 0.2 , 0.2 , 0.2 , 0.2 , 0.2</pft_par>
<pft_par name="fates_seed_alloc_mature "> 0.2 , 0.2, 0.2, 0.2, 0.2 </pft_par>
<pft_par name="fates_dbh_repro_threshold "> 30.0 , 30.0 , 30.0, 30.0 , 30.0 </pft_par>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<parteh_parameters >
<pft_par name="parteh_model "> 1 , 2 , 2 </pft_par>
<pft_par name="fates_phen_evergreen "> 1 , 1, 1 </pft_par>
<pft_par name="fates_phen_leaf_habit "> 1 , 1, 1 </pft_par>
<pft_par name="fates_seed_alloc "> 0.2 , 0.2, 0.2 </pft_par>
<pft_par name="fates_seed_alloc_mature "> 0.2 , 0.2 , 0.2 </pft_par>
<pft_par name="fates_dbh_repro_threshold "> 30.0 , 30.0 , 30.0 </pft_par>
Expand Down
Loading