API

EcoSISTEM.AbstractAbioticType
AbstractAbiotic{H <: AbstractHabitat, B <: AbstractBudget} <: AbstractPartition

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

source
EcoSISTEM.AbstractEcosystemType
AbstractEcosystem{L <: AbstractLandscape, Part <: AbstractPartition, SL <: AbstractSpeciesList,
TR <: AbstractTraitRelationship, LU <: AbstractLookup, C <: AbstractCache} <:
AbstractMetacommunity{Float64, Matrix{Int64}, Matrix{Float64}, SL, Part}

Abstract type for Ecosystems which is a subtype of AbstractMetacommunity.

source
EcoSISTEM.AbstractEpiEnvType
AbstractEpiEnv{H <: AbstractHabitat, C <: AbstractControl} <:
AbstractPartition{H}

Abstract supertype for all epi environment types and a subtype of AbstractPartition.

source
EcoSISTEM.AbstractPlaceTransitionType
AbstractPlaceTransition <: AbstractTransition

Abstract type for place transitions. Place transitions occur across multiple grid squares for a single type, e.g. dispersal of seeds across the landscape.

source
EcoSISTEM.AbstractRequirementType
Abstract1Requirement{Energy}

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

source
EcoSISTEM.AbstractSetUpType
AbstractSetUp <: AbstractTransition

Abstract type for transitions that set up the Ecosystem at the start of the timestep.

source
EcoSISTEM.AbstractStateTransitionType
AbstractStateTransition <: AbstractTransition

Abstract type for state transitions. State transitions occur between types within a single grid square, e.g. growth between age categories, or transitions between disease categories.

source
EcoSISTEM.AbstractWindDownType
AbstractWindDown <: AbstractTransition

Abstract type for transitions that wind down the Ecosystem at the end of the timestep.

source
EcoSISTEM.AlwaysMovementType
AlwaysMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement

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

source
EcoSISTEM.BirthOnlyMovementType
BirthOnlyMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement

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

source
EcoSISTEM.BirthProcessType
BirthProcess <: AbstractStateTransition

Stochastic birth process for a location and species, with an associated probability. An optional destination argument can be added if the birth should be added to a different category (i.e. age structured).

source
EcoSISTEM.CacheType
Cache

Cache houses an integer array of moves made by all species in a timestep for the update! function, netmigration, a matrix of current resource used in the Ecosystem, totalE, and a Bool to say if these caches are valid.

source
EcoSISTEM.CachedEcosystemType
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.

source
EcoSISTEM.CachedEcosystemMethod
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.

source
EcoSISTEM.CachedGridLandscapeType
CachedGridLandscape

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

source
EcoSISTEM.ContinuousHabType
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.

source
EcoSISTEM.ContinuousTimeHabType
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.

source
EcoSISTEM.ContinuousTraitType
ContinuousTrait{C <: Number} <: AbstractTraits{T}

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

source
EcoSISTEM.CylinderType
Cylinder <: BoundaryCondition

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

source
EcoSISTEM.DeathProcessType
DeathProcess <: AbstractStateTransition

Stochastic death process for a location and species, with an associated probability.

source
EcoSISTEM.DevelopSymptomsType
DevelopSymptoms <: AbstractStateTransition

Transition from pre-infectious to infectious categories at a set probability, prob. Any infectious category can be designated through destination.

source
EcoSISTEM.DiscreteHabType
DiscreteHab <: AbstractHabitat{String}

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

source
EcoSISTEM.DiscreteTraitType
BasicTrait{T} <: AbstractTraits{T}

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

source
EcoSISTEM.EcosystemType
Ecosystem{L <: AbstractLandscape, Part <: AbstractPartition, SL <: AbstractSpeciesList,
TR <: AbstractTraitRelationship, LU <: AbstractLookup, C <: AbstractCache} <:
AbstractEcosystem{L, Part, SL, TR, LU, C}

Ecosystem type which is a subtype of AbstractEcosystem. It houses information on the abundances of species in the landscape, abundances, information about those species, spplist, information about the abiotic environment, abenv, the ordinariness (for Diversity.jl calculations), the relationship between the species and their environment, a pre-calculated lookup of all possible moves that could be made by each species, a cache, and a list of transitions.

source
EcoSISTEM.EcosystemMethod

Ecosystem(spplist::SpeciesList, abenv::GridAbioticEnv, rel::AbstractTraitRelationship; transitions::Union{Nothing, TransitionList} = nothing)

Function to create an Ecosystem with species from a SpeciesList, environment from a GridAbioticEnvironment, an AbstractTraitRelationship between the two, and a list of transitions. The Ecosystem is automatically and randomly populated from the start abundances in spplist.

source
EcoSISTEM.EcosystemMethod

Ecosystem(abundances::EpiLandscape{U, VecRNGType}, epilist::EL, epienv::EE, ordinariness::Union{Matrix{Float64}, Missing}, relationship::ER, lookup::EpiLookup, vm::Array{Float64, 2}, initial_infected::Int64, valid::Bool, transitions::Union{Nothing, TransitionList} ) where {U <: Integer, VecRNGType <: AbstractVector{<:Random.AbstractRNG}, EE <: AbstractEpiEnv, EL <: SpeciesList, ER <: AbstractTraitRelationship}

