Skip to contents

Setting up a mizerReef model

These functions are for setting up a new mizerReef model and finding a steady state for the dynamical system.

newReefParams()
Set up parameters for a mizerReef model
reefSteady()
Project a mizerReef model to steady state
upgradeReefParams()
Upgrade a mizerReef 1.x params object to the current (2.0.0+) layout

Tuning a mizerReef model

These functions are for calibrating mizerReef models to match empirical observations.

calibrateReefBiomass()
Calibrate the scale of a mizerReef model to match total observed biomass
calibrateReefNumber()
Calibrate the model scale to match total observed number
matchReefGrowth()
Match observed growth rates
scaleReefAbundance()
Scale reef abundances
scaleReefModel()
Scale model parameters
tuning_profile
Constant refuge profile for tuning steady states

Tuning Profiles

These refuge profiles are useful for tuning mizerReef models to steady state.

tuning_profile
Constant refuge profile for tuning steady states

Predation Refuge

These functions set up the mediation of predation with refuge.

Setting the refuge parameters

These functions allow users to set or change the refuge profile.

aquarius_refuge
Competitive method refuge parameters for Aquarius reef research station
getRefuge()
This function is designed to be used after refuge parameters are set by the setRefuge() function. It calculates the proportion of fish that are in predation refuge for the density-independent sigmoidal and binned methods. For the competitive method, it finds the indices of fish within the prescribed size bins. These values are used by reefVulnerable() to set the vulnerability to predation at each time step.
karpata_refuge
Competitive method refuge parameters for Karpata reef in Bonaire
newRefuge()
Change the refuge parameters for a model
setRefuge()
Set the refuge profile parameters

New Rate Functions

These functions supplement or replace mizer’s default rate functions so that refuge impacts simulations.

getVulnerable()
Get vulnerability level at in time range t
reefEncounter()
Get encounter rate needed to project a mizerReef model
reefPredMort()
Get total predation mortality rate needed to project mizer reef model
reefRates()
Get all rates needed to project a mizerReef model
reefVulnerable()
Find the proportion of fish vulnerable to being encountered by predators at each time step

Degradation

These functions prepare a mizer model for projections with degradation.

algae_scale
Degradation scaling matrix for the algae trajectory
getDegrade()
Get vulnerability level at in time range t
recovery_scale
Degradation scaling matrix for the recovery trajectory
reefDegrade()
Scales the refuge density by a given value at set times
rubble_scale
Degradation scaling matrix for the rubble trajectory
setDegradation()
Prepare a steady state model for projections with degradation

Plotting the refuge profile

These functions allow users visualize the refuge profile for different functional groups in terms of their body length.

plotDegScale()
Compare built-in degradation trajectories as faceted heatmaps
plotDegradationScale()
Plot heatmap of degradation scaling parameters
plotRefugeDensity() plotlyRefugeDensity()
Plot refuge density through time
plotRefugeProfile() plotlyRefugeProfile()
Plot the refuge profile, species by length
plotVulnerable() plotlyVulnerable()
Plot the vulnerability to predation of species by weight
plotlyDegradationScale()
Interactive Plotly version of plotDegradationScale

Unstructured Resources

These functions set up the production and consumption dynamics for the algae and detritus resources and provide some plotting abilities to assess these dynamics.

Algae

algae_biomass()
algae Biomass
algae_consumption()
Mass-specific algae consumption rate
algae_dynamics()
Algae dynamics
algae_dynamics_cc()
Algae dynamics with carrying capacity
getAlgaeBoost()
Post-bleaching boost multiplier for algae growth or capacity
getAlgaeConsumption()
Get algae consumption rates
getAlgaeProduction()
Algae production rate
plotAlgaeConsumption()
Plot algae consumption rates
rescale_algae()
Rescale algae biomass without changing anything else
setAlgaeParams()
Set algae parameters for mizerReef

Detritus

detritus_biomass()
Detritus Biomass
detritus_consumption()
Mass-specific detritus consumption rate
detritus_dynamics()
Detritus dynamics
detritus_dynamics_cc()
Detritus dynamics with carrying capacity
detritus_lifetime() `detritus_lifetime<-`()
Expected detritus lifetime
getDetritusConsumption()
Get detritus consumption rates
getDetritusProduction()
Detritus production rate
plotDetritusConsumption()
Plot detritus consumption rates by species
plotDetritusProduction()
Plot detritus production rates from each source
rescale_detritus()
Rescale detritus biomass without changing anything else
setDetritusParams()
Set detritus parameters for mizerReef

