Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add n_term_mort_types to the fates_maxElementsPerSite calculation to resolve potential restart indexing issues #1189

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion main/FatesInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module FatesInterfaceMod
use FatesConstantsMod , only : n_landuse_cats
use FatesConstantsMod , only : primaryland
use FatesConstantsMod , only : secondaryland
use FatesConstantsMod , only : n_term_mort_types
use FatesGlobals , only : fates_global_verbose
use FatesGlobals , only : fates_log
use FatesGlobals , only : endrun => fates_endrun
Expand Down Expand Up @@ -877,7 +878,7 @@ subroutine SetFatesGlobalElements2(use_fates)
end if

fates_maxElementsPerSite = max(fates_maxPatchesPerSite * fates_maxElementsPerPatch, &
numWatermem*numpft, num_vegtemp_mem, num_elements, nlevsclass*numpft)
numWatermem*numpft, num_vegtemp_mem, num_elements, nlevsclass*numpft*n_term_mort_types)

if(hlm_use_planthydro==itrue)then
fates_maxElementsPerSite = max(fates_maxElementsPerSite, nshell*nlevsoi_hyd_max )
Expand Down