fillDepthCellsWithRoots: Calculates a root mass depth profile

View source: R/fillDepthCellsWithRoots.R

fillDepthCellsWithRootsR Documentation

Calculates a root mass depth profile

Description

It will take any root biomass and maximum rooting depth, as well as vectors of minimum and maximum depths. We use predefined equations if rootShape is set to linear or exponential It can also take a custom function of x, as long as you define parameters in a custom parameters list. The custom function listed here is a gaussian root depth distribution.

Usage

fillDepthCellsWithRoots(
  depthMins = 0:149,
  depthMaxs = 1:150,
  totalRootBmass = 3000,
  rootShape = "linear",
  rootDepthMax = 30,
  customFunction = function(x) {     exp(-((x - maxRootDepth)^2/lambdaRoot^2)) },
  customParams = list(lambdaRoot = 33, maxRootDepth = 30)
)

Arguments

depthMins

a vector of numerics, minimum of depth intervals that the function will fill with roots

depthMaxs

a vector of numerics, maximum of depth intervals that the function will fill with roots

totalRootBmass

a numeric, total root biomass

rootShape

a character, either linear, exponential, or custom, defining the shape of the root profile

rootDepthMax

a numeric, maximum depth of root zone

customFunction

a function (optional), if root shape is custom, then use a customized function

customParams

a list (optional), any other parameters required by a custom root shape function

Value

a data frame with minimum and maximum depths and and root biomass within those depths intervals


tilbud/rCTM documentation built on March 30, 2024, 10:06 a.m.