Learn R Programming

BlueCarbon (version 0.1.1)

estimate_oc_stock: Organic Carbon Stock estimation

Description

Estimates carbon stocks from soil core data down to a specified depth, 100 cm by default. If the core does not reach the standardized depth, it extrapolates the stock from a linear model between accumulated mass of organic carbon and depth.

Usage

estimate_oc_stock(
  df = NULL,
  depth = 100,
  core = "core",
  mind = "mind_corrected",
  maxd = "maxd_corrected",
  dbd = "dbd",
  oc = "eoc"
)

Value

data.frame with columns core, stockwc (organic carbon stock at the whole core), maxd (maximum depth of the core), stock (organic carbon stock at the standardized depth), and stock_se (standard error for the estimated stock).

Arguments

df

A data.frame with core (core id), mind (minimum depth of the sample), maxd (maximum depth of the sample), dbd (dry bulk density), oc (organic carbon %)

depth

max depth to estimate the stock, by default 100.

core

Character Name of the column reporting core ID.

mind

Character Name of the column reporting the minimum depth of each sample.

maxd

Character Name of the column reporting the maximum depth of each sample.

dbd

Character Name of the column reporting dry bulk density.

oc

Character Name of the column reporting organic carbon concentrations.

Examples

Run this code
bluecarbon_decompact <- decompact(bluecarbon_data)

oc <- estimate_oc(bluecarbon_decompact)

out <- estimate_oc_stock(oc[[1]])
head(out)

Run the code above in your browser using DataLab