API

EcoSISTEM.AbstractAbiotic โ€” Type
AbstractAbiotic{H <: AbstractHabitat, B <: AbstractBudget} <: AbstractPartition

Abstract supertype for all abiotic environment types and a subtype of AbstractPartition

EcoSISTEM.AbstractEcosystem โ€” Type
AbstractEcosystem{Part <: AbstractAbiotic, SL <: SpeciesList,
    TR <: AbstractTraitRelationship} <: AbstractMetacommunity{Float64,
        Matrix{Int64}, Matrix{Float64}, SL, Part}

Abstract supertype for all ecosystem types and a subtype of AbstractMetacommunity.

EcoSISTEM.AbstractRequirement โ€” Type
Abstract1Requirement{Energy}

Abstract supertype for all species energy requirement types, parameterised by the type(s) of energy required Energy.

EcoSISTEM.AbstractTraitRelationship โ€” Type
AbstractTraitRelationship{TR}

The abstract supertype of relationships between a trait and its environment, parameterised on any TR.

EcoSISTEM.AbstractTraits โ€” Type
AbstractTraits{T}

Abstract supertype for all trait types, parameterised by traits of any type T.

EcoSISTEM.AlwaysMovement โ€” Type
AlwaysMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement

Movement can happen to any individual ("animal-like").

EcoSISTEM.BirthOnlyMovement โ€” Type
BirthOnlyMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement

Movement can only happen to individuals that have just been born ("plant-like").

EcoSISTEM.Cache โ€” Type
Cache

Cache houses an integer array of moves made by all species in a timestep for the update! function, netmigration.

EcoSISTEM.CachedEcosystem โ€” Type
CachedEcosystem{Part <: AbstractAbiotic, SL <: SpeciesList,
    TR <: AbstractTraitRelationship} <: AbstractEcosystem{Part, SL, TR}

CachedEcosystem houses the same information as Ecosystem (see ?Ecosystem), but holds the time period abundances as a CachedGridLandscape, so that they may be present or missing.

EcoSISTEM.CachedEcosystem โ€” Method
CachedEcosystem(eco::Ecosystem, outputfile::String, rng::StepRangeLen)

Function to create a CachedEcosystem given an existing ecosystem, eco, output folder to which the simulations are saved, outputfile, and a range of times over which to simulate, rng.

EcoSISTEM.CachedGridLandscape โ€” Type
CachedGridLandscape

Ecosystem abundances housed in the cached landscape. These are either stored in the matrix or output to a cache.

EcoSISTEM.ContinuousHab โ€” Type
ContinuousHab{C <: Number} <: AbstractHabitat{C}

This habitat subtype houses a habitat matrix matrix of any units, a grid square size size and HabitatUpdate type change.

EcoSISTEM.ContinuousTimeHab โ€” Type
ContinuousTimeHab{C <: Number, M <: AbstractArray{C, 3}} <: AbstractHabitat{C}

This habitat subtype houses a habitat matrix matrix of any units, the time slice of the habitat matrix currently being operated on time, a grid square size size and HabitatUpdate type change.

EcoSISTEM.ContinuousTrait โ€” Type
ContinuousTrait{C <: Number} <: AbstractTraits{T}

Abstract trait type that holds information on a single continuous trait for each species, of any Number type C.

EcoSISTEM.Cylinder โ€” Type
Cylinder <: BoundaryCondition

A cylindrical boundary where species can cross the x boundary but not the y.

EcoSISTEM.DiscreteHab โ€” Type
DiscreteHab <: AbstractHabitat{String}

This habitat subtype has a matrix of strings and a float grid square size

EcoSISTEM.DiscreteTrait โ€” Type
BasicTrait{T} <: AbstractTraits{T}

Basic trait type that holds information on a single trait for each species, of any type T.

EcoSISTEM.Ecosystem โ€” Type
Ecosystem{Part <: AbstractAbiotic} <:
   AbstractEcosystem{Part, SL, TR}

Ecosystem houses information on species and their interaction with their environment. For species, it holds abundances and locations, abundances, as well as properties such as trait information, spplist, and movement types, lookup. For environments, it provides information on environmental conditions and available resources,abenv. Finally, there is a slot for the relationship between the environment and the characteristics of the species, relationship.

