run_coral: Run simulation of coral-_Symbiodinium_ model.

Description Usage Arguments Value See Also Examples

View source: R/run_coral.R

Description

This function runs a simulation of the coral-Symbiodinium bioenergetic model using a specified time vector, environmental inputs, and parameters.

Usage

1
run_coral(time, env, pars)

Arguments

time

A vector of time steps at which the model should be evaluated (units=days) (e.g., seq(0, 365, 0.1))

env

A list of numeric vectors named L, N, and X, defining the external light, [DIN], and [prey] for the model simulation. Each of these vectors should have length=length(time). The object returned from init_env can be used here.

pars

A list of (named) parameter values to use in the simulation. Parameter names must match those returned by def_pars().

Value

A list with the following named elements:

time

The time vector used in the simulation

env

The environment object used in the simulation

pars

The parameter values used in the simulation

H

A tibble of all host biomass-specific model fluxes at each time step

S

A tibble of all symbiont biomass-specific model fluxes at each time step

See Also

init_env, def_pars

Examples

1
2
3
4
time1 <- seq(0, 365, 0.1)
pars1 <- def_pars()
env1 <- init_env(time=time1, L=c(20,40,1), N=c(1e-7,1e-7,0), X=c(0,0,0))
run1 <- run_coral(time=time1, env=env1, pars=pars1)

jrcunning/coRal documentation built on March 24, 2021, 1:28 a.m.