runCohortMemTransect: Run Marsh Equilibrium Model with Cohorts Across an Elevation...

View source: R/runCohortMemTransect.R

runCohortMemTransectR Documentation

Run Marsh Equilibrium Model with Cohorts Across an Elevation Transect

Description

This function takes an elevation minimum, maximum, and intervals, uses them to simulate an elevation transect, then batch runs runCohortMem over it.

Usage

runCohortMemTransect(
  startYear,
  endYear = startYear + 99,
  relSeaLevelRiseInit,
  relSeaLevelRiseTotal,
  initElv,
  meanSeaLevel,
  meanSeaLevelDatum = meanSeaLevel[1],
  meanHighWaterDatum,
  meanHighHighWaterDatum = NA,
  meanHighHighWaterSpringDatum = NA,
  suspendedSediment,
  lunarNodalAmp,
  lunarNodalPhase = 2011.181,
  nFloods = 705.79,
  floodTime.fn = floodTimeLinear,
  bMax,
  zVegMin,
  zVegMax,
  zVegPeak,
  plantElevationType,
  rootToShoot,
  rootTurnover,
  abovegroundTurnover = NA,
  speciesCode = NA,
  rootDepthMax,
  shape = "linear",
  omDecayRate,
  recalcitrantFrac,
  captureRate,
  omToOcParams = list(B0 = 0, B1 = 0.48),
  omPackingDensity = 0.085,
  mineralPackingDensity = 1.99,
  rootPackingDensity = omPackingDensity,
  initialCohorts = NA,
  uplandCohorts = NA,
  supertidalCohorts = NA,
  supertidalSedimentInput = NA,
  initElvMin = meanSeaLevel[1],
  initElvMax = max(meanHighWaterDatum, meanHighHighWaterDatum,
    meanHighHighWaterSpringDatum, na.rm = T) + relSeaLevelRiseTotal,
  elvIntervals = 4,
  ...
)

Arguments

startYear

an integer, year in form YYYY, the start year of the scenario

endYear

an integer, year in form YYYY, the end year of the scenario

relSeaLevelRiseInit

a numeric, initial rate of relative sea-level rise

relSeaLevelRiseTotal

a numeric, total relative sea-level rise over the course of the scenario

initElv

a numeric, the initial elevation of the marsh at the start of the scenario

meanSeaLevel

a numeric or a vector, Mean Sea Level at the start of the scenario, or a vector of Mean Sea Levels the same length as the number of years in a scenario

meanSeaLevelDatum

a numeric, Mean Sea level over the last datum period

meanHighWaterDatum

a numeric, Mean High Water level over the last datum period

meanHighHighWaterDatum

a numeric (optional), Mean Higher High Water level over the last datum period

meanHighHighWaterSpringDatum

a numeric (optional), Mean Higher High Spring Tide Water level over the last datum period

suspendedSediment

a numeric, suspended sediment concentration of the water column

lunarNodalAmp

a numeric, the amplitude of the 18-year lunar nodal cycle

lunarNodalPhase

a numeric, in decimal years (YYYY) the start year of the sine wave representing the lunar nodal cycle

nFloods

a numeric, the number of tidal flooding events per year

floodTime.fn

a function, specify the method used to calculate flooding time per tidal cycle

bMax

a numeric, or vector of numerics, maximum biomass

zVegMin

a numeric, or vector of numerics, lower elevation of biomass limit

zVegMax

a numeric, or vector of numerics, upper elevation of biomass limit

zVegPeak

(optional) a numeric, or vector of numerics, elevation of peak biomass

plantElevationType

character, either "orthometric" or "dimensionless", specifying elevation reference of the vegetation growing elevations

rootToShoot

a numeric, or vector of numerics, root to shoot ratio

rootTurnover

a numeric, or vector of numerics, belowground biomass annual turnover rate

abovegroundTurnover

(optional) a numeric, or vector of numerics, aboveground biomass annual turnover rate

speciesCode

(optional) a character, or vector of characters, species names or codes associated with biological inputs

rootDepthMax

a numeric, or vector of numerics, maximum (95%) rooting depth

shape

a character, "linear" or "exponential" describing the shape of the relationship between depth and root mass

omDecayRate

a numeric, annual fractional mass lost

recalcitrantFrac

a numeric, fraction of organic matter resistant to decay

captureRate

a numeric, the number of times a water column will clear per tidal cycle

omToOcParams

a list, of numerics listed B0, B1 and optionally B3. These define a linear or parabolic relationship between organic matter and organic carbon

omPackingDensity

a numeric, the bulk density of pure organic matter

mineralPackingDensity

a numeric, the bulk density of pure mineral matter

rootPackingDensity

a numeric, the bulk density of pure root matter

initialCohorts

a data frame, (optional) custom set of mass cohorts that will override any decision making this function does

uplandCohorts

a data frame, (optional) custom set of mass cohorts to be used if initial elevation is higher than both maximum tidal height and maximum wetland vegetation tolerance

supertidalCohorts

a data frame, (optional) custom set of mass cohorts to be used if initial elevation is higher than maximum tidal height, but not maximum wetland vegetation tolerance

supertidalSedimentInput

a numeric, (optional) grams per cm^2 per year, an optional parameter which will define annual suspended sediment delivery to a sediment column that is is higher than maximum tidal height, but not maximum wetland vegetation tolerance

initElvMin

a numeric, the lowest initial elevation over which to batch run the model

initElvMax

a numeric, the highest initial elevation over which to batch run the model

elvIntervals

a numeric, the elevation intervals of the transect

...

Value

a list of data frames, including the annualized summaries, and mapped cohorts tracked for every year, and every depth interval, of the simulation.


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