EcoSISTEM.Ecosystem โ€” Method
Ecosystem(spplist::SpeciesList, abenv::GridAbioticEnv,
    rel::AbstractTraitRelationship)

Function to create an Ecosystem given a species list, an abiotic environment and trait relationship. An optional population function can be added, popfun, which defaults to generic random filling of the ecosystem.

EcoSISTEM.EqualPop โ€” Type
EqualPop <: AbstractParams

Parameter type that holds information on a population's birth and death rates, birth and death, specifically populations where all species have the same information. l represents the longevity of species based on their energy requirements and s is the survival of species dependent on how well their traits reflect the environment. Finally boost is used to manipulate how much of a boost the species get from being in an environment with lots of available energy.

EcoSISTEM.FluctScenario โ€” Type
FluctScenario <: AbstractScenario

This scenario type holds a function that acts to fluctuate the environment.

EcoSISTEM.Gauss โ€” Type
Gauss{TR} <: AbstractTraitRelationship{TR}

The Gaussian relationship between a continuous trait and its environment, paramaterised on any TR.

EcoSISTEM.GaussTrait โ€” Type
GaussTrait{C <: Number} <: ContinuousTrait{C}

Trait type that holds Gaussian mean and variance trait information for each species, of any number type C.

EcoSISTEM.GaussianKernel โ€” Type
GaussianKernel <: AbstractKernel

GaussianMovement holds parameters for a gaussian movement kernel; a dispersal variance for a species, var, and a threshold, thresh, beyond which dispersal cannot take place.

EcoSISTEM.GridAbioticEnv โ€” Type
GridAbioticEnv{H, B} <: AbstractAbiotic{H, B}

This abiotic environment type holds a habitat and budget, as well as a string of subcommunity names.

EcoSISTEM.GridLandscape โ€” Type
GridLandscape

Ecosystem abundances housed in the landscape. These are represented in both 2 dimensions (for computational efficiency in simulations) and 3 dimensions (to represent species, their abundances and position in the grid).

EcoSISTEM.LongTailKernel โ€” Type
LongTailKernel <: AbstractKernel

LongTailKernel holds parameters for a movement kernel; a dispersal variance for a species, var, and a threshold, thresh, beyond which dispersal cannot take place.

EcoSISTEM.Lookup โ€” Type
Lookup

Lookup houses information on x, y grid locations and the probability of occurrence at the location for the species in question p. pnew and moves are initially empty storage and written over by the movement step in update!(). pnew is the recalculated probability based on which directions are available and moves is the number of moves to that grid location in that step.

EcoSISTEM.Match โ€” Type
Match{TR} <: AbstractTraitRelationship{TR}

The relationship between a discrete trait and its environment, paramaterised on any TR. Current conditions are matched to a trait preference and checked for a match.

EcoSISTEM.MultiScenario โ€” Type
MultiScenario{S1 <: AbstractScenario, S2 <: AbstractScenario} <: AbstractScenario

This scenario type holds multiple different scenario types.

EcoSISTEM.NoBoundary โ€” Type
NoBoundary <: BoundaryCondition

A hard boundary where no species can cross.

EcoSISTEM.NoMovement โ€” Type
NoMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement

No movement can take place.

EcoSISTEM.NoRelContinuous โ€” Type
NoRelContinuous{TR} <: AbstractTraitRelationship{TR}

The absense of a relationship between a continuous trait and its environment, paramaterised on any TR. Returns the value 1.

EcoSISTEM.NoRelDiscrete โ€” Type
NoRelDiscrete{TR} <: AbstractTraitRelationship{TR}

The absense of a relationship between a discrete trait and its environment, paramaterised on any TR. Returns the value 1.

EcoSISTEM.PopGrowth โ€” Type
PopGrowth <: AbstractParams

Basic parameter type that holds information on a population's birth and death rates, birth and death, as well as how these are altered by energy availability. l represents the longevity of species based on their energy requirements and s is the survival of species dependent on how well their traits reflect the environment.

EcoSISTEM.RainBin โ€” Type
RainBin{C <: Int} <: ContinuousTrait{C}

Trait type that holds binned rainfall preference information created through ClimatePref. Holds an array of counts per rainfall band (mm).

EcoSISTEM.SimpleBudget โ€” Type
SimpleBudget <: AbstractBudget{Float64}

