DOI: 10.5061/dryad.ngf1vhj44
title: Code and data: Spatial variation in upper limits of coral cover on the Great Barrier Reef

description: Identifying the maximum coral cover that a coral community can sustain
 (i.e., its ‘upper limit’) is important for predicting community dynamics
 and improving management strategies. Here, we quantify the relationship
 between estimated upper limits and key environmental factors on coral
 reefs: hard substrate availability, temperature, and water
 clarity. We used 32 years (1990-2022) of data on coral cover
 around reef perimeters in the Great Barrier Reef, Australia. Each reef was
 divided into four wave exposure habitats depending on prevailing wind
 conditions. For each site, we determined if hard coral cover had reached a
 plateau or upper limit. Next, we extracted existing estimates of hard
 substrate availability, modelled water temperature, and Secchi depth.
 Then, we quantified the relationship between these environmental variables
 and the upper limits. We found varying upper limits across the GBR, with a
 median of 33% coral cover and only 17% of the estimated upper limits
 exceeded 50% coral cover. Upper limits increased towards the southern
 reefs. Our results show that upper limits increased with increasing hard
 substrate availability and decreased with temperature and, to a lesser
 extent, with water clarity. The upper limits estimated in this
 study are much lower than what is commonly assumed when modelling
 ecological dynamics, most likely resulting in predicted recovery rates
 being inappropriately high. Although hard substrate ultimately restricted
 upper limits, there are mechanisms constraining the proportion of hard
 substrate that is covered by hard corals. The negative relationship
 between temperature and upper limits cannot be explained by changes in
 macroalgal abundance but may be related to changes in species composition.
 The quantitative relationships between the upper limits of coral cover and
 environmental variables will provide critical information to prioritise
 sites for management interventions.
