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

Fix biomass missing cols #1

Merged
merged 4 commits into from
Jul 21, 2024
Merged

Fix biomass missing cols #1

merged 4 commits into from
Jul 21, 2024

Conversation

d-diaz
Copy link
Collaborator

@d-diaz d-diaz commented Jul 18, 2024

Updates biomass_new.R and carbon_new.R to remove columns that no longer exist in FIA databases distributed by the USFS. This allows the rFIA::biomass function to work as expected, but the modelSnag argument in rFIA::carbon now has no effect. The elimination of modelSnag functionality could be restored if the pre-existing calculations were rewritten to draw from the columns that now exist in the FIA database (since STANDING_DEAD no longer exists, would need to derive it from FIA field TREE.CARBON_AG for dead trees only).

@d-diaz d-diaz requested a review from jpshanno July 18, 2024 16:23
@d-diaz
Copy link
Collaborator Author

d-diaz commented Jul 18, 2024

I have confirmed with a local rebuild and install with this updated source code that the rFIA::biomass function works with bioMethod="CRM" and bioMethod="Jenkins" and that rFIA::carbon executes successfully as well.

DRYBIO_STUMP = DRYBIO_STUMP / adj,
DRYBIO_BG = DRYBIO_BG / adj,
DRYBIO_SAPLING = DRYBIO_SAPLING / adj,
DRYBIO_WDLD_SPP = DRYBIO_WDLD_SPP / adj,
DRYBIO_FOLIAGE = DRYBIO_WDLD_SPP / adj)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a bug in rFIA originally

@d-diaz d-diaz merged commit 8cac21b into master Jul 21, 2024
@d-diaz d-diaz deleted the fix-biomass-missing-cols branch July 21, 2024 12:50
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.

2 participants