-
Notifications
You must be signed in to change notification settings - Fork 105
Description
I’m getting a fail in global CNP simulations when DEBUG=TRUE due to a divide by zero error caused by 100% allocation to reproduction in shrubs.
fates/parteh/PRTAllometricCNPMod.F90
Line 2544 in 1be3962
| repro_w = total_w * repro_c_frac/(1._r8 - repro_c_frac) |
The line above causes a ‘forrtl: error (65): floating invalid’ error which I guess is because repro_c_frac is 1.
If we aren’t using the TRS scheme, and the cohort has a dbh above their dbh threshold for increased allocation to reproduction, then repro_c_frac is defined here:
fates/parteh/PRTAllometricCNPMod.F90
Line 2477 in 1be3962
| repro_c_frac = prt_params%seed_alloc(ipft) + prt_params%seed_alloc_mature(ipft) |
Looking at the default parameter file, shrubs would have 0.1 and 0.9 which triggers the error above.
fates/parameter_files/fates_params_default.cdl
Line 1531 in 1be3962
| fates_recruit_seed_alloc = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, |
fates/parameter_files/fates_params_default.cdl
Line 1534 in 1be3962
| fates_recruit_seed_alloc_mature = 0, 0, 0, 0, 0, 0, 0.9, 0.9, 0.9, 0.9, 0.9, |
This is only triggered when DEBUG=TRUE. When debug is false it keeps running, but I’m not sure what the behaviour is. This was with the intel compiler.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status