description: Coral cover data We used
 hard coral cover data from manta tow surveys conducted by the Australian
 Institute of Marine Science’s (AIMS) Long-term Monitoring Program (LTMP)
 from 1990 to 2022 (Emslie et al., 2020). Manta tow surveys quantified
 broadscale patterns in percent coral cover on a ten-meter swath of the
 reef slope around the entire perimeters of 173 reefs on the Great Barrier
 Reef, Australia (from 12°S to 24°S and 143°E to 152°E). Reefs were visited
 a maximum of once a year. Each reef was divided into
 four reef zones or sites based on prevailing wind exposure: one back
 (leeward) site that was the most protected, one front (windward) site
 being the most exposed, and two flank sites with intermediate exposure.
 Sites were classified based on reef geomorphology and local knowledge of
 prevailing wind conditions. Each tow was assigned a reef zone, and from
 2014 onwards, the tow paths were georeferenced. Depending on weather
 conditions and variable reef structure, following the exact path was not
 always possible. Since community composition changes with wave exposure,
 we looked for upper limits in each of the four sites within reef
 separately.  Observers were towed by a boat at constant
 speed, and for each two-minute tow, visually estimated the proportion of
 the reef slope covered by live hard corals using a categorical coral cover
 score (0, &gt;0-5%, &gt;5-10%, &gt;10-20%, &gt;20-30%,
 &gt;30-40%, &gt;40-50%, &gt;50-62.5%, &gt;62.5-75%,
 &gt;75-87.5%, &gt;87.5-100%) (Miller et al., 2018). During the
 two-minute tow, the observer is towed parallel to the reef crest, aiming
 to visually scan a ten-meter band of the reef slope, just below the reef
 crest. The length of the transect varied depending on the distance covered
 during the two-minute duration of the tow, with a mean tow length of 200 m
 (with 95% of the tows between 134 – 269 m). Only one categorical hard
 coral cover score was recorded for each two-minute tow.
 For analyses, coral cover for each two-minute tow was converted
 to the midpoint of the cover category recorded. For each year surveyed,
 all tows from each site within reef were summarised by calculating the
 median to minimise the effect of outliers. A small subset of reefs had
 inconsistent wave exposure zone assignations that could not be corrected
 using the georeferenced tows and therefore we excluded sites within reefs
 that were problematic (three entire reefs were excluded, and 13 additional
 reefs had at least one site excluded). To estimate the
 upper limit of coral cover for each site within each reef, we first
 calculated the five-year running mean of the median coral cover. From the
 five-year running mean, we identified instances when coral cover reached a
 plateau. We called coral cover at the plateau the ‘upper limit’, and we
 defined it as the maximum running mean cover over a period of five
 undisturbed years. The upper limit had to: 1) be within 80% of the maximum
 running mean for that site across all surveyed years, 2) the two previous
 and the two following years also had a running mean within 80% of the
 maximum value, and 3) the running mean estimate was calculated with at
 least three data points (i.e., only two years out the five could have an
 interpolated value). We chose these criteria to ensure that we only
 captured instances of stable high coral cover within each site, but with
 some flexibility (e.g., in terms of interpolation) so that we had enough
 upper limit estimates to capture their variation across space. Since the
 specific criteria are somewhat arbitrary, we repeated the process of
 estimating upper limits with different running mean windows (5, 7, 9, and
 11 years) and different thresholds for the difference between the running
 mean and the maximum coral cover (80, 85, and 90%). In total, we had 12
 sets of upper limit estimates, each estimated using different
 criteria. For any definition of upper limits, each reef could have a
 maximum of four upper limit values, one for each site (one exposed, one
 sheltered, and two intermediate reef sites). 
 Environmental variables We
 extracted long-term medians of the environmental values for hard substrate
 availability, temperature, and water clarity, assuming it to be
 representative of the general environmental conditions across
 sites.  We extracted estimates of the proportion of
 reef surfaces constituting hard substrate, derived from freely available
 benthic maps known as “Great Barrier Reef 10m Grid GBRMP Benthic” (Lyons
 et al., 2020; Great Barrier Reef Marine Park Authority, 2021). The maps
 are generated using high spatial resolution satellite imagery, bathymetry,
 wave height estimates, and field data for training and validation
 (Roelfsema et al., 2021). In the maps, each 10m-by-10m of planar area
 pixel down to 10m mean sea level depth is assigned one of four types of
 substrate: coral or macroalgae, rock, rubble, or sand. Coral cannot be
 distinguished from macroalgae in the satellite imagery, and any pixels
 labelled as coral/macroalgae or rock (i.e., hard substrate) were
 considered suitable habitat for corals to establish and grow, unlike
 rubble and sand.  Each reef site had multiple pixels
 with a benthic composition label. To ensure we captured the benthic
 composition of the same locations that were surveyed with the manta tows,
 we divided each reef into 100m x 100m squared grid cells, and we assigned
 each cell with a georeferenced tow to a reef site. For each reef site, we
 extracted benthic composition estimates from all assigned cells and
 determined the proportion of 10m x 10m pixels labelled as hard substrate
 divided by the total number of pixels. To investigate
 the relationship between upper limits and key environmental variables, we
 summarised long-term medians in temperature and Secchi depth (a measure of
 water clarity, with values above 10 - 15 m representing high water
 clarity) from hydrodynamic and biogeochemical models. Daily sea water
 temperatures at a depth of 7.5m below mean sea level and Secchi depth were
 extracted from the <em>eReefs </em>marine models (GBR1 v2.0
 and GBR4, respectively)<em> </em>(Steven et al., 2019) using
 the R-package <em>“ereefs” </em>(Robson, 2023).
 <em>eReefs </em>is an information system that predicts
 biogeochemical and hydrodynamic variables across the Great Barrier Reef.
 Daily estimates were available at a spatial resolution coarser than the
 reef site (~1 x 1 km and ~4 x 4 km) during a period of six and eight years
 for temperature and Secchi depth, respectively (temperature: 1 January
 2015 to 1 January 2021, Secchi depth: 1 December 2010 to 1 December 2018).
 For these variables, we used the georeferenced tows to find the latitude
 and longitude at the centre of the reef site and computed the median of
 the daily estimates for the grid cell upon which the centre of each reef
 site fell. The <em>eReefs</em> hydrodynamic models consist of
 a nominal 1 km resolution hydrodynamic model covering the Great Barrier
 Reef World Heritage Area nested within a nominal 4 km resolution regional
 model that extends across the Coral Sea, which is in turn nested within a
 global circulation model. Among its outputs, the hydrodynamic model
 generates predictions for water temperature using the three-dimensional,
 baroclinic, finite difference hydrodynamic model Sparse Hydrodynamic Ocean
 Code (SHOC; Herzfeld, 2006).  Although reefs differed in their depth
 distribution and geomorphology, we expect a depth of 7.5m to overlap with
 all manta tows swaths. Estimates of Secchi depth were obtained from the
 <em>eReefs </em>biogeochemical model that has a 4 km
 resolution. The optical model used to generate Secchi depth predictions
 can reproduce remote-sensing reflectance patterns that arise from specific
 biogeochemical states (Baird <em>et al.</em>, 2016). Secchi
 depth was included as a proxy for water clarity and net
 productivity. Statistical
 analyses All analyses were performed in R
 version 4.3.1 (R Core Team, 2023). We fitted a series of linear mixed
 effects models in a Bayesian framework using the R package
 “<em>brms”</em> version 2.20.4 (Bürkner, 2017) to quantify how
 sites’ upper limit estimates related to environmental conditions. Because
 reefs could have up to four data points each (in different wave exposure
 sites), we included a random effect of reef in the models. Because our
 response variable - upper limit – was a proportion (converted to
 percentage in the figures), we fitted the models assuming a beta
 distribution. For each of the 12 sets of upper limit
 estimates (i.e., one for each running mean window and percentage threshold
 combination), we fitted seven models to test whether the combination of
 fixed effects affected the magnitude and direction of the environmental
 variable coefficients. There was one model that included all three
 environmental variables (the proportion of hard substrate, temperature,
 and Secchi depth) as fixed effects, three models that included two out of
 the three environmental variables only, and three models that included
 only one of the environmental variables. This gave a total of 84 fitted
 models. In each model, the environmental variables were
 standardised as Z-scores ( , where  is the value of the environmental
 variable for that site, and  and  are the mean and standard deviation
 across all observations, respectively). For simplicity and since one third
 of the sets of upper limit estimates had less than 50 estimates, we
 avoided fitting interactions between environmental variables.
 Additionally, to test whether the relationship between coral
 cover and the three environmental variables differed among high, medium,
 and low coral cover at a site, we fitted three quantile regressions. Each
 quantile regression represented high (95<sup>th
 </sup>quantile), medium (50<sup>th </sup>quantile), and
 low (10<sup>th </sup>quantile) coral cover. The response
 variable was the yearly coral cover at each site (n = 7787). Temperature,
 hard substrate availability, and Secchi depth (as Z-scores) were included
 as the fixed explanatory variables and, since there were multiple data
 points per reef site, site nested within reef was included as a random
 effect. For all models, the priors were specified by
 using the function <em>brms </em>‘get_prior’, which gave a
 flat prior for the fixed effects and intercept and weakly informative
 priors for the hierarchical parameters (a Student’s t-distribution with a
 normality parameter of 3, with a mean of 0, and a standard deviation of
 2.5 for the models with a beta distribution and a standard deviation of
 14.8 for the quantile regressions). Each model had three chains of 20,000
 iterations (half of which were discarded as warm up) and a thinning of 5,
 resulting in 6,000 posterior distribution draws. To investigate how
 consistent was the relationship between each environmental variable and
 coral cover upper limits, we recorded the coefficient estimate for each
 variable included in each model and whether its 95% credible interval
 overlapped with zero. Please refer to the published
 manuscript for more detailed information on data and processing.
 References Bürkner, P.-C. (2017) brms: An R
 Package for Bayesian Multilevel Models Using Stan . <em>Journal of
 Statistical Software </em>, <strong>80</strong>,
 1–28. Emslie, M.J., Bray, P., Cheal, A.J., Johns, K.A.,
 Osborne, K., Sinclair-Taylor, T. & Thompson, C.A. (2020) Decades
 of monitoring have informed the stewardship and ecological understanding
 of Australia’s Great Barrier Reef. <em>Biological
 conservation</em>, <strong>252</strong>,
 108854. Great Barrier Reef Marine Park Authority (2021)
 GBR10 GBRMP Benthic. Herzfeld, M. (2006) An alternative
 coordinate system for solving finite difference ocean models.
 <em>Ocean Modelling</em>, <strong>14</strong>,
 174–196. Lyons, M.B., Roelfsema, C.M., Kennedy, E. V,
 Kovacs, E.M., Borrego‐Acevedo, R., Markey, K., Roe, M., Yuwono, D.M.,
 Harris, D.L. & Phinn, S.R. (2020) Mapping the world’s coral reefs
 using a global multiscale earth observation framework. <em>Remote
 Sensing in Ecology and Conservation</em>,
 <strong>6</strong>, 557–568. Miller, I.R.,
 Jonker, M.J. & Coleman, G. (2018) <em>Crown-of-thorns
 starfish and coral surveys using the manta tow technique</em>,
 Townsville, Australia. R Core Team (2023) R: A language
 and environment for statistical computing. Robson, B.
 (2023) ereefs: Useful Functions to Handle eReefs and EMS model
 Output. Roelfsema, C.M., Lyons, M.B., Castro-Sanguino,
 C., Kovacs, E.M., Callaghan, D., Wettle, M., Markey, K., Borrego-Acevedo,
 R., Tudman, P. & Roe, M. (2021) How Much Shallow Coral Habitat Is
 There on the Great Barrier Reef? <em>Remote Sensing</em>,
 <strong>13</strong>, 4343. Steven, A.D.L.,
 Baird, M.E., Brinkman, R., Car, N.J., Cox, S.J., Herzfeld, M., Hodge, J.,
 Jones, E., King, E. & Margvelashvili, N. (2019) eReefs: An
 operational information system for managing the Great Barrier Reef.
 <em>Journal of Operational Oceanography</em>,
 <strong>12</strong>, S12–S28.
description: # Code and data: Spatial variation in upper limits of coral cover on the
 Great Barrier Reef
 [https://doi.org/10.5061/dryad.ngf1vhj44](https://doi.org/10.5061/dryad.ngf1vhj44) ## Description of the data and file structure ### Upper limits of coral communities This repository contains the data and code to reproduce the results of the manuscript "Spatial variation in upper limits of coral cover on the Great Barrier Reef". The scripts were run in R version 4.3.2 using the following packages: * brms (version 2.20.4) * patchwork (version 1.2.0) * viridis (version 0.6.4) * dplyr (version 1.1.4) * ggplot2 (version 3.5.1) To run the code, the working directory must have three folders: *Data* (which should include *coral_cover.csv* and *environmental_variables.csv*), *Code* (which should contain *analyses.R* and *functions.R*), and *Outputs* (where models and plots will be saved). ### Files and variables #### Data files **coral_cover.csv**: contains coral cover (Scleractinian corals) estimates from the manta tow surveys. Each row corresponds to one tow. * YEAR_CODE: financial year when the survey was conducted (e.g., 201415 is for 2014-2015) * REEF_NAME: name of the reef surveyed * ZONE: wave exposure zone (categorical- *flank1* and *flank2* have intermediate wave exposure, *front* has high wave exposure, and *back* is sheltered) * PATH: vector of coordinates of the trajectory covered by each manta tow * HC_MIN: hard coral cover was scored as categorical intervals (0, &gt;0-5%, &gt;5-10%, &gt;10-20%, &gt;20-30%, &gt;30-40%, &gt;40-50%, &gt;50-62.5%, &gt;62.5-75%, &gt;75-87.5%, &gt;87.5-100%), HC_MIN is the lower end of the percentage hard coral cover interval * HC_MAX: upper end of the percentage hard coral cover interval * Central_LAT: latitude at the center of the tow * Central_LON: longitude at the center of the tow * HARD_COVER: midpoint of the coral cover interval (i.e., midpoint of HC_MIN and HC_MAX) **environmental_variables.csv**: contains the environmental variables for each site (wave exposure zone within reef) * Reef: name of reef * Zone: wave exposure zone (*flank1* and *flank2* have intermediate wave exposure, *front* has high wave exposure, and *back* is sheltered) * Latitude: site latitude * Longitude: site longitude * median_ubed90: 90<sup>th</sup> quantile of horizontal water velocity at bed (m/s) (summarised as the median value for each site) * per_suitable: proportion of hards substrate available * temp_median: median temperature (degrees C)  * Secchi_median: median Secchi depth (m) ## Code/software (Zenodo) ### Code * analyses.R: estimates upper limits from time series coral cover data, fits models and generates figures shown in the manuscript * functions.R: includes the required functions to run the analyses ## Access information Data was derived from the following sources: * Callaghan, D.P., Leon, J.X. & Saunders, M.I. (2015) Wave modelling as a proxy for seagrass ecological modelling: Comparing fetch and process-based predictions for a bay and reef lagoon. *Estuarine, Coastal and Shelf Science*, **153**, 108–120. * Emslie, M.J., Bray, P., Cheal, A.J., Johns, K.A., Osborne, K., Sinclair-Taylor, T. & Thompson, C.A. (2020) Decades of monitoring have informed the stewardship and ecological understanding of Australia’s Great Barrier Reef. *Biological conservation*, **252**, 108854. * Lyons, M.B., Roelfsema, C.M., Kennedy, E. V, Kovacs, E.M., Borrego‐Acevedo, R., Markey, K., Roe, M., Yuwono, D.M., Harris, D.L. & Phinn, S.R. (2020) Mapping the world’s coral reefs using a global multiscale earth observation framework. *Remote Sensing in Ecology and Conservation*, **6**, 557–568. * Steven, A.D.L., Baird, M.E., Brinkman, R., Car, N.J., Cox, S.J., Herzfeld, M., Hodge, J., Jones, E., King, E. & Margvelashvili, N. (2019) eReefs: An operational information system for managing the Great Barrier Reef. *Journal of Operational Oceanography*, **12**, S12–S28.