Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 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
075a802
Updated the running average functionality so it can be also used for …
mpaiao May 14, 2025
c0e2081
Fixed a few bugs and reverted the renaming of one sub-routine to avoi…
mpaiao May 14, 2025
18ad66d
Adding the updates for the reportable minima and maxima.
mpaiao May 14, 2025
f8bb8e0
Added intent(in) for code best practices.
mpaiao May 14, 2025
836e99c
Merge branch 'mpaiao-pr-rsummary' into mpaiao-pr-decid-btran
mpaiao May 15, 2025
9f535a9
This commit revises the drought deciduous phenology thresholds. This …
mpaiao May 21, 2025
c06e476
Fixed some duplicated entry for the same parameter in the parameter f…
mpaiao May 23, 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
6 changes: 3 additions & 3 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ subroutine DemoteFromLayer(currentSite,currentPatch,i_lyr,bc_in)
!!allocate(copyc%l2fr_ema)
! Note, no need to give a starter value here,
! that will be taken care of in copy()
!!call copyc%l2fr_ema%InitRMean(ema_60day)
!!call copyc%l2fr_ema%InitRSumm(ema_60day)

! Initialize the PARTEH object and point to the
! correct boundary condition fields
Expand Down Expand Up @@ -1157,7 +1157,7 @@ subroutine PromoteIntoLayer(currentSite,currentPatch,i_lyr)
!!allocate(copyc%l2fr_ema)
! Note, no need to give a starter value here,
! that will be taken care of in copy()
!!call copyc%l2fr_ema%InitRMean(ema_60day)
!!call copyc%l2fr_ema%InitRSumm(ema_60day)

! Initialize the PARTEH object and point to the
! correct boundary condition fields
Expand All @@ -1172,7 +1172,7 @@ subroutine PromoteIntoLayer(currentSite,currentPatch,i_lyr)
! (keep as an example)
! Initialize running means
!allocate(copyc%tveg_lpa)
!call copyc%tveg_lpa%InitRMean(ema_lpa,&
!call copyc%tveg_lpa%InitRSumm(ema_lpa,&
! init_value=currentPatch%tveg_lpa%GetMean())

call currentCohort%Copy(copyc) !makes an identical copy...
Expand Down
7 changes: 4 additions & 3 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 @@ -173,7 +174,7 @@ subroutine create_cohort(currentSite, patchptr, pft, nn, height, coage, dbh,

! (Keeping as an example)
!! allocate(newCohort%tveg_lpa)
!! call newCohort%tveg_lpa%InitRMean(ema_lpa,init_value=patchptr%tveg_lpa%GetMean())
!! call newCohort%tveg_lpa%InitRSumm(ema_lpa,init_value=patchptr%tveg_lpa%GetMean())

if (hlm_use_planthydro .eq. itrue) then

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
37 changes: 23 additions & 14 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ module EDPatchDynamicsMod
use EDParamsMod, only : logging_event_code
use EDParamsMod, only : logging_export_frac
use EDParamsMod, only : maxpatches_by_landuse
use FatesRunningMeanMod, only : ema_sdlng_mdd
use FatesRunningMeanMod, only : ema_sdlng_emerg_h2o, ema_sdlng_mort_par, ema_sdlng2sap_par
use FatesRunningMeanMod, only : ema_24hr, fixed_24hr, ema_lpa, ema_longterm
use FatesRunningSummMod, only : ema_sdlng_mdd
use FatesRunningSummMod, only : ema_sdlng_emerg_h2o, ema_sdlng_mort_par, ema_sdlng2sap_par
use FatesRunningSummMod, only : ema_24hr, fixed_24hr, ema_lpa, ema_longterm
use FatesRadiationMemMod, only : num_swb

! CIME globals
Expand Down Expand Up @@ -808,7 +808,7 @@ subroutine spawn_patches( currentSite, bc_in)
! (Keeping as an example)
! Allocate running mean functions
!allocate(nc%tveg_lpa)
!call nc%tveg_lpa%InitRMean(ema_lpa,init_value=newPatch%tveg_lpa%GetMean())
!call nc%tveg_lpa%InitRSumm(ema_lpa,init_value=newPatch%tveg_lpa%GetMean())

call nc%ZeroValues()

Expand Down Expand Up @@ -1701,7 +1701,7 @@ subroutine split_patch(currentSite, currentPatch, new_patch, fraction_to_keep, a
! (Keeping as an example)
! Allocate running mean functions
!allocate(nc%tveg_lpa)
!call nc%tveg_lpa%InitRMean(ema_lpa,init_value=new_patch%tveg_lpa%GetMean())
!call nc%tveg_lpa%InitRSumm(ema_lpa,init_value=new_patch%tveg_lpa%GetMean())

call nc%ZeroValues()

Expand Down Expand Up @@ -3183,21 +3183,26 @@ subroutine fuse_2_patches(csite, dp, rp)
call endrun(msg=errMsg(sourcefile, __LINE__))
endif

! Weighted mean of the running means
call rp%tveg24%FuseRMean(dp%tveg24,rp%area*inv_sum_area)
call rp%tveg_lpa%FuseRMean(dp%tveg_lpa,rp%area*inv_sum_area)
! Weighted mean of the running summaries
call rp%tveg24%FuseRSumm(dp%tveg24,rp%area*inv_sum_area)
call rp%tveg_lpa%FuseRSumm(dp%tveg_lpa,rp%area*inv_sum_area)

do pft = 1,numpft
call rp%btran24_ft(pft)%p%FuseRSumm(dp%btran24_ft(pft)%p,rp%area*inv_sum_area)
enddo


if ( hlm_regeneration_model == TRS_regeneration ) then
call rp%seedling_layer_par24%FuseRMean(dp%seedling_layer_par24,rp%area*inv_sum_area)
call rp%sdlng_mort_par%FuseRMean(dp%sdlng_mort_par,rp%area*inv_sum_area)
call rp%sdlng2sap_par%FuseRMean(dp%sdlng2sap_par,rp%area*inv_sum_area)
call rp%seedling_layer_par24%FuseRSumm(dp%seedling_layer_par24,rp%area*inv_sum_area)
call rp%sdlng_mort_par%FuseRSumm(dp%sdlng_mort_par,rp%area*inv_sum_area)
call rp%sdlng2sap_par%FuseRSumm(dp%sdlng2sap_par,rp%area*inv_sum_area)
do pft = 1,numpft
call rp%sdlng_emerg_smp(pft)%p%FuseRMean(dp%sdlng_emerg_smp(pft)%p,rp%area*inv_sum_area)
call rp%sdlng_mdd(pft)%p%FuseRMean(dp%sdlng_mdd(pft)%p,rp%area*inv_sum_area)
call rp%sdlng_emerg_smp(pft)%p%FuseRSumm(dp%sdlng_emerg_smp(pft)%p,rp%area*inv_sum_area)
call rp%sdlng_mdd(pft)%p%FuseRSumm(dp%sdlng_mdd(pft)%p,rp%area*inv_sum_area)
enddo
end if

call rp%tveg_longterm%FuseRMean(dp%tveg_longterm,rp%area*inv_sum_area)
call rp%tveg_longterm%FuseRSumm(dp%tveg_longterm,rp%area*inv_sum_area)

rp%livegrass = (dp%livegrass*dp%area + rp%livegrass*rp%area) * inv_sum_area
rp%ros_front = (dp%ros_front*dp%area + rp%ros_front*rp%area) * inv_sum_area
Expand Down Expand Up @@ -3811,6 +3816,10 @@ subroutine CopyPatchMeansTimers(dp, rp)
call rp%tveg_lpa%CopyFromDonor(dp%tveg_lpa)
call rp%tveg_longterm%CopyFromDonor(dp%tveg_longterm)

do ipft = 1,numpft
call rp%btran24_ft(ipft)%p%CopyFromDonor(dp%btran24_ft(ipft)%p)
end do

if ( hlm_regeneration_model == TRS_regeneration ) then
call rp%seedling_layer_par24%CopyFromDonor(dp%seedling_layer_par24)
call rp%sdlng_mort_par%CopyFromDonor(dp%sdlng_mort_par)
Expand Down
Loading