-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Describe the issue
Hello, I met an error of 'negative or more area than the cohort has is being promoted/demoted' in EDCanopyStructureMod, and I think it's due to double float precision. I am running ELM-FATES with ed_st3 on and with my inventory file. The trigger of this error is in the code lines below (Line 662 - 664):
remainder_area = cohort%c_area - layer_co(ic)%pd_area
copyc%n = cohort%n*remainder_area/cohort%c_area
cohort%n = cohort%n - copyc%n
When I output those values, I found that pd_area is about 4E-16 (positive), but the copyc%n is slightly larger than the original cohort%n, which is wrong mathematically. This gives a negative cohort%n after those code, and led to negative demotion area in the next demotion phase.
Any suggestions to fix this bug? Thanks!
Relevant log output
FATES tag
sci.1.88.0_api.42.0.0
Host land model tag
v3.1.0-alpha-4304-ge909ef9f6f
Machine
perlmutter
Other supported machine name
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status