Function to create an Ecosystem with epi categories from a SpeciesList, environment from a AbstractEpiEnvironment, an AbstractTraitRelationship between the two, an EpiLookup of pre-determined moves, information for the EpiCache (initial_infected, valid and vm) and a list of transitions. An EpiCache is automatically generated.

source
EcoSISTEM.EcosystemMethod

Ecosystem(popfun::F, spplist::SpeciesList{T, Req}, abenv::GridAbioticEnv, rel::AbstractTraitRelationship; transitions::Union{Nothing, TransitionList} = nothing) where {F<:Function, T, Req}

Function to create an Ecosystem with species from a SpeciesList, environment from a GridAbioticEnvironment, an AbstractTraitRelationship between the two, and a list of transitions. The Ecosystem can be populated with a popfun.

source
EcoSISTEM.EcosystemMethod

Ecosystem(popfun::F, epilist::SpeciesList, epienv::GridEpiEnv, rel::AbstractTraitRelationship, intnum::U; initial_infected = 0, rngtype::Type{R} = Random.MersenneTwister, transitions = nothing) where {F<:Function, U <: Integer, R <: Random.AbstractRNG}

Function to create an Ecosystem with epi categories from a SpeciesList, environment from a GridEpiEnv, an AbstractTraitRelationship between the two, an indication of what integer type the abundances should be stored in intnum, an optional number of initial_infected to be seeded, and optional type for rand calls, rngtype, and an optional list of transitions. The Ecosystem can be populated with a popfun.

source
EcoSISTEM.EcosystemMethod

Ecosystem(epilist::SpeciesList, epienv::GridEpiEnv, rel::AbstractTraitRelationship, intnum::U = Int64(1); initial_infected = 0, rngtype::Type{R} = Random.MersenneTwister, transitions = nothing ) where {U <: Integer, R <: Random.AbstractRNG}

Function to create an Ecosystem with epi categories from a SpeciesList, environment from a GridEpiEnv, an AbstractTraitRelationship between the two, an indication of what integer type the abundances should be stored in intnum, an optional number of initial_infected to be seeded, and optional type for rand calls, rngtype, and an optional list of transitions. The Ecosystem is automatically and randomly populated from the start abundances in spplist.

source
EcoSISTEM.EnvExposureType
EnvExposure <: AbstractStateTransition

Transition for exposure of susceptibles to force of infection and environmental reservoir at set probabilities, force_prob and virus_prob respectively. This exposure mechanism is influenced by the local environment (fetched through the get_env function), controlled by the strength of env_param.

source
EcoSISTEM.EpiCacheType
EpiCache

EpiCache houses a float array of moves made by all force of infection categories in a timestep for the update! function, virusmigration, an integer of how many initially infected individuals are introduced to the system, an array of locations that are active in the system, ordered_active, and a Bool to say if these caches are valid.

source
EcoSISTEM.EpiLandscapeType
EpiLandscape

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

source
EcoSISTEM.EpiLookupType
EpiLookup  <: AbstractLookup

EpiLookup holds sparse matrices of local (locallookup) and commuting (regionlookup) moves for epi simulations.

source
EcoSISTEM.EpiMovementType
EpiMovement{MO <: AbstractMovement} <: AbstractMovement

Movement can happen at several different levels, local gaussian processes, localmoves, and longer distance moves, regionmoves.

source
EcoSISTEM.EpiParamsType
EpiParams{U <: Unitful.Units} <: AbstractParams

Parameter set for any epi model type, which stores information on birth, virus generation and decay probabilities, as well as matrices for transitions between different states. transition houses straightforward transition probabilities between classes, whereas transition_virus houses probabilities that should be multiplied by the amount of virus in the system, such as infection transitions.

source
EcoSISTEM.EqualPopType
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.

source
EcoSISTEM.ExposureType
Exposure <: AbstractStateTransition

Transition for exposure of susceptibles to force of infection and environmental reservoir at set probabilities, force_prob and virus_prob respectively.

source
EcoSISTEM.FluctScenarioType
FluctScenario <: AbstractScenario

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

source
EcoSISTEM.ForceProduceType
ForceProduce <: AbstractStateTransition

Transition to produce force of infection from an infectious category at a set probability, prob.

source
EcoSISTEM.GaussType
Gauss{TR} <: AbstractTraitRelationship{TR}

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

source
EcoSISTEM.GaussTraitType
GaussTrait{C <: Number} <: ContinuousTrait{C}

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

source
EcoSISTEM.GaussianKernelType
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.

source
EcoSISTEM.GenerateSeedType
GenerateSeed <: AbstractStateTransition

Stochastic seed generation process for a location and species, with an associated probability. An optional destination argument can be added if the seed produced should be added to a different category (i.e. age structured).

source
EcoSISTEM.GridAbioticEnvType
GridAbioticEnv{H, B} <: AbstractAbiotic{H, B}

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

source
EcoSISTEM.GridEpiEnvType
GridEpiEnv{H, C} <: AbstractAbiotic{H, C}