This budget type has a matrix of floats, representing the energy budget of each subcommunity in the abiotic environment.

EcoSISTEM.SimpleRequirement โ€” Type
SimpleRequirement <: Abstract1Requirement{Float64}

A simple energy requirement is a single float for each species.

EcoSISTEM.SimpleScenario โ€” Type
SimpleScenario <: AbstractScenario

This scenario type holds a function that acts to change the entire ecosystem.

EcoSISTEM.SizeRequirement โ€” Type
SizeRequirement <: Abstract1Requirement{Float64}

A simple energy requirement is a single float for each species.

EcoSISTEM.SolarBudget โ€” Type
SolarBudget <: AbstractBudget{typeof(1.0*kJ)}

This budget type has a matrix of solar energy units, representing the energy budget of each subcommunity in the abiotic environment at a fixed point in time.

EcoSISTEM.SolarRequirement โ€” Type
SolarRequirement <: Abstract1Requirement{typeof(1.0*kJ)}

A vector of solar energy requirements (kJ) for each species.

EcoSISTEM.SolarTimeBudget โ€” Type
SolarTimeBudget <: AbstractBudget{typeof(1.0*kJ)}

This budget type has a matrix of solar energy units, representing the energy budget of each subcommunity in the abiotic environment along with which time dimension we are interested in.

EcoSISTEM.SpeciesList โ€” Type
SpeciesList{TR <: AbstractTraits, R <: AbstractRequirement,
            MO <: AbstractMovement, T <: AbstractTypes,
            P <: AbstractParams} <: AbstractTypes

Species list houses all species-specific information including trait information, phylogenetic relationships, requirement for energy and movement types.

EcoSISTEM.SpeciesList โ€” Method
SpeciesList{R <: AbstractRequirement,
  MO <: AbstractMovement, P <: AbstractParams}(numspecies::Int64,
  numtraits::Int64, abun_dist::Distribution, req::R,
  movement::MO, params::P)

Function to create a SpeciesList given a number of species, the number of traits they possess, their abundances, requirement from the environment and their movement kernel.

EcoSISTEM.SpeciesList โ€” Method
SpeciesList{R <: AbstractRequirement, MO <: AbstractMovement,
  T <: AbstractTypes, P <: AbstractParams}(numspecies::Int64,
  numtraits::Int64, abun_dist::Distribution, req::R,
  movement::MO, phy::T, params::P)

Function to create a SpeciesList given a number of species, the number of traits they possess, their abundances, requirement from the environment and their movement kernel and any type of AbstractTypes.

EcoSISTEM.TempBin โ€” Type
TempBin{C <: Int} <: ContinuousTrait{C}

Trait type that holds binned temperature preference information created through ClimatePref. Holds an array of counts per temperature band (ยฐC).

EcoSISTEM.Torus โ€” Type
Torus <: BoundaryCondition

A toroidal boundary where species can cross both boundaries.

EcoSISTEM.TraitCollection2 โ€” Type
TraitCollection2{T1, T2} <: AbstractTraits{Tuple{T1, T2}}

Trait collection that holds two trait types, TR1 and TR2.

EcoSISTEM.TraitCollection3 โ€” Type
TraitCollection3{T1, T2, T3} <: AbstractTraits{Tuple{T1, T2, T3}}

Trait collection that holds three trait types, TR1, TR2 and TR3.

EcoSISTEM.Trapeze โ€” Type
Trapeze{TR} <: AbstractTraitRelationship{TR}

The relationship between a continuous trait and its environment, paramaterised on any TR.

EcoSISTEM.Trapezoid โ€” Type
Trapezoid{T<:Real} <: ContinuousUnivariateDistribution

Trapezoidal distribution as described at https://en.wikipedia.org/wiki/Trapezoidal_distribution.

EcoSISTEM.Unif โ€” Type
Trapeze{TR} <: AbstractTraitRelationship{TR}

The relationship between a continuous trait and its environment, paramaterised on any TR.

EcoSISTEM.VolWaterBudget โ€” Type
VolWaterBudget <: AbstractBudget{typeof(1.0*mm)}

This budget type has a matrix of water volumes, representing the energy budget of each subcommunity in the abiotic environment at a fixed point in time.

EcoSISTEM.VolWaterRequirement โ€” Type
VolWaterRequirement <: Abstract1Requirement{typeof(1.0*mm)}

