knitr::opts_chunk$set(collapse = T, comment = NA)
library(WOODCARB3R)

This package is designed to calculate the carbon sequestration in harvested wood products in the United States. Functions estimate carbon in wood products, solid-waste disposal sites, and paper. A collection of production, import and export data from various sources is used to calculate intermediate statistics which is then used to calulate the 5 HWP variables and the final carbon contribution.

The main goal is to calculate the final carbon contribution and produce a report which is reported to the IPCC. This is calculated based on the approach selected (Production, Stock Change, Atmospheric).

Currently, the Production Approach is the one used to report contribution values to the IPCC.

Final Carbon Contribution

The final reported value is the contribution to AFOLU CO2 emissions/removal. It's units are Gg CO2/Yr

To calculate the carbon contribution:

The default arguments calculate the carbon contribution from 1990 to 2015 using the Production approach. It returns a vector with the carbon contributions for each year.

finalCarbonContribution()

The years, approach used, decay distribution, and values for end use half life values can be entered as arguments. halfLives is a data frame with the default half life values.

finalCarbonContribution(Years = 1945:2017, approach = "Atmospheric Flow", halflives = halfLives* 1.2)

A plot can be returned.

finalCarbonContribution(plot = TRUE)

HWP Variables

finalVariables returns a data frame with all of the HWP variables.
Alternate years, decay distribution, and half lives can be substituted for defaults.

finalVariables()

Other Statistics

Total Carbon

Carbon in solid wood products, paper and solid waste disposal sites (SWDS) is estimated. There are functions to calculate amounts of carbon stored in these places.

Solid Wood Products

swpcarbontotal() calculates total carbon stored in solid wood products in oven-dry tons of wood fiber. It gives the option of returning carbon totals by end use (the default argument returns total carbon for all end uses). Alternate approaches and half life values can be used. lumberpre allows carbon from lumber before 1900 to be excluded from total.

swpcarbontotal(c(1990,2015), onlytotal = FALSE, lumberpre = FALSE,
               approach = "Stock Change", halflives = halfLives * .9) 

Other Arguments

fsp, fnsp, and fsawn allow for adjusting the product class distributions over the end uses. The default values are provided in the corresponding data frames (fracstrpanels, fracnonstrpanels, fracsawnwood).

New values can be substitued directly in the function call, or a copy can be made which can then be changed (don't change the original data - or else the package will need to be reloaded). The first example shows using one error term for each column and the second example shows creating an error term for each cell.

adj <- rnorm(13, 1, .15)
finalCarbonContribution(fsp = mapply(`*`,fracsawnwood,adj))

fsawncopy <- fracsawnwood
for (i in seq(fsawncopy)) {
  fsawncopy[,i] <- fsawncopy[,i] * rnorm(nrow(fsawncopy),1,.1)
}
finalCarbonContribution(fsawn = fsawncopy)


benjones2/WOODCARB3R documentation built on May 12, 2019, 11:58 a.m.