Metrics
This section provides general metrics that are not specific to a particular group or life stage. These include indicators of structural complexity, such as AbsoluteShelterVolume, and ecological indicators like CoralDiversity.
ADRIAIndicators._colony_Lcm2_to_m3m2 — Method_colony_Lcm2_to_m3m2(colony_mean_diams_cm::Array{T,2}, colony_)::TupleHelper function to convert coral colony values from Litres/cm² to m³/m²
Arguments
colony_mean_diams_cm: Matrix of mean colony diametersplanar_area_int: planar area model interceptplanar_area_coef: planar area model coefficient
Returns
Tuple : Assumed colony volume (m³/m²) for each species/size class
References
- Aston Eoghan A., Duce Stephanie, Hoey Andrew S., Ferrari Renata (2022). A Protocol for Extracting Structural Metrics From 3D Reconstructions of Corals. Frontiers in Marine Science, 9. https://doi.org/10.3389/fmars.2022.854395
ADRIAIndicators._dimension_mismatch_message — Method_dimension_mismatch_message(array_name_1::String, array_name_2::String, dims1::Tuple, dims2::Tuple)::StringConstruct an informative error message when a discrepancy between array dimensions is detected.
Arguments
array_name_1: Name of the first array.array_name_2: Name of the second array.dims1: Shape of the first array.dims2: Shape of the second array.
Returns
String containing an informative error message.
ADRIAIndicators.absolute_shelter_volume! — Methodabsolute_shelter_volume!(rel_cover::AbstractArray{T,3}, colony_mean_diam_cm::AbstractArray{T,2}, planar_area_params::AbstractArray{T,3}, habitable_area::T, ASV::AbstractArray{T,3})::Nothing where {T<:AbstractFloat}Arguments
rel_cover: 4-D Array of relative coral cover with dimensions [timesteps ⋅ groups ⋅ size ⋅ locations], relative to habitable area.colony_mean_diam_cm: Matrix of mean colony diameter with dimensions [groups ⋅ size]planar_area_params: 3-D array of planar area parameters with dimensions [groups ⋅ size ⋅ (intercept, coefficient)]habitable_area_m2: Vector of habitable area for each location [locations]out_ASV: Output array buffer for absolute shelter volume [timesteps ⋅ groups ⋅ size ⋅ locations]
ADRIAIndicators.absolute_shelter_volume — Methodabsolute_shelter_volume(rel_cover::AbstractArray{T,4}, colony_mean_diam_cm::AbstractArray{T,2}, planar_area_params::AbstractArray{T,3}, habitable_area::AbstractVector{T})::AbstractArray{T,4} where {T<:AbstractFloat}Calculate the volume of shelter provided by the given coral cover. This function uses log-log linear models to predict the volume of shelter provided from a given planar area. The parametrisation of this log-log linear model must be provided by the user. For possible parametrisations of the log-log linear model used to predict shelter volume from planar area, see Urbina-Barreto et al. (2021), [1].
The log-log linear model is given by
\[\begin{align*} \log(S) = b + a\log(PA), \end{align*}\]
where $S$ and $PA$ are shelter volume ($m^3m_{-2}$) and planar area, respectively. Then absolute shelter volume is given by
\[\begin{align*} ASV = A_C \cdot S, \end{align*}\]
where $ASV$ and $A_C$ refers to absolute shelter volume and absolute coral cover, respectively.
Arguments
rel_cover: 4-D Array of relative coral cover with dimensions [timesteps ⋅ groups ⋅ size ⋅ locations], relative to habitable area.colony_mean_diam_cm: Matrix of mean colony diameter with dimensions [groups ⋅ size]planar_area_params: 3-D array of planar area params with dimensions [groups ⋅ size ⋅ (intercept, coefficient)]habitable_area_m2: Vector of habitable area for each location [locations]
Returns
- Output array containing absolute shelter volume [timesteps ⋅ groups ⋅ size ⋅ locations]
References
- Urbina-Barreto, I., Chiroleu, F., Pinel, R., Fréchon, L., Mahamadaly, V., Elise, S., Kulbicki, M., Quod, J.-P., Dutrieux, E., Garnier, R., Henrich Bruggemann, J., Penin, L., & Adjeroud, M. (2021). Quantifying the shelter capacity of coral reefs using photogrammetric 3D modeling: From colonies to reefscapes. Ecological Indicators, 121, 107151. https://doi.org/10.1016/j.ecolind.2020.107151
ADRIAIndicators.coral_diversity! — Methodcoral_diversity(r_taxa_cover::Array{T, 3}, out_coral_diversity::Array{T,2})::Nothing where {T<:Real}Calculates coral taxa diversity as a dimensionless metric.
Arguments
r_taxa_cover: Relative Taxa Cover of dimensions [timesteps ⋅ groups ⋅ locations], relative to habitable area.out_coral_diversity: Output array buffer [timesteps ⋅ locations]
ADRIAIndicators.coral_diversity — Methodcoral_diversity(rel_cover::Array{T, 3})::Array{T,2} where {T<:Real}Calculates coral taxa diversity as a dimensionless metric. Derived from the Simpson's Diversity Index.
Formulated as part of a reef condition index by Dr Mike Williams (mjmcwilliam@outlook.com) and Dr Morgan Pratchett (morgan.pratchett@jcu.edu.au).
The coral diversity metric ($D$) for a given location and timestep is given as
\[\begin{align*} D(x) = 1 - \sum_{g=1}^{G} (\frac{x_g}{x_T})^2, \end{align*}\]
where $x_g$ is the relative coral cover for the functional group, $g$, and $x_T$ is total relative coral cover at the given location and timestep.
Arguments
rel_cover: Relative Taxa Cover of dimensions [timesteps ⋅ groups ⋅ locations], relative to habitable area.
Returns
Matrix containing coral diversity metric of dimension [timesteps ⋅ locations]
ADRIAIndicators.coral_evenness! — Methodcoral_evenness!(r_taxa_cover::AbstractArray{T,3}, out_coral_evenness::Array{T,2})::Nothing where {T<:Real}Calculates evenness across functional coral groups in ADRIA as a diversity metric. Inverse Simpsons diversity indicator.
Arguments
rel_cover: Relative Taxa Cover of dimensions [timesteps ⋅ groups ⋅ locations], relative to habitable area.out_coral_evenness: Output array buffer [timesteps ⋅ locations]
References
- Hill, M. O. (1973). Diversity and Evenness: A Unifying Notation and Its Consequences. Ecology, 54(2), 427-432. https://doi.org/10.2307/1934352
ADRIAIndicators.coral_evenness — Methodcoral_evenness(r_taxa_cover::AbstractArray{T})::AbstractArray{T} where {T<:Real}Calculates evenness across functional coral groups in ADRIA as a diversity metric. Inverse Simpsons diversity indicator.
The coral evenness metric (E) is given as follows,
\[\begin{align*} E(x) = \left(\sum_{g=1}^{G}\left(\frac{x_g}{x_T} \right)^2\right)^{-1} \end{align*}\]
Arguments
rel_cover: Relative Taxa Cover of dimensions [timesteps ⋅ groups ⋅ locations], relative to habitable area.
Returns
Matrix containing coral evenness metric of dimensions [timesteps ⋅ locations]
References
- Hill, M. O. (1973). Diversity and Evenness: A Unifying Notation and Its Consequences. Ecology, 54(2), 427-432. https://doi.org/10.2307/1934352
ADRIAIndicators.maximum_colony_volume — Methodmaximum_colony_volume(colony_mean_diam_cm::AbstractArray{T,2}, planar_area_params::AbstractArray{T,3})::T where {T<:AbstractFloat}Find the maximum colony volume per m² among all provided species and size classes.
ADRIAIndicators.maximum_colony_volume — Methodmaximum_colony_volume(diam::T, intercept::T, coefficient::T)::T where {T<:AbstractFloat}Calculate colony volume per m² for a specific parameterization.
ADRIAIndicators.relative_shelter_volume! — Methodrelative_shelter_volume!(rel_cover::AbstractArray{T,4}, colony_mean_diam_cm::AbstractArray{T,2}, planar_area_params::AbstractArray{T,3}, habitable_area_m²::AbstractVector{T}, out_RSV::AbstractArray{T,4}, reference::Tuple{T, T, T})::Nothing where {T<:AbstractFloat}Calculate the relative shelter volume for a range of covers. Relative to the theoretical maximum of 50% cover of a coral species with the specified reference parameterisation. Relative shelter volume (RSV) is given by
\[\begin{align*} \text{RSV}(x) = \frac{ASV(x)}{MSV(x)}, \end{align*}\]
where ASV and MSV are Absolute Shelter Volume and Maximum Shelter Volume respectively.
Arguments
rel_cover: Relative Cover array with dimensions [timesteps ⋅ groups ⋅ sizes ⋅ locations], relative to habitable area.colony_mean_diam_cm: Mean colony diameter per group and size class with dimensions [groups ⋅ sizes].planar_area_params: Array containing the planar area parameters with dimensions [groups ⋅ sizes ⋅ (intercept, coefficient)].habitable_area_m²: Habitable area in m² with dimensions [locations].out_RSV: Output Relative shelter volume array buffer with dimensions [timesteps ⋅ groups ⋅ sizes ⋅ locations].reference: Parameterisation to use as reference (mean diameter, intercept, coefficient).
ADRIAIndicators.relative_shelter_volume — Methodrelative_shelter_volume(relative_cover::AbstractArray{T,4}, colony_mean_diam_cm::AbstractArray{T,2}, planar_area_params::AbstractArray{T,3}, habitable_area_m²::AbstractVector{T}, reference::Tuple{T, T, T})::AbstractArray{T,4} where {T<:Real}Calculate the relative shelter volume for a range of covers. Relative shelter volume (RSV) is given by
\[\begin{align*} \text{RSV}(x) = \frac{ASV(x)}{MSV(x)}, \end{align*}\]
where ASV and MSV are Absolute Shelter Volume and Maximum Shelter Volume respectively. The maximum shelter volume is defined by assuming the maximum theoretical shelter volume produced by a specified reference parameterisation at 50% cover. For possible parametrisations of the log-log linear model used to predict shelter volume from planar area, see Urbina-Barreto et al., [1].
Arguments
rel_cover: Relative Cover array with dimensions [timesteps ⋅ groups ⋅ sizes ⋅ locations], relative to habitable area.colony_mean_diam_cm: Mean colony area per group and size class with dimensions [groups ⋅ sizes].planar_area_params: Array containing the planar area parameters with dimensions [groups ⋅ sizes ⋅ (intercept, coefficient)].habitable_area_m²: Habitable area in m² with dimensions [locations].reference: Parameterisation to use as reference (mean diameter, intercept, coefficient).
Returns
Relative shelter volume in an array with dimensions [timesteps ⋅ groups ⋅ sizes ⋅ locations]
References
- Urbina-Barreto, I., Chiroleu, F., Pinel, R., Fréchon, L., Mahamadaly, V., Elise, S., Kulbicki, M., Quod, J.-P., Dutrieux, E., Garnier, R., Henrich Bruggemann, J., Penin, L., & Adjeroud, M. (2021). Quantifying the shelter capacity of coral reefs using photogrammetric 3D modeling: From colonies to reefscapes. Ecological Indicators, 121, 107151. https://doi.org/10.1016/j.ecolind.2020.107151
ADRIAIndicators.scenario_metric — Methodscenario_metric(metric::AbstractArray{T}, location_area::AbstractVector{T}, location_dim::Int; is_relative::Bool=true, return_relative::Bool=true)::AbstractArray{T} where {T<:AbstractFloat}Aggregate a metric across the location dimension.
This function can take a metric that is either relative to location area or absolute, and can return a metric that is either relative to the total area or absolute.
Arguments
metric: An array containing the metric to aggregate.location_area: A vector of area values for each location.location_dim: The dimension of themetricarray that corresponds to location.is_relative: Whether the inputmetricis relative to location area. Defaults totrue.return_relative: Whether the output should be relative to total area. Defaults totrue.
Returns
An array with the location dimension removed, containing the aggregated metric.