This epi environment type holds a habitat and control strategy, as well as a string of subcommunity names, and initial susceptible population.

source
EcoSISTEM.GridLandscapeType
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).

source
EcoSISTEM.HostTypesType
HostTypes{MO <: AbstractMovement,
             T <: AbstractTypes} <: AbstractTypes

HostTypes holds information on the host disease classes, such as the name of each class, their initial abundances and types, as well as how they disperse virus across the landscape.

source
EcoSISTEM.InfectionType
Infection <: AbstractStateTransition

Transition from exposed to infectious categories at a set probability, prob. Any infectious category can be designated through destination.

source
EcoSISTEM.LongTailKernelType
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.

source
EcoSISTEM.LookupType
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.

source
EcoSISTEM.MPIEcosystemType
MPIEcosystem{MPIGL <: MPIGridLandscape, Part <: AbstractAbiotic,
             SL <: SpeciesList, TR <: AbstractTraitRelationship} <: AbstractEcosystem{Part, SL, TR}

MPIEcosystem houses information on species and their interaction with their environment. It houses all information of a normal Ecosystem (see documentation for more details), with additional fields to describe which species are calculated on which machine. This includes: sppcounts - a vector of number of species per node, firstsp - the identity of the first species held by that particular node.

source
EcoSISTEM.MPIGridLandscapeType
MPIGridLandscape{RA <: Base.ReshapedArray, NT <: NamedTuple}

MPIEcosystem abundances housed in the landscape, shared across multiple nodes.

source
EcoSISTEM.MatchType
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.

source
EcoSISTEM.MultiScenarioType
MultiScenario{S1 <: AbstractScenario, S2 <: AbstractScenario} <: AbstractScenario

This scenario type holds multiple different scenario types.

source
EcoSISTEM.NoMovementType
NoMovement{K <: AbstractKernel, B <: BoundaryCondition} <: AbstractMovement

No movement can take place.

source
EcoSISTEM.NoRelContinuousType
NoRelContinuous{TR} <: AbstractTraitRelationship{TR}

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

source
EcoSISTEM.NoRelDiscreteType
NoRelDiscrete{TR} <: AbstractTraitRelationship{TR}

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

source
EcoSISTEM.PlantCacheType
PlantCache

Cache houses an integer array of seed production made by all species in the Ecosystem, seedbank, moves made by all dispersing seeds in a timestep, netmigration, a matrix of current resource used in the Ecosystem, totalE, and a Bool to say if these caches are valid.

source
EcoSISTEM.PopGrowthType
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.

source
EcoSISTEM.RainBinType
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).

source
EcoSISTEM.RecoveryType
Recovery <: AbstractStateTransition

Transition from infected to recovered category at a set probability, prob.

source
EcoSISTEM.SeedInfectionType
SeedInfection <: AbstractWindDown

Transition to update caches at end of update timestep, described in update_fun.

source
EcoSISTEM.SimpleBudgetType
SimpleBudget <: AbstractBudget{Float64}

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

source
EcoSISTEM.SimpleScenarioType
SimpleScenario <: AbstractScenario

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

source
EcoSISTEM.SolarBudgetType
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.

source
EcoSISTEM.SolarTimeBudgetType
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.

source
EcoSISTEM.SpeciesListType
SpeciesList{S <: AbstractSpeciesTypes, P <: AbstractPathogenTypes, PA <: AbstractParams} <: AbstractSpeciesList

SpeciesList holds information on any species types, pathogens types and associated parameters, params.

source
EcoSISTEM.SpeciesListMethod
SpeciesList(traits::TR, virus_abun::DataFrame, host_abun::DataFrame,
             movement::MO, transitions::DataFrame, params::NamedTuple,
             age_categories::Int64 = 1, movement_balance::NamedTuple = (local_balance = fill(1.0, nrow(host_abun) * age_categories), region_balance = fill(0.0, nrow(host_abun) * age_categories))) where {TR <: AbstractTraits, MO <: AbstractMovement}

Function to create an SpeciesList for any type of epidemiological model - creating the correct number of classes and checking dimensions.

source
EcoSISTEM.SpeciesListMethod
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.

source
EcoSISTEM.SpeciesListMethod
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.

source
EcoSISTEM.SpeciesLookupType
SpeciesLookup  <: AbstractLookup

SpeciesLookup holds Lookup information for each species in a vector, species.

source
EcoSISTEM.SpeciesTypesType
SpeciesTypes{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.

source
EcoSISTEM.TempBinType
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).

source
EcoSISTEM.TorusType
Torus <: BoundaryCondition

A toroidal boundary where species can cross both boundaries.

source
EcoSISTEM.TraitCollection3Type
TraitCollection3{T1, T2, T3} <: AbstractTraits{Tuple{T1, T2, T3}}

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

source
EcoSISTEM.TransitionListType
TransitionList{T1 <: AbstractSetUp, T2 <: AbstractStateTransition,
T3 <: AbstractPlaceTransition, T4 <: AbstractWindDown}

TransitionList type which houses information on setup, state, place and winddown transitions.

source
EcoSISTEM.TrapezeType
Trapeze{TR} <: AbstractTraitRelationship{TR}

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

source
EcoSISTEM.TrapezoidType
Trapezoid{T<:Real} <: ContinuousUnivariateDistribution

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

source
EcoSISTEM.UnifType
Trapeze{TR} <: AbstractTraitRelationship{TR}

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

source
EcoSISTEM.ViralLoadType
ViralLoad <: AbstractStateTransition

Transition for force of infection to settle into environmental reservoir.

source
EcoSISTEM.VirusTypesType
VirusTypes{TR <: AbstractTraits,
             T <: AbstractTypes} <: AbstractTypes

VirusTypes holds information on the virus classes, such as the name of each class, their trait match to the environment, initial abundances and types.

source
EcoSISTEM.VolWaterBudgetType
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.

source
EcoSISTEM.VolWaterTimeBudgetType
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.

source
EcoSISTEM.WaterBudgetType
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.

source
EcoSISTEM.WaterTimeBudgetType
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.

source
EcoSISTEM.additiveTR2Type
additiveTR2{TR1, TR2} <: AbstractTraitRelationship{Tuple{TR1, TR2}}

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

source
EcoSISTEM.additiveTR3Type
multiplicativeTR3{TR1, TR2, TR3} <: AbstractTraitRelationship{Tuple{TR1, TR2, TR3}}

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

source
EcoSISTEM.multiplicativeTR2Type
multiplicativeTR2{TR1, TR2} <: AbstractTraitRelationship{Tuple{TR1, TR2}}

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

source
EcoSISTEM.multiplicativeTR3Type
multiplicativeTR3{TR1, TR2, TR3} <: AbstractTraitRelationship{Tuple{TR1, TR2, TR3}}

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

source
Base.isapproxMethod
isapprox(epi_1::AbstractEpiSystem, epi_2::AbstractEpiSystem; kwargs...)

Compare two Ecosystems for approximate equality. Specifically, compares the Landscapes of the two systems.

Keyword arguments

  • Anything to pass to Base.isapprox.
Note

You may want to pass in atol or rtol to loosen the equality tolerance.

source
EcoSISTEM.BMFunction
BM(T::Real, σ²::Float64, start::Float64, lab::String="")

Function to evolve a Real value through Brownian motion, with a starting value, start, and rate, σ².

source
EcoSISTEM.ContinuousEvolveMethod
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.

source
EcoSISTEM.DiscreteEvolveFunction
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.

source
EcoSISTEM.HabitatLossMethod
HabitatLoss(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

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

source
EcoSISTEM.NoChangeMethod
NoChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

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

source
EcoSISTEM.RainfallChangeMethod
RainfallChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

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

source
EcoSISTEM.SEI3HRD_wrapperFunction
SEI3HRD_wrapper(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple)

Function to simulate SEI3HRD stochastic realisations, given a grid dimension, grid_size, area size, a set of model parameters, params, and running parameters, runtimes.

Outputs an abundance matrice of compartment by grid cell over time. Compartments for the SEI3HRD model are: Susceptible, Exposed, Asymptomatic Infected, Pre-symptomatic Infected, Symptomatic Infected, Hospitalised, Recovered, Dead.

source
EcoSISTEM.SEI3HRD_wrapper!Function
SEI3HRD_wrapper!(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple, abuns::Array{Int64, 3})

Function to simulate SEI3HRD stochastic realisations, given a grid dimension, grid_size, area size, a set of model parameters, params, and running parameters, runtimes.

Fills an abundance matrice of compartment by grid cell over time. Compartments for the SIR model are: Susceptible, Exposed, Asymptomatic Infected, Pre-symptomatic Infected, Symptomatic Infected, Hospitalised, Recovered, Dead.

source
EcoSISTEM.SIR_wrapper!Method
SIR_wrapper!(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple, abuns::Array{Int64, 3})

Function to simulate simple SIR stochastic realisations, given a grid dimension, grid_size, area size, a set of model parameters, params, and running parameters, runtimes.

Fills an abundance matrice of compartment by grid cell over time. Compartments for the SIR model are: Susceptible, Infected, Recovered, Dead.

source
EcoSISTEM.SIR_wrapperMethod
SIR_wrapper(grid_size::Tuple{Int64, Int64}, area::Unitful.Area{Float64}, params::NamedTuple, runtimes::NamedTuple)

Function to simulate simple SIR stochastic realisations, given a grid dimension, grid_size, area size, a set of model parameters, params, and running parameters, runtimes.

Outputs an abundance matrice of compartment by grid cell over time. Compartments for the SIR model are: Susceptible, Infected, Recovered, Dead.

source
EcoSISTEM.TempChangeMethod
TempChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

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

source
EcoSISTEM.TempFluctMethod
TempFluct(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

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

source
EcoSISTEM._construct_shrunk_matrixMethod
_construct_shrunk_matrix

Construct a shrunk matrix by selecting certain rows and columns specified by row_idxs and col_idxs from AbstractMatrix M.

Return an AxisArray{T, 2}. The axes will be the selected subset of the original axes if M is an AxisArray. If M is a normal matrix, the axes of the returned AxisArray are the selected coordinates.

source
EcoSISTEM._convert_populationMethod
_convert_population

Convert populatioin matrix to Int matrix by filling in the inactive area with 0 population and rounding the active area.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::AllDisperse, timestep::Unitful.Time)

Stochastic dispersal process across the ecosystem for a species from a location, house inside rule, for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::BirthProcess, timestep::Unitful.Time)

