Skip to content

Commit

Permalink
Merge pull request #1189 from glemieux/spmode-restart-indexing-hotfix
Browse files Browse the repository at this point in the history
Add `n_term_mort_types` to the `fates_maxElementsPerSite` calculation to resolve potential restart indexing issues
  • Loading branch information
glemieux authored Apr 22, 2024
2 parents 43c490d + 3621cb0 commit 5284bd0
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 5284bd0

Please sign in to comment.