Skip to content

cumPoolsCreateAGB handles where age==0 - #94

Merged
suz-estella merged 1 commit into
developmentfrom
suz-AGB
Sep 11, 2026
Merged

suz-estella merged 1 commit into
developmentfrom
suz-AGB

Conversation

@suz-estella

Copy link
Copy Markdown
Contributor

cumPoolsCreateAGB currently removes all rows of the input AGB table where age == 0 because the Boudewyn equations will not work when age == 0. This update manually sets all "merch", "foliage", and "other" pools to 0 if the total B (biomass) == 0, which allows the function to return pools when age == 0 and B == 0. It will fail if any rows have age==0 and B!=0.

This saves a step in LandRCBM_split3pools where we need to manually re-add the removed rows for every curve with (age = 0, merch = 0, foliage = 0, other = 0).

Tests have been updated to verify that input of (age = 0, B = 0) leads to an output of (age = 0, merch = 0, foliage = 0, other = 0) and that an input of (age = 0, B = 10) will fail.

Other small updates:

  • The rows are added to the input AGB table by reference to save memory.
  • The 'speciesCode' column is no longer required to be present in the input AGB table as it is not used (though it is OK if it is there)

This requires a small update to LandRCBM_split3pools which I will PR if this change is accepted.

@suz-estella
suz-estella merged commit 8e4a786 into development Sep 11, 2026
6 of 7 checks passed
@suz-estella
suz-estella deleted the suz-AGB branch September 11, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants