ckoven / fates

repository for the Functionally Assembled Terrestrial Ecosystem Simulator (FATES)
Other
0 stars 0 forks source link

Fix logic check for `hlm_use_potentialveg` and some patch pointer bugs #17

Closed glemieux closed 10 months ago

glemieux commented 10 months ago

Description:

The first commit makes the bug fix to check against ifalse since hlm_use_potentialveg is not a boolean.

The second commit is my attempt to start bug fixing issues I was running into in spawn_patches. I'm not sure if they are a good solution, but figured I'd offer them up for review:

Note that this still is failing run with the following error, which I think is due to there being a division by zero due to nocomp_pft_area_vector having a zero in it:

128: Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
128:
128: Backtrace for this error:
128: #0  0x153cb2eaddbf in ???
128: #1  0x19c2e93 in __edpatchdynamicsmod_MOD_spawn_patches
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/components/elm/src/external_models/fates/biogeochem/EDPatchDynamicsMod.F90:1390
128: #2  0x1748f2c in __edmainmod_MOD_ed_ecosystem_dynamics
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/components/elm/src/external_models/fates/main/EDMainMod.F90:296
128: #3  0x7865c4 in __elmfatesinterfacemod_MOD_dynamics_driv
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/components/elm/src/main/elmfates_interfaceMod.F90:1121
128: #4  0x687e3d in __elm_driver_MOD_elm_drv
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/components/elm/src/main/elm_driver.F90:1290
128: #5  0x650987 in __lnd_comp_mct_MOD_lnd_run_mct
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/components/elm/src/cpl/lnd_comp_mct.F90:514
128: #6  0x4810ab in __component_mod_MOD_component_run
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/driver-mct/main/component_mod.F90:734
128: #7  0x464de1 in __cime_comp_mod_MOD_cime_run
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/driver-mct/main/cime_comp_mod.F90:2916
128: #8  0x47e7a5 in cime_driver
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/driver-mct/main/cime_driver.F90:153
128: #9  0x47e808 in main
128:    at /global/u1/g/glemieux/E3SM-project/e3sm/driver-mct/main/cime_driver.F90:23
srun: error: nid006444: task 128: Floating point exception

Collaborators:

Expectation of Answer Changes:

Checklist:

Test Results:

CTSM (or) E3SM (specify which) test hash-tag:

CTSM (or) E3SM (specify which) baseline hash-tag:

FATES baseline hash-tag:

Test Output: