README.md

AlgalGame

Lifecycle:
experimental CRAN
status

The goal of AlgalGame is to solve the ODEs created by Klausmeier and Litchman (2001) and to simulate algal vertical profiles.

Installation

You can install the released version of AlgalGame from Github with:

remotes::install_github("bishun945/AlgalGame")

Example

This is a basic example which shows you how to use this pacakge.

Run the model by the default parameters:

library(AlgalGame)
res <- run_model()

Plot the result:

plot(res$gplot)

You can also plot the result by the function ggimage with add-on contour texts:

ggimage(res$out, "Biomass", contour.text = TRUE)

The default paramters are shown as follows:

show_parms()
#>    Param   Value                                                         Desc
#> 1    Rin 1.0e+02                              sediment P concentration [ug/L]
#> 2      h 1.0e-02                    sediment-water column permeability  [1/m]
#> 3    Iin 1.4e+03                      Incoming light [umol photons m^-2 s^-1]
#> 4    abg 3.5e+00                     Background attenuation coefficient [1/m]
#> 5      a 1.0e-04 algal specific attenuation coefficient [m^-1 / (cells / ml)]
#> 6   vmax 1.2e+00                                         swimming speed [m/d]
#> 7      r 4.0e-01                                    maximum growth rate [1/d]
#> 8      m 2.0e-01                                              loss rate [1/d]
#> 9     KR 1.0e+00                            P half-saturation constant [ug/L]
#> 10    KI 5.0e+01      light half-saturation constant [umol photons m^-2 s^-1]
#> 11     Y 1.0e+03                      yield coefficient [cell ml^-1 / (ug/L)]
#> 12   e_r 0.0e+00                                     recycling coefficient []
#> 13    DR 1.0e+01                     eddy diffusion coefficient for R [m^2/d]
#> 14    Db 1.0e+01      eddy diffusion coefficient for b (same as `DR`) [m^2/d]
#> 15    Rs 1.0e+00                        minimum nutrient concentration [ug/L]
#> 16    Is 5.0e+01                 minimum light level [umol photons m^-2 s^-1]

Update in April 13, 2021, a shiny app was generated for visualization.

run_Shiny()

References



bishun945/AlgalGame documentation built on Aug. 29, 2021, 4:40 a.m.