A vector of soil water volume requirements (m^3) for each species.

EcoSISTEM.VolWaterTimeBudget โ€” Type
VolWaterTimeBudget <: AbstractBudget{typeof(1.0*mm)}

This budget type has a matrix of volumetric soil water units, representing the water budget of each subcommunity in the abiotic environment along with which time dimension we are interested in.

EcoSISTEM.WaterBudget โ€” Type
WaterBudget <: AbstractBudget{typeof(1.0*mm)}

This budget type has a matrix of rainfall energy units, representing the energy budget of each subcommunity in the abiotic environment at a fixed point in time.

EcoSISTEM.WaterRequirement โ€” Type
WaterRequirement <: Abstract1Requirement{typeof(1.0*mm)}

A vector of water requirements (mm) for each species.

EcoSISTEM.WaterTimeBudget โ€” Type
WaterTimeBudget <: AbstractBudget{typeof(1.0*mm)}

This budget type has a matrix of rainfall units, representing the water budget of each subcommunity in the abiotic environment along with which time dimension we are interested in.

EcoSISTEM.additiveTR2 โ€” Type
additiveTR2{TR1, TR2} <: AbstractTraitRelationship{Tuple{TR1, TR2}}

Type that houses multiple AbstractTraitRelationships for two trait and habitat levels.

EcoSISTEM.additiveTR3 โ€” Type
multiplicativeTR3{TR1, TR2, TR3} <: AbstractTraitRelationship{Tuple{TR1, TR2, TR3}}

Type that houses multiple AbstractTraitRelationships for three trait and habitat levels.

EcoSISTEM.multiplicativeTR2 โ€” Type
multiplicativeTR2{TR1, TR2} <: AbstractTraitRelationship{Tuple{TR1, TR2}}

Type that houses multiple AbstractTraitRelationships for two trait and habitat levels.

EcoSISTEM.multiplicativeTR3 โ€” Type
multiplicativeTR3{TR1, TR2, TR3} <: AbstractTraitRelationship{Tuple{TR1, TR2, TR3}}

Type that houses multiple AbstractTraitRelationships for three trait and habitat levels.

EcoSISTEM.BM โ€” Function
BM(T::Real, ฯƒยฒ::Float64, start::Float64, lab::String="")

Function to evolve a Real value through Brownian motion, with a starting value, start, and rate, ฯƒยฒ.

EcoSISTEM.ContinuousEvolve โ€” Method
ContinuousEvolve(val::Union{Float64, Unitful.Quantity{Float64}}, var::Union{Float64, Unitful.Quantity{Float64}}, tree::BinaryTree)

Function to evolve a continuous trait along a BinaryTree, tree via Brownian motion. Takes in a starting value, val and a variance, var.

EcoSISTEM.DiscreteEvolve โ€” Function
DiscreteEvolve(numTraits::Int64, tree::BinaryTree)

Function to evolve a discrete switching trait along a BinaryTree, tree. Takes in a number of traits, numTraits to be switched between and rate to switch between traits, switch_rate with default value of 0.5.

