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

Add a function to get aboveground biomass of a grass cohort #1267

Open
samsrabin opened this issue Oct 23, 2024 · 0 comments
Open

Add a function to get aboveground biomass of a grass cohort #1267

samsrabin opened this issue Oct 23, 2024 · 0 comments
Labels
enhancement refactor Restructures code without changing functionality

Comments

@samsrabin
Copy link
Contributor

samsrabin commented Oct 23, 2024

There are several places in the code where the aboveground biomass of a grass cohort is calculated like

currentCohort%prt%GetState(leaf_organ,element_id) + &
currentCohort%prt%GetState(sapw_organ,element_id) + &
currentCohort%prt%GetState(struct_organ,element_id)

This is really verbose and, more importantly, susceptible to errors. It would be better to have a cohort-level function like GrassAbovegroundBiomass(element_id) that we call wherever needed.

@samsrabin samsrabin added enhancement refactor Restructures code without changing functionality labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement refactor Restructures code without changing functionality
Projects
Status: ❕Todo
Development

No branches or pull requests

1 participant