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

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
step_tune
Stepped refuge profile for tuning steady states
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
step_tune
Stepped 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.

getRefuge()
Finds the refuge length bins by functional group and stores them params
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
Algae trajectory refuge density scaling parameters
constant_scale
Trajectory with no refuge density scaling for testing
getDegrade()
Get vulnerability level at in time range t
recovery_scale
Recovery trajectory refuge density scaling parameters
reefDegrade()
Scales the refuge density by a given value at set times
rubble_scale
Rubble trajectory refuge density scaling parameters
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.

plotRefuge() plotlyRefuge()
Plot the refuge profile, species by length
plotVulnerable() plotlyVulnerable()
Plot the vulnerability to predation of species by weight

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
getAlgaeConsumption()
Get algae consumption rates
getAlgaeProduction()
Algae production rate
plotAlgaeConsumption()
Plot algae consumption rates
rescale_algae()
Rescale algae biomass without changing anything else

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

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
setURParams()
Checks unstructured resource parameters and interaction matrix
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.

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
plotBiomass() plotlyBiomass()
Plot the biomass of Species Groups and unstructured components through time
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()
Plot the relative contribution of each species group to total abundance, total biomass, and total productivity
plotSpectra2()
Show two size spectra in the same plot
plotSpectraRelative() plotlySpectraRelative()
Plot the relative difference or percent change between two spectra
plotTotalAbundance()
Plot the total abundance for each species group at steady state
plotTotalBiomass() plotlyTotalBiomass()
Plot the total fishable biomass for each Species Group at steady state
plotTotalBiomassRelative() plotlyTotalBiomassRelative()
Plot the relative difference in between the total fishable biomasses of each each Species Group at steady state

Helper Functions

different()
Check whether two objects are different
removeSpecies()
Remove some species from the model

Example Models

These files hold example parameters and mizer params object to explore models set up to emulate the coral reefs of Bonaire.

Simple trait based model

bonaire_int
interaction matrix for for a simple, generic Caribbean reef
bonaire_refuge
Competitive method refuge parameters for a simple, generic Caribbean reef
bonaire_species
species_params dataframe for a simple, generic Caribbean reef
bonaire_model
MizerParams object for a simple, generic Caribbean reef

Multi-species model

karpata_int
Interaction matrix for a generic Caribbean reef
karpata_refuge
Competitive method refuge parameters for a generic Caribbean reef
karpata_species
species_params dataframe for a generic Caribbean reef
karpata_model
MizerParams object for a multispecies generic reef

Refuge profiles

aquarius_refuge
Competitive method refuge parameters for a generic Caribbean reef