Stochastic birth process for a location and species, house inside rule, for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::DeathProcess, timestep::Unitful.Time)

Stochastic death process for a location and species, house inside rule, for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::EnvExposure, timestep::Unitful.Time)

Stochastic environmentally-driven exposure process for a location, housed inside rule, for one timestep. Moves from susceptible category, species to exposed category, destination.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::Exposure, timestep::Unitful.Time)

Stochastic exposure process for a location, housed inside rule, for one timestep. Moves from susceptible category, species to exposed category, destination.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::ForceDisperse)

Random dispersal of force of infection from a location.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::ForceProduce, timestep::Unitful.Time)

Generation of force of infection for a location.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::GenerateSeed, timestep::Unitful.Time)

Stochastic seeding process for a location and species, house inside rule, for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::SeedDisperse, timestep::Unitful.Time)

Stochastic seed dispersal process across the ecosystem for a species from a location, house inside rule, for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::Union{Infection, DevelopSymptoms, Hospitalise,
    DeathFromInfection, Recovery}, timestep::Unitful.Time)

Stochastic epi transition process for a location, housed inside rule, for one timestep. Moves from source category, species to destination category, destination.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::UpdateEnergy, timestep::Unitful.Time)

Calculate energy usage across the Ecosystem for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::UpdateEnvironment, timestep::Unitful.Time)

Update habitat and resource budget across the Ecosystem for one timestep.

source
EcoSISTEM._run_rule!Method
_run_rule!(eco::Ecosystem, rule::ViralLoad, timestep::Unitful.Time)

Settling of force of infection into environmental reservoir for a location.

source
EcoSISTEM.abundancesMethod
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.

source
EcoSISTEM.addtransition!Method
addtransition!(tl::TransitionList, rule::AbstractPlaceTransition)

Add a place transition to the TransitionList.

source
EcoSISTEM.addtransition!Method
addtransition!(tl::TransitionList, rule::AbstractStateTransition)

Add a state transition to the TransitionList.

source
EcoSISTEM.applycontrols!Method
applycontrols!(epi::Ecosystem, timestep::Unitful.Time)

Function to apply control strategies to an Ecosystem for one timestep.

source
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, σ².

source
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.

source
EcoSISTEM.bioclimAEMethod

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.

source
EcoSISTEM.budgetupdate!Method
budgetupdate!(eco::AbstractEcosystem, timestep::Unitful.Time)

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

source
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.

source
EcoSISTEM.classupdate!Method
classupdate!(epi::Ecosystem, timestep::Unitful.Time)

Function to update disease class abundances for one timestep.

source
EcoSISTEM.combineTRMethod
combineTR

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

source
EcoSISTEM.convert_coordsFunction
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.

source
EcoSISTEM.convert_populationMethod
function convert_population(
    initial_population,
    intnum::U = Int64(1)
)

Convert population matrix to Int matrix by filling in the inactive area with 0 population and rounding the active area.

source
EcoSISTEM.create_cacheMethod
create_cache(sppl::SpeciesList, ml::EpiLandscape)

Function to create an EpiCache for a SpeciesList and EpiLandscape.

source
EcoSISTEM.create_cacheMethod
create_cache(sppl::SpeciesList, ml::GridLandscape)

Function to create a Cache for a SpeciesList and GridLandscape.

source
EcoSISTEM.create_cacheMethod
create_cache(sppl::SpeciesList{SpeciesTypes{TR, R, MO, T}},
    ml::GridLandscape) where {TR, R, MO <: BirthOnlyMovement, T}

Function to create a PlantCache for a SpeciesList with movement only via seed production (BirthOnlyMovement) and GridLandscape.

source
EcoSISTEM.emptyepilandscapeMethod
emptyepilandscape(epienv::GridEpiEnv, epilist::SpeciesList)

Function to create an empty EpiLandscape given a GridEpiEnv and a SpeciesList.

source
EcoSISTEM.emptygridlandscapeMethod
emptygridlandscape(gae::GridAbioticEnv, spplist::SpeciesList)

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

source
EcoSISTEM.emptypopulate!Method
emptypopulate!(ml::GridLandscape, spplist::SpeciesList,
               abenv::AB, rel::R) where {AB <: EcoSISTEM.AbstractAbiotic, R <: EcoSISTEM.AbstractTraitRelationship}
source
EcoSISTEM.energy_adjustmentMethod
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.

source
EcoSISTEM.epi_update!Method
epi_update!(epi::Ecosystem, time::Unitful.Time)

Function to update disease and virus class abundances and environment for one timestep.

source
EcoSISTEM.equalpopMethod
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).

source
EcoSISTEM.eraAEMethod

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.

source
EcoSISTEM.eraChangeMethod
eraChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to step the ERA climate forward by one timestep.

source
EcoSISTEM.genlookupsMethod
genlookups(hab::AbstractHabitat, mov::GaussianMovement)

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