EcoSISTEM.HabitatLoss โ€” Method
HabitatLoss(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to destroy habitat for one timestep of the ecosystem using HabitatUpdate information.

EcoSISTEM.NoChange โ€” Method
NoChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to keep the habitat the same for one timestep of the model.

EcoSISTEM.RainfallChange โ€” Method
RainfallChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to change the rainfall for one timestep of the ecosystem using HabitatUpdate information.

EcoSISTEM.TempChange โ€” Method
TempChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to increase the temperature for one timestep of the ecosystem using HabitatUpdate information.

EcoSISTEM.TempFluct โ€” Method
TempFluct(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to fluctuate the temperature for one timestep of the ecosystem using HabitatUpdate information.

EcoSISTEM.abundances โ€” Method
abundances(cache::CachedEcosystem, tm::Unitful.Time)

Function to extract abundances for an ecosystem, cache, at a certain point in time, tm. If the abundances for that time are missing from the ecosystem, then the function checks on disk for the last saved version and simulates forward.

EcoSISTEM.assign_traits! โ€” Method
assign_traits!(tree::AbstractTree, start::Vector{Float64},
  ฯƒยฒ::Vector{Float64})

Function to evolve continuous functional traits through a phylogenetic tree through Brownian motion, with a starting value, start, and rate, ฯƒยฒ.

EcoSISTEM.assign_traits! โ€” Method
assign_traits!(tree::AbstractTree, switch_rate::Vector{Float64},
traits::Vector{Vector{String}})

Function to evolve categorical functional traits through a phylogenetic tree with a specific switching rate.

EcoSISTEM.bioclimAE โ€” Method

bioclimAE(bc::Worldclim_bioclim, maxbud::Unitful.Quantity{Float64}, area::Unitful.Area{Float64})

Function to create a ContinuousHab, SimpleBudget type abiotic environment from an Wordclim type climate. It either creates a SimpleBudget type filled with the maximum budget value maxbud or uses a provided budget of type SolarBudget. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.budgetupdate! โ€” Method
budgetupdate!(eco::AbstractEcosystem, timestep::Unitful.Time)

Function to update the budget of an ecosystem for one timestep.

EcoSISTEM.calc_lookup_moves! โ€” Method
calc_lookup_moves!(bound, x::Int64, y::Int64, sp::Int64, eco::Ecosystem, abun::Int64)

Function to calculate the number of moves taken by a species, sp, from a specific grid square location (x, y). There is a boundary condition, bound, which determines how the species can move across space (see AbstractBoundary). The total abundance of individuals is given in abun, which may be the number of births in the timestep, or total indiviuals.

EcoSISTEM.combineTR โ€” Method
combineTR

Function that combines the output of multiple trait relationships, which varies depending on whether multiplicative, additive etc.

EcoSISTEM.convert_coords โ€” Function
convert_coords(eco, i::Int64, width::Int64)
convert_coords(eco, x::Int64, y::Int64, width::Int64)

Function to convert coordinates from two-dimensional (x,y) format to one dimension (i), or vice versa, using the width of the grid. This function can also be applied to arrays of coordinates.

EcoSISTEM.emptygridlandscape โ€” Method
emptygridlandscape(gae::GridAbioticEnv, spplist::SpeciesList)

Function to create an empty GridLandscape given a GridAbioticEnv and a SpeciesList.

EcoSISTEM.emptypopulate! โ€” Method
emptypopulate!(ml::GridLandscape, spplist::SpeciesList,
               abenv::AB, rel::R) where {AB <: EcoSISTEM.AbstractAbiotic, R <: EcoSISTEM.AbstractTraitRelationship}
EcoSISTEM.energy_adjustment โ€” Method
energy_adjustment(eco::Ecosystem, bud::AbstractBudget, i::Int64, sp::Int64)

Function to calculate how much birth and death rates should be adjusted by, according to how much energy is available, bud, in the grid square, i, and how much energy the species, sp, requires.

EcoSISTEM.equalpop โ€” Method
equalpop(params::EqualPop, numspp)

Function that takes demographic parameters from type EqualPop and converts them into type PopGrowth based on the number of species (numspp).

EcoSISTEM.eraAE โ€” Method

eraAE(era::ERA, maxbud::Unitful.Quantity{Float64})

Function to create a ContinuousHab, SimpleBudget type abiotic environment from an ERA type climate. It either creates a SimpleBudget type filled with the maximum budget value maxbud or uses a provided budget of type SolarTimeBudget. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.eraChange โ€” Method
eraChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to step the ERA climate forward by one timestep.

EcoSISTEM.genlookups โ€” Method
genlookups(hab::AbstractHabitat, mov::GaussianMovement)

Function to generate lookup tables, which hold information on the probability of moving to neighbouring squares.

EcoSISTEM.geom_mean_abun โ€” Method
geom_mean_abun(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the geometric mean abundance for the entire ecosystem.

EcoSISTEM.get_neighbours โ€” Function
get_neighbours(mat::Matrix, x_coord::Int64, y_coord::Int64, chess::Int64=4)

Function to get the neighbours of a grid square in a matrix in 4 or 8 directions

EcoSISTEM.get_traits โ€” Function
get_traits(tree::AbstractTree, tips::Bool=true)

Function to retrieve functional traits assigned to a phylogenetic tree, either just tips or all nodes.

EcoSISTEM.getbudget โ€” Method
getbudget(eco::Ecosystem)

Function to extract budget from Ecosystem object.

EcoSISTEM.getdimension โ€” Method
getdimension(eco::Ecosystem)

Function to extract dimension of habitat from Ecosystem object.

EcoSISTEM.getdispersaldist โ€” Method
getdispersaldist(eco::Ecosystem)

Function to extract average dispersal distance of species from Ecosystem object. Returns a vector of distances, unless a specific species is provided as a String or Integer.

EcoSISTEM.getdispersalvar โ€” Method
getdispersalvar(eco::Ecosystem)

Function to extract dispersal varaince of species from Ecosystem object. Returns a vector of distances, unless a specific species is provided as a String or Integer.

EcoSISTEM.getgridsize โ€” Method
getgridsize(eco::Ecosystem)

Function to extract grid cell size of habitat from Ecosystem object.

EcoSISTEM.gethabitat โ€” Method
gethabitat(eco::Ecosystem)

Function to extract habitat from Ecosystem object.

EcoSISTEM.getlookup โ€” Method
getlookup(eco::Ecosystem)

Function to extract movement lookup table of species from Ecosystem object.

EcoSISTEM.getpref โ€” Method
getpref(traits::T, field::Symbol) where T <: AbstractTraits

Function to extract trait preferences for all species in the ecosystem.

EcoSISTEM.getrelationship โ€” Method
getpref(traits::T, field::Symbol) where T <: AbstractTraits

Function to extract the trait relationship of all species in the ecosystem.

EcoSISTEM.getsize โ€” Method
getsize(eco::Ecosystem)

Function to extract size of habitat from Ecosystem object.

EcoSISTEM.habitatupdate! โ€” Method
habitatupdate!(eco::AbstractEcosystem, timestep::Unitful.Time)

Function to update the habitat of an ecosystem for one timestep.

EcoSISTEM.makeunique โ€” Method
makeunique(eco::Ecosystem)

Function to convert type of similarity in SpeciesList to UniqueTypes, i.e. an identity matrix.

EcoSISTEM.mean_abun โ€” Method
mean_abun(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the mean arithmetic abundance for the entire ecosystem.

EcoSISTEM.meta_shannon โ€” Method
meta_shannon(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the Shannon entropy for the entire ecosystem.

EcoSISTEM.meta_simpson โ€” Method
meta_simpson(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the Simpson diversity for the entire ecosystem.

EcoSISTEM.meta_speciesrichness โ€” Method
meta_speciesrichness(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the species richness for the entire ecosystem.

EcoSISTEM.move! โ€” Method
move!(eco::Ecosystem, ::AbstractMovement, i::Int64, sp::Int64, grd::Array{Int64, 2}, abun::Int64)

Function to calculate the movement of species sp from a given position in the landscape i, using the lookup table found in the Ecosystem and updating the movement patterns on a cached grid, grd. Optionally, a number of births can be provided, so that movement only takes place as part of the birth process, instead of the entire population

EcoSISTEM.pd โ€” Method
pd(eco::Ecosystem, qs::Vector{Float64})

Function to calculate Faith's phylogenetic diversity (PD) for the entire ecosystem.

EcoSISTEM.peakedgradAE โ€” Method
peakedgradAE(minT::Unitful.Temperature{Float64},
   maxT::Unitful.Temperature{Float64},
   dimension::Tuple{Int64, Int64}, maxbud::Unitful.Quantity{Float64},
   area::Unitful.Area{Float64}, rate::Quantity{Float64, ๐šฏ*๐“^-1},
   active::Array{Bool, 2})

Function to create a temperature gradient ContinuousHab, SimpleBudget type abiotic environment. Given a min and max temperature, it generates a gradient from minima at the top and bottom peaking to maximum in the middle. It creates a ContinuousHab environment with dimensions dimension and a specified area area. It also creates a SimpleBudget type filled with the maximum budget value maxbud. The rate of temperature change is specified using the parameter rate. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.raingrad โ€” Method
raingrad(minT::Unitful.Temperature{Float64}, maxT::Unitful.Temperature{Float64},
  size::Unitful.Length{Float64},
  dim::Tuple{Int64, Int64}, rate::Quantity{Float64, ๐šฏ*๐“^-1})

Function to create a ContinuousHab habitat with a rainfall gradient.

EcoSISTEM.raingradAE โ€” Method
raingradAE(min::Unitful.Temperature{Float64},
  max::Unitful.Temperature{Float64},
  dimension::Tuple{Int64, Int64}, maxbud::Float64,
  area::Unitful.Area{Float64}, rate::Quantity{Float64, typeof(๐šฏ*๐“^-1)},
  active::Array{Bool, 2})

Function to create a rain gradient ContinuousHab, SimpleBudget type abiotic environment. Given a min and max rainfall, it generates a gradient from minimum at the bottom to maximum at the top. It creates a ContinuousHab environment with dimensions dimension and a specified area area. It also creates a SimpleBudget type filled with the maximum budget value maxbud. The rate of rainfall change is specified using the parameter rate. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.randomniches โ€” Method
randomniches(dimension::Tuple, types::Vector{String}, clumpiness::Float64, weights::Vector)

Function to create a DiscreteHab habitat of dimension dimension, made up of sampled string types, types, that have a weighting, weights and clumpiness parameter, clumpiness.

EcoSISTEM.reenergise! โ€” Method
reenergise!(eco::Ecosystem, budget::Union{Float64, Unitful.Quantity{Float64}}, grid::Tuple{Int64, Int64})

Function to refill an ecosystem eco, with energy from a budget value, budget and a grid size.

EcoSISTEM.repopulate! โ€” Method
repopulate!(eco::Ecosystem, abun::Int64)

Function to repopulate an ecosystem eco, with option for including trait preferences. An additional abun parameter can be included, in order to repopulate the ecosystem with a specified number of individuals.

EcoSISTEM.resetrate! โ€” Method
resetrate!(eco::Ecosystem, rate::Quantity{Float64, typeof(๐“^-1)})

Function to reset the rate of habitat change for a species.

EcoSISTEM.runscenario! โ€” Method
runscenario!(eco::Ecosystem, timestep::Unitful.Time, scenario::S, currentstep::Unitful.Time) where S <: AbstractScenario

This function runs any scenario type for one timestep.

EcoSISTEM.simplehabitat โ€” Method
simplehabitat(val::Unitful.Quantity, size::Unitful.Length,
dim::Tuple{Int64, Int64})

Function to create a ContinuousHab habitat of dimension dim, with cell size and filled value, val.

EcoSISTEM.simplehabitatAE โ€” Method
simplehabitatAE(val::Union{Float64, Unitful.Quantity{Float64}},
    dimension::Tuple{Int64, Int64}, maxbud::Float64, area::Unitful.Area{Float64},
    active::Array{Bool, 2})

Function to create a simple ContinuousHab, SimpleBudget type abiotic environment. It creates a ContinuousHab filled with a given value, val, dimensions (dimension) and a specified area (area). It also creates a SimpleBudget type filled with the maximum budget value (maxbud). The rate of temperature change is specified using the parameter rate. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.simplenicheAE โ€” Method
simplenicheAE(numniches::Int64, dimension::Tuple,
                    maxBud::Float64, area::Unitful.Area{Float64},
                    active::Array{Bool, 2})

Function to create a simple DiscreteHab, SimpleBudget type abiotic environment. Given a number of niche types numniches, it creates a DiscreteHab environment with dimensions dimension and a specified area area. It also creates a SimpleBudget type filled with the maximum budget value maxbud. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.simulate! โ€” Method
simulate!(cache::CachedEcosystem,  srt::Unitful.Time, timestep::Unitful.Time)

Function to run a cached ecosystem, cache at a specified timepoint, srt, for a particular timestep, 'timestep'.

EcoSISTEM.simulate! โ€” Method
simulate!(eco::Ecosystem, duration::Unitful.Time, interval::Unitful.Time,
     timestep::Unitful.Time)

Function to run an ecosystem, eco for specified length of times, duration, for a particular timestep, 'timestep'.

EcoSISTEM.simulate! โ€” Method
simulate!(eco::Ecosystem, times::Unitful.Time, timestep::Unitful.Time, cacheInterval::Unitful.Time,

cacheFolder::String, scenario_name::String)

Function to run an ecosystem, eco for specified length of times, duration, for a particular timestep, 'timestep'. A cache interval and folder/file name are specified for saving output.

EcoSISTEM.simulate_record! โ€” Method
simulate_record!(eco::Ecosystem, duration::Unitful.Time, interval::Unitful.Time,
     timestep::Unitful.Time)

Function to run an ecosystem, eco for specified length of times, duration, for a particular timestep, 'timestep', and time interval for abundances to be recorded, interval. Optionally, there may also be a scenario by which the whole ecosystem is updated, such as removal of habitat patches.

EcoSISTEM.simulate_record_diversity! โ€” Method
simulate_record_diversity!(storage::AbstractArray, eco::Ecosystem,
  times::Unitful.Time, interval::Unitful.Time,timestep::Unitful.Time,
  scenario::SimpleScenario, divfun::Function, qs::Float64)

Function to run an ecosystem, eco for specified length of times, duration, for a particular timestep, 'timestep', and time interval for a diversity to be calculated and recorded, interval. Optionally, there may also be a scenario by which the whole ecosystem is updated, such as removal of habitat patches.

EcoSISTEM.sorenson โ€” Method
sorenson(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the Sorenson similarity for the entire ecosystem.

EcoSISTEM.tematch โ€” Method
tematch(sppl::SpeciesList, abenv::AbstractAbiotic)

Function to check that the types of a trait list and habitat list are the same for a species list (sppl) and abiotic environment (abenv).

EcoSISTEM.tempgrad โ€” Method
tempgrad(minT::Unitful.Temperature{Float64}, maxT::Unitful.Temperature{Float64},
  size::Unitful.Length{Float64},
  dim::Tuple{Int64, Int64}, rate::Quantity{Float64, ๐šฏ*๐“^-1})

Function to create a ContinuousHab habitat with a temperature gradient.

EcoSISTEM.tempgradAE โ€” Method
tempgradAE(min::Unitful.Temperature{Float64},
  max::Unitful.Temperature{Float64},
  dimension::Tuple{Int64, Int64}, maxbud::Float64,
  area::Unitful.Area{Float64}, rate::Quantity{Float64, typeof(๐šฏ*๐“^-1)},
  active::Array{Bool, 2})

Function to create a temperature gradient ContinuousHab, SimpleBudget type abiotic environment. Given a min and max temperature, it generates a gradient from minimum at the bottom to maximum at the top. It creates a ContinuousHab environment with dimensions dimension and a specified area area. It also creates a SimpleBudget type filled with the maximum budget value maxbud. The rate of temperature change is specified using the parameter rate. If a Bool matrix of active grid squares is included, active, this is used, else one is created with all grid cells active.

EcoSISTEM.traitfun โ€” Method
traitfun(eco::AbstractEcosystem, pos::Int64, sp::Int64)

Function to calculate relationship between the current environment and a species' particular trait.

EcoSISTEM.traitpopulate! โ€” Method
traitpopulate!(ml::GridLandscape, spplist::SpeciesList,
               abenv::AbstractAbiotic)

Function to populate a grid landscape given the abundances found in species list based upon how well the species traits match their environment.

EcoSISTEM.traitrepopulate! โ€” Method
repopulate!(eco::Ecosystem, abun::Int64)

Function to repopulate an ecosystem eco, with option for including trait preferences. An additional abun parameter can be included, in order to repopulate the ecosystem with a specified number of individuals.

EcoSISTEM.trmatch โ€” Method
trmatch(sppl::SpeciesList, traitrel::AbstractTraitRelationship)

Function to check that the types of a trait list and trait relationship list are the same for a species list (sppl) and trait relationship (traitrel).

EcoSISTEM.update! โ€” Method
update!(eco::Ecosystem, time::Unitful.Time)

Function to update a ecosystem abundances and environment for one timestep.

EcoSISTEM.update_energy_usage! โ€” Method
update_energy_usage!(eco::Ecosystem)

Function to calculate how much energy has been used up by the current species in each grid square in the ecosystem, eco. This function is parameterised on whether the species have one type of energy requirement or two.

EcoSISTEM.worldclimAE โ€” Method

worldclimAE(wc::Worldclim_monthly, maxbud::Unitful.Quantity{Float64})

Function to create a ContinuousTimeHab, SimpleBudget type abiotic environment from a Wordclim type climate. It either creates a SimpleBudget type filled with the maximum budget value maxbud or uses a provided budget of type SolarTimeBudget. If a Bool matrix of active grid squares is included, active, this is used, otherwise one is all grid cells are considered active.

EcoSISTEM.worldclimChange โ€” Method
worldclimChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to step the Worldclim climate forward by one timestep.