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

Number of canopy layers might not go to zero when no cohorts exist #1202

Open
rgknox opened this issue May 16, 2024 · 0 comments
Open

Number of canopy layers might not go to zero when no cohorts exist #1202

rgknox opened this issue May 16, 2024 · 0 comments

Comments

@rgknox
Copy link
Contributor

rgknox commented May 16, 2024

See here where we calculate the number of canopy layers:

https://github.com/NGEET/fates/blob/main/biogeochem/EDCanopyStructureMod.F90#L2285

The value defaults to 1 if there are no cohorts. I don't have any reason to believe this is affecting results. But I do see this as a code vulnerability. Obviously there are no canopy layers if there are no cohorts, and this would potentially affect logic and looping erroneously in various parts of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ❕Todo
Development

No branches or pull requests

1 participant