source
EcoSISTEM.geom_mean_abunMethod
geom_mean_abun(eco::Ecosystem, qs::Vector{Float64})

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

source
EcoSISTEM.get_envMethod
get_env(habitat::A) where A <: AbstractHabitat

Generic function to extract a habitat matrix from any habitat type.

source
EcoSISTEM.get_neighboursFunction
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

source
EcoSISTEM.get_traitsFunction
get_traits(tree::AbstractTree, tips::Bool=true)

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

source
EcoSISTEM.getdestinationMethod
getdestination(rule::AbstractStateTransition)

Generic function to get a destination to which a state transition happening.

source
EcoSISTEM.getdispersaldistMethod
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.

source
EcoSISTEM.getdispersalvarMethod
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.

source
EcoSISTEM.getlocationMethod
getlocation(rule::AbstractPlaceTransition)

Generic function to get location where a place transition happening.

source
EcoSISTEM.getlocationMethod
getlocation(rule::AbstractStateTransition)

Generic function to get location where a state transition happening.

source
EcoSISTEM.getlookupMethod
getlookup(eco::Ecosystem)

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

source
EcoSISTEM.getprefMethod
getpref(traits::T, field::Symbol) where T <: AbstractTraits

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

source
EcoSISTEM.getprobMethod
getprob(rule::AbstractStateTransition)

Generic function to get probability of a state transition happening.

source
EcoSISTEM.getrelationshipMethod
getpref(traits::T, field::Symbol) where T <: AbstractTraits

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

source
EcoSISTEM.getsizeMethod
getsize(eco::Ecosystem)

Function to extract size of habitat from Ecosystem object.

source
EcoSISTEM.getspeciesMethod
getspecies(rule::AbstractPlaceTransition)

Generic function to get species to which a place transition happening.

source
EcoSISTEM.getspeciesMethod
getspecies(rule::AbstractStateTransition)

Generic function to get species to which a state transition happening.

source
EcoSISTEM.gettransitionsMethod
gettransitions(eco::E) where E <: AbstractEcosystem

Function to extract the transition list from an arbitrary ecosystem.

source
EcoSISTEM.habitatupdate!Method
habitatupdate!(eco::AbstractEcosystem, timestep::Unitful.Time)

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

source
EcoSISTEM.initialise_outputMethod
initialise_output(
    abuns::Array,
    axes::NamedTuple;
    h5fn=joinpath(pwd(),"abundances.h5")
)

Create an HDF5 file h5fn to store abundance. Preallocate a fix-sized array to store abundance for each compartment, grid location and timestep. Fill in values for compartments, grid locations and timesteps.

source
EcoSISTEM.makeuniqueMethod
makeunique(eco::Ecosystem)

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

source
EcoSISTEM.mean_abunMethod
mean_abun(eco::Ecosystem, qs::Vector{Float64})

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