Other Components

constant_dynamics()
Hold resource dynamics constant
encounter_contribution()
Contribution of unstructured components to the encounter rate
rescaleComponents()
Rescale algae and detritus biomass without changing anything else
scaleReefBackground()
Scale background down by a factor
setURcapacity()
Switch to unstructured resource dynamics with carrying capacities
tuneUR()
Tune unstructured resources (algae and detritus) to steady state
tuneUR_cc()
Tune unstructured resources with carrying capacities (algae and detritus) to steady state

External Mortality

These functions add size-dependent senescence mortality to mizerReef models.

getSenMort()
Get the size specific senescence mortality rate
reefFeedingLevel()
Reef feeding level
reefMort()
Total mortality rate in the reef ecosystem model
reefSenMort()
Expanding external mortality rate to include senescence
setExtMortParams()
Set the parameters for external mortality

Summary Functions

getEGrowthTime()
Get energy rate available for growth through time
getProductivity()
Calculate fisheries productivity for each species group

Summary Plots

These functions calculate and plot summary statistics and allow for the comparison of results between different models.

reef_plots
Description of mizerReef plotting functions
plot2Productivity() plotly2Productivity()
Plot the fisheries productivity of two models or two different size ranges in the same plot
plot2TotalBiomass() plotly2TotalBiomass()
Plot the total biomass of two models or of two different size ranges in the same plot
plotProductivity() plotlyProductivity()
Plot the total productivity for each species Group
plotProductivityRelative() plotlyProductivityRelative()
Plot the relative difference between the potential fisheries productivity rates of two models or two different size ranges in the same plot
plotRelativeContribution() plotlyRelativeContribution()
Plot the relative contribution of each species group to total abundance, total biomass, and total productivity
plotSpectraChange() plotlySpectraChange()
Plot the change between two spectra
plotTotalAbundance() plotlyTotalAbundance()
Plot the total abundance for each species in a size range
plotTotalBiomass() plotlyTotalBiomass()
Plot the total biomass for each species in a size range
plotTotalBiomassRelative() plotlyTotalBiomassRelative()
Plot the relative difference in between the total biomasses of each each species within a size range at steady state

Helper Functions

removeSpecies(<mizerReef>)
Remove some species from the model

Extension Mechanism

The S4 marker classes and S3 methods that let mizerReef participate in mizer’s extension mechanism. See vignette("extension_mechanism") for details.

mizerReef-class
S4 marker class for mizerReef extension
getBiomass(<mizerReefSim>)
Get the biomass of species and unstructured components through time
upgrade(<mizerReef>)
Upgrade a mizerReef params object to the current layout

Deprecated

MizerReefParams()
Deprecated: Use newReefParams() instead

Example Models

These files hold example parameters and mizerReef params objects for generic Caribbean coral reef ecosystems.

Simple 3-group model

A simple trait-based model with three functional groups (predators, herbivores, invertebrates) for a generic Caribbean reef.

caribbean_3_species
species_params dataframe for a simple, generic Caribbean reef with 3 species groups
caribbean_3_interaction
interaction matrix for a simple, generic Caribbean reef with 3 species groups
caribbean_3_model
mizerParams object for a simple, generic Caribbean reef with 3 species groups

10-group model (Karpata Reef, Bonaire)

A 10-functional-group model parameterised from field data at Karpata Reef in Bonaire, including competitive predation refuge.

caribbean_10_species
Species parameters for a generic Caribbean reef (10 functional groups)
caribbean_10_interaction
Interaction matrix for a generic Caribbean reef (10 functional groups)
caribbean_10_model
mizerReef model for a generic Caribbean reef (10 functional groups)

Empirical refuge profiles

Refuge density profiles from field data, reusable across any mizerReef model - not tied to a particular example model.

karpata_refuge
Competitive method refuge parameters for Karpata reef in Bonaire
aquarius_refuge
Competitive method refuge parameters for Aquarius reef research station

Degradation trajectories

Matrices of refuge-density scaling factors (multipliers) for three built-in habitat disturbance trajectories. Use with [setDegradation()] and [reefDegrade()].

rubble_scale
Degradation scaling matrix for the rubble trajectory
algae_scale
Degradation scaling matrix for the algae trajectory
recovery_scale
Degradation scaling matrix for the recovery trajectory