source
EcoSISTEM.meta_shannonMethod
meta_shannon(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the Shannon entropy for the entire ecosystem.

source
EcoSISTEM.meta_simpsonMethod
meta_simpson(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the Simpson diversity for the entire ecosystem.

source
EcoSISTEM.move!Method
move!(eco::Ecosystem, ::AbstractMovement, i::Int64, sp::Int64, grd::Matrix{Int64}, 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

source
EcoSISTEM.pdMethod
pd(eco::Ecosystem, qs::Vector{Float64})

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

source
EcoSISTEM.peakedgradAEMethod
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::Matrix{Bool})

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.

source
EcoSISTEM.plot_epidynamicsFunction
plot_epidynamics(
    epi::AbstractEpiSystem,
    abuns::AbstractArray{<:Integer, 3};
    category_map=nothing,
)

Plot the dynamics of abuns summed over space, as a function of time.

Arguments

  • epi: The AbstractEpiSystem to plot.
  • abuns: The array of abundances to plot, of size Ncompartments x Ncells x Nsteps

Keyword arguments

  • category_map: An iterable of key-value pairs where the keys are category names, and the values are a list of compartment indices associated with that category. These compartments will be summed in the plot. For example, the following will plot the sum of compartments 1 and 2 as the Susceptible category, and the sum of compartments 3 and 4 as the Infected category.

      category_map = ("Susceptible" => [1, 2], "Infected" => [3, 4])

    If category_map is nothing, all compartments in epi will be plotted separately with their corresponding names.

source
EcoSISTEM.plot_epiheatmapsFunction
plot_epiheatmaps(
    epi::AbstractEpiSystem,
    abuns::AbstractArray{<:Integer, 3};
    compartment="Exposed",
    steps=[],
)

Plot heatmaps of abuns for compartment at steps.

Arguments

  • epi: The AbstractEpiSystem to plot.
  • abuns: The array of abundances to plot, of size Ncompartments x Ncells x Nsteps

Keyword arguments

  • compartment: The compartment to plot
  • steps: A list of steps to plot (one heatmap for each step). If empty, plots 4 equally-spaced steps.
Note

Heatmaps are transposed by default. Pass in transpose=false to turn this off.

source
EcoSISTEM.populate!Method
populate!(ml::EpiLandscape, spplist::SpeciesList, abenv::EE, rel::R)

Function to populate an EpiLandscape with information on each disease class in the SpeciesList.

source
EcoSISTEM.raingradMethod
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.

source
EcoSISTEM.raingradAEMethod
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::Matrix{Bool})

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.

source
EcoSISTEM.randomnichesMethod
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.

source
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.

source
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.

source
EcoSISTEM.resetrate!Method
resetrate!(eco::Ecosystem, rate::Quantity{Float64, typeof(𝐓^-1)})

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

source
EcoSISTEM.resettime!Method
resettime!(eco::E) where E <: AbstractEcosystem

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

source
EcoSISTEM.run_rule!Method
run_rule!(eco::Ecosystem, rule::AbstractTransition, timestep::Unitful.Time)

Implement _run_rule! function for a particular rule type, R, for one timestep.

source
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.

source
EcoSISTEM.shrink_to_activeMethod
_shrink_to_active(M::AbstractMatrix, active::AbstractMatrix{<:Bool})

Shrink the matrix M to the minimum rectangular region which contains all active cells, as defined by active. Returns the shrunk matrix.

If active is not provided, automatically determines the active region by masking out entries which areNaNormissing`.

source
EcoSISTEM.simplehabitatMethod
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.

source
EcoSISTEM.simplehabitatAEMethod
simplehabitatAE(val::Union{Float64, Unitful.Quantity{Float64}},
    dimension::Tuple{Int64, Int64}, maxbud::Float64, area::Unitful.Area{Float64},
    active::Matrix{Bool})

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.

source
EcoSISTEM.simplehabitatAEMethod
function simplehabitatAE(
    val::Union{Float64, Unitful.Quantity{Float64}},
    dimension::Tuple{Int64, Int64},
    area::Unitful.Area{Float64},
    active::AbstractMatrix{Bool},
    control::C,
)

Function to create a simple ContinuousHab type epi environment. It creates a ContinuousHab filled with a given value val, of dimensions dimension and specified area area. If a Bool matrix active of active grid squares is included, this is used, else one is created with all grid cells active.

Note

The simulation grid will be shrunk so that it tightly wraps the active values

source
EcoSISTEM.simplenicheAEMethod
simplenicheAE(numniches::Int64, dimension::Tuple,
                    maxBud::Float64, area::Unitful.Area{Float64},
                    active::Matrix{Bool})

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.

source
EcoSISTEM.simulate!Method
function simulate!(
    eco::Ecosystem,
    duration::Unitful.Time,
    timestep::Unitful.Time;
    save=false,
    save_path=pwd(),
)

Run an ecosystem, eco, for specified length of times, duration, for a particular timestep, timestep. If save=true, inputs and outputs are saved as JLSO files at save_path.

source
EcoSISTEM.simulate_record!Method
simulate_record!(
    storage::AbstractArray,
    eco::Ecosystem,
    times::Unitful.Time,
    interval::Unitful.Time,
    timestep::Unitful.Time;
    save=false,
    save_path=pwd(),
)

Run an ecosystem, ecoepi, for specified length of times, times, 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.

source
EcoSISTEM.sorensonMethod
sorenson(eco::Ecosystem, qs::Vector{Float64})

Function to calculate the Sorenson similarity for the entire ecosystem.

source
EcoSISTEM.sum_popMethod
sum_pop(m::Matrix{Int64}, i::Int64)

Function to sum a population matrix, m, without memory allocation, at a grid location i.

source
EcoSISTEM.tematchMethod
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).

source
EcoSISTEM.tempgradMethod
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.

source
EcoSISTEM.tempgradAEMethod
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::Matrix{Bool})

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.

source
EcoSISTEM.traitfunMethod
traitfun(eco::AbstractEcosystem, pos::Int64, sp::Int64, ::P) where P <: AbstractPathogenTypes

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

source
EcoSISTEM.traitfunMethod
traitfun(eco::AbstractEcosystem, pos::Int64, sp::Int64, ::S) where S <: AbstractSpeciesTypes

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

source
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.

source
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.

source
EcoSISTEM.transitionFunction
transition(params::NamedTuple, paramDat::DataFrame, nclasses::Int64, inf_cat = [2], age_categories = 1)

Function to create transition matrix from SIS parameters and return an EpiParams type that can be used by the model update.

source
EcoSISTEM.trmatchMethod
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).

source
EcoSISTEM.ukChangeMethod
ukChange(epi::Ecosystem, hab::ContinuousTimeHab, timestep::Unitful.Time)

Function to step the uk climate forward by one timestep. Will repeat if time counter becomes greater than the number of dimensions in the habitat.

source
EcoSISTEM.update!Function
update!(eco::Ecosystem, timestep::Unitful.Time)

Update an Ecosystem by one timestep, running through different transitions, including set up, state and place transitions, and winddown.

source
EcoSISTEM.update!Method
update!(eco::AbstractEcosystem{L}, timestep::Unitful.Time, ::Nothing) where L <: EpiLandscape

Update an Ecosystem by one timestep, running through the older version of the epidemiology code.

source
EcoSISTEM.update!Method
update!(eco::AbstractEcosystem{L}, timestep::Unitful.Time, ::Nothing) where L <: GridLandscape

Update an Ecosystem by one timestep, running through the older version of the biodiversity code.

source
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.

source
EcoSISTEM.update_epi_environment!Method
update_epi_environment!(epi::Ecosystem, timestep::Unitful.Time)

Function to update the virus abundances with cached migration moves and invalidate all caches.

source
EcoSISTEM.update_outputMethod
update_output(
    abuns_t::Matrix,
    timestep::Int;
    h5fn=joinpath(pwd(),"abundances.h5")
)

Update the existing HDF5 file h5fn with the abundance matrix at a certain timestep.

source
EcoSISTEM.virusmove!Method
virusmove!(epi::AbstractEcosystem, id::Int64, pos::Int64, grd::Array{Int64, 2}, newvirus::Int64)

Function to calculate the movement of force of infection id from a given position in the landscape pos, using the lookup table found in the Ecosystem and updating the movement patterns on a cached grid, grd. The number of new virus is provided, so that movement only takes place as part of the generation process.

source
EcoSISTEM.virusupdate!Method
virusupdate!(epi::Ecosystem, time::Unitful.Time)

Function to update virus abundances and disperse for one timestep.

source
EcoSISTEM.worldclimAEMethod

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.

source
EcoSISTEM.worldclimChangeMethod
worldclimChange(eco::AbstractEcosystem, hab::ContinuousHab, timestep::Unitful.Time)

Function to step the Worldclim climate forward by one timestep.

source
Base.readMethod
read(f, filename)

Function to read raster file into julia.

source
EcoSISTEM.ClimatePref.convert_coordsFunction
convert_coords(i::Int64, width::Int64)
convert_coords(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.

source
EcoSISTEM.ClimatePref.downresolutionFunction
downresolution(data::Union{ERA, Worldclim_monthly, Worldclim_bioclim}, rescale::Int64; fn)

Function to decrease the resolution of a climate dataset, by a factor, rescale, and aggregation function, fn. The aggregation function has a default setting of taking the mean value.

source
EcoSISTEM.ClimatePref.downresolution!Function
downresolution!(resized_array::Matrix{T}, array::Matrix{T}, rescale::Int64, fn)
downresolution!(resized_array::Array{T, 3}, array::Matrix{T}, dim::Int64, rescale::Int64, fn)

Function to decrease the resolution of a climate dataset in place, by a factor, rescale, and aggregation function, fn. The aggregation function has a default setting of taking the mean value.

source
EcoSISTEM.ClimatePref.extractvaluesMethod
extractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
    bc::Worldclim_bioclim, dim::Unitful.Time)

Function to extract values from a bioclim object, at specified x, y locations and time, dim.

source
EcoSISTEM.ClimatePref.extractvaluesMethod
extractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
    bc::Worldclim_bioclim, dim::Unitful.Time)

Function to extract values from a bioclim object, at specified x, y locations and over a time period, dim.

source
EcoSISTEM.ClimatePref.extractvaluesMethod
extractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
    wc::Worldclim_monthly, dim::Unitful.Time)

Function to extract values from a worldclim object, at specified x, y locations and over a range of times, dim.

source
EcoSISTEM.ClimatePref.extractvaluesMethod
extractvalues(x::Vector{typeof(1.0°)},y::Vector{typeof(1.0°)},
    wc::Worldclim_monthly, dim::Unitful.Time)

Function to extract values from a worldclim object, at specified x, y locations and time, dim.

source
EcoSISTEM.ClimatePref.readCERAMethod
readCERA(dir::String, file::String, params::String)

Function to extract a certain parameter, param, from an CERA-20C netcdf file, and convert into an axis array.

source
EcoSISTEM.ClimatePref.readERAMethod
readERA(dir::String, file::String, param::String, dim::Vector{Vector{T}})
    where T<: Unitful.Time

Function to extract a certain parameter, param, from a directory, dir, containing ERA netcdf files, for a certain timerange, dim, and convert into an axis array.

source
EcoSISTEM.ClimatePref.readERAMethod
readERA(dir::String, param::String, dim::StepRange(typeof(1month)))

Function to extract a certain parameter, param, from an ERA netcdf file, for a certain timerange, dim, and convert into an axis array.

source
EcoSISTEM.ClimatePref.readMetMethod
readMet(dir::String, param::String)

Function to extract a certain parameter, param, from a directory, dir, containing Met Office processed HDF5 files.

source
EcoSISTEM.ClimatePref.readMet_rawMethod
readMet_raw(dir::String, param::String)

Function to extract a certain parameter, param, from an Met Office netcdf file, and convert into an axis array. No processing done.

source
EcoSISTEM.ClimatePref.readMet_rawMethod
readMet_raw(dir::String, file::String, param::String, dim::Vector{Vector{T}})
    where T<: Unitful.Time

Function to extract a certain parameter, param, from a directory, dir, containing Met Office netcdf files, for a certain timerange, dim, and convert into an axis array. No processing done.

source
EcoSISTEM.ClimatePref.upresolutionFunction
upresolution(data::Union{ERA, Worldclim_monthly, Worldclim_bioclim}, rescale::Int64; fn)

Function to increase the resolution of a climate dataset, by a factor, rescale.

source