## Introduction

By March 2020, the world’s human population grew to more than 7.8 billion people1, with most of the growth taking place in coastal areas where population density is highly concentrated2. As a result, the number of people exposed to intense coastal storms and flooding also markedly increased3. Climate change is expected to further exacerbate the risks of flooding due to rising seas4,5 and changes in weather patterns6,7,8. In response, societies are called to design effective coastal protection schemes9, which preserve or strengthen the current natural protection offered in the form of ecosystem services10.

This is particularly true in tropical areas, where more than 500 million people are protected by coral reefs11. Shallow water coral reefs act as natural breakwaters12, and can attenuate up to 98% of the incoming wave energy13. However, coral reefs are being rapidly degraded by intensifying anthropogenic stressors, including ocean acidification, rising seas, pollution, and sedimentation14. Such perturbations usually reduce living coral cover and subsequently habitat structural complexity, thereby leading to reef flattening, a process observed worldwide15. Such trends reduce the natural protective capacity of reefs, further intensifying coastal flood and erosion risks9,16. Although the link between wave attenuation and reef structural complexity is widely accepted among scientists in theory, quantitative examinations of the protective capacity of reefs under real world conditions as anticipated for the near future are yet limited17,18. Indeed, most of the studies investigated the wave energy dissipation in conditions where coral reefs would be entirely wiped out or not12,19, while others chose a wider geomorphology-based approach exploring flooding risk as a function of reef proximity or geologic structure20,21,22.

Here we report field observations and numerical models to quantify the natural protection offered by coral reefs at a high-energy site in Mo’orea, French Polynesia. First, we monitor changes in coral community abundance and size-distribution over a 10-year full cycle of disturbance and recovery (2005–2016), and quantify the associated reef structural complexity (see "Materials and methods" for details). Second, we use in situ hydrodynamic measurements to link the structural complexity levels with the wave energy dissipation capacity of the reef, and to calibrate a Boussinesq wave propagation model, which simulates the interplay between hydrodynamics and reef topography on the site. Third, we apply a probabilistic framework that assesses a coral reef’s capacity to attenuate incoming wave energy, applying our model under all possible wave and structural complexity conditions for the study site. We evaluate the resulting 10,000 runs by using as proxies wave overwash, impact, and flooding, the significant wave run-up, and finally, the 2% exceedance wave run-up height (R2%).

## Materials and methods

### Ecological sampling and structural complexity profiles

The ecological sampling consists of 10 surveys, taking place in 2005 and from 2008 to 2016, and documents changes in coral colony abundance and size distributions (i.e. width, length, and height) for the three most conspicuous taxa (i.e. Acropora, Pocillopora, and Porites) within a 10 m2 transect on the outer slope23. To quantify reef structural complexity, we built a 3D model of the coral assemblages distributed along a cross-section of the reef substrate separating the 20 m water depth from the reef crest, representing a 160 m stretch along the reef slope (Fig. 1). First, we take 200 overlapping high-resolution photos (300 dpi) of 10 individual corals from each species (i.e. n = 30 coral colonies) and built 3D models using the Agisoft Metashape software24, capturing intra- and inter-species morphological variability (Fig. 1). Then, we systematically and randomly select one of the ten 3D coral models for each taxon to add to the substrate until that the sum of the planar area for each 3D coral models match with the coral cover reported for each taxon and for each year23. We randomly place coral colonies along the 160 m reef cross-section going from 20 m depth to the reef crest (Fig. 1). The individual coral 3D models are resized in width, length, and height according to ecological surveys, and, randomly rotated between − π/2 and π/2 to ensure ecological variability. Finally, we estimated structural complexity of the 3D coral assemblage model using the function rumple_index of the LidR package25 in R 4.0.026. We repeat this approach 100 times for each year, resulting in a total of 1000 reef structural complexity profiles. Our estimates are consistent with previous reef structural complexity estimates at this location27.

### Hydrodynamic and topographic measurements

Mo’orea (French Polynesia) is encircled by coral reefs, 500–700 m wide with a dominant swell direction coming from the southwest. In this study, we focus on Ha’apiti, a site with a southwest orientation that is considered as a high-energy site28. We extract 30-year offshore wave data (1980–2010) from a wave hindcast8,29 (Fig. 2a). We also collect high-frequency, in situ wave data using INW PT2X Aquistar and DHI SensorONE pressure transducers (PTs), which are logged at 4 Hz30. The sensors are installed at four locations along a cross-shelf gradient (Fig. 2b,c) covering a 250 m long stretch, including sections through the fore reef, reef crest, and reef flat. Pressure records are corrected for pressure attenuation with depth31 and are split into 15-min bursts30.

The beach profile and the reef morphology are measured using airborne bathymetric and topo-bathymetric lidar surveys conducted in June 2015 by the Service Hydrographique & Océanographique de la Marine (SHOM). The bathymetric data are defined by the combination of bathymetric laser (for the submerged part of the beach) and topo-bathymetric laser (for the subaerial beach). The data come at 1 m resolution and are available at https://diffusion.shom.fr.

### Hydraulic roughness vs structural complexity

Spectral attenuation analysis of the water level measurements32,33 is used to estimate the Nikuradse (hydraulic; kn) roughness34 of the coral reef surface along the beach profile sections covered by the pressure transducers. The method is described in detail in the references provided above and uses the conservation of energy equations to obtain estimates of wave energy dissipation from friction. We obtain more than 300 kn estimates for each pair of sensors, each representing a different geomorphologic section. Since the field measurements took place in 2015, the kn outputs obtained from the fore reef section concur with the reef structural complexity estimates of that year (Fig. 3). Then, we define a coefficient factor according to the geomorphologic section as ⍺back reef = kn, back reef/kn, fore reef and ⍺reef crest = kn, reef crest/kn, fore reef. We carefully delineate the sandy section from the reef sections within the cross-shelf gradient (i.e. within the reef flat, lagoon section) and apply the following procedure. First, for the reef sections, we apply the relationship between the reef structural complexity and kn (Fig. 3) to convert our reef structural complexity estimates into continuous kn profiles through Monte Carlo simulations, using the coefficient factor of each geomorphologic section (e.g., forereef, reef crest, and back reef). Second, for the sandy section, we define kn on the grounds of the mean grain size (d50 = 63 μm). Applying this workflow (Fig. 3), we obtain 100 continuous kn profiles for each year (i.e. n = 1000 kn profiles in total).

### Hydrodynamic model

Nearshore wave propagation is simulated using a nonlinear wave model based on the Boussinesq Equations35. The rationale of using a Boussinesq type model instead of other types of models (e.g. SWAN) is that the former is able to describe in detail (i.e. 1 m grid resolution) several hydrodynamic parameters (e.g. nearshore nonlinear wave propagation, shoaling, refraction, dissipation due to the bottom friction and breaking and run-up) in the swash zone. The model is defined as follows:

$$\frac{\partial U}{\partial t}+\frac{1}{h}\frac{\partial {M}_{u}}{\partial x}-\frac{1}{h}U\frac{\partial \left(Uh\right)}{\partial x}+g\frac{\partial\upzeta }{\partial x}=\frac{\left({d}^{2}+2\partial\upzeta \right)}{3}\frac{{\partial }^{3}U}{\partial {x}^{2}\partial t}+{d}_{x}h\frac{{\partial }^{2}U}{\partial x\partial t}+\frac{{\partial }^{2}}{3}\left(U\frac{{\partial }^{3}U}{{\partial x}^{3}}-\frac{\partial U}{\partial x}\frac{{\partial }^{2}U}{\partial {x}^{2}}\right)+d\frac{\partial\upzeta }{\partial \mathrm{x}}\frac{{\partial }^{2}U}{\partial\upzeta \partial \mathrm{t}}+d{d}_{x}U\frac{{\partial }^{2}U}{\partial {x}^{2}}+{d}_{x}\frac{\partial\upzeta }{\partial \mathrm{x}}\frac{\partial \mathrm{U}}{\partial \mathrm{t}}-d\frac{{\partial }^{2}}{\partial \mathrm{x}\partial \mathrm{t}}\left(\delta \frac{\partial \mathrm{U}}{\partial \mathrm{x}}\right)+E-\frac{{\tau }_{b}}{\rho h}+B{d}^{2}\left(\frac{{\partial }^{3}U}{\partial {x}^{2}}+g\frac{{\partial }^{3}\upzeta }{\partial {x}^{3}}+\frac{{\partial }^{2}\left(U\frac{\partial U}{\partial x}\right)}{\partial {x}^{2}}\right)+2Bd{d}_{x}\left(\frac{{\partial }^{2}U}{\partial x\partial t}+g\frac{{\partial }^{2}\upzeta }{\partial {\mathrm{x}}^{2}}\right),$$
(1)

where, U is the mean over the depth horizontal velocity, ζ is the surface elevation, d is the water depth, uo is the near bottom velocity, h = d + ζ, $${M}_{u}=\left(d+\zeta \right){u}_{0}^{2}+\delta ({c}^{2}-{u}_{0}^{2})$$, δ is the roller thickness determined geometrically36, E is an eddy viscosity, τb is the bed friction term and B = 1/1535.

In this work the wave breaking mechanism is based on the surface roller concept36. However, in the swash zone, surface roller is not present and the eddy viscosity concept is used to describe the breaking process. The term E in Eq. (1) is written:

$${\mathrm{E}}_{{\mathrm{b}}_{\mathrm{x}}}= {\mathrm{B}}_{\mathrm{b}}\frac{1}{\mathrm{h}+\upeta }{\left\{{{\mathrm{v}}_{e}\left[\left(\mathrm{h}+\upeta \right)\mathrm{U}\right]}_{\mathrm{x}}\right\}}_{\mathrm{x}},$$
(2)

where $${v}_{e}$$ is the eddy viscosity coefficient:

$${\mathrm{v}}_{\mathrm{e}}={{\ell}}^{2}\left|\frac{\partial {\mathrm{U}}}{\partial {\mathrm{x}}}\right|,$$
(3)

where $${\ell}$$ is the mixing length $${\ell}$$ = 3.5 h και Βb37.

The width of the swash zone is assumed to extend from the run-down point (seaward boundary) up to the run-up point (landward boundary). We start from a first estimate of the run-up R using the Stockdon formula38 and the depths below R/4 are considered as the swash zone, using Eq. (2). The final wave run-up height R which comes as output is estimated by the model.

The ‘dry bed’ boundary condition is used to simulate run-up35. The numerical solution is based on the fourth-order time predictor–corrector scheme39. Therefore, the bed friction term τb is calculated such as:

$${\tau }_{bx}=\frac{1}{2}\rho {f}_{w}U\left|U\right|,$$
(4)

where fw is the bottom friction coefficient40, which is an explicit approximation to the implicit, semi-empirical formula given by Jonsson, 196741.

$${f}_{\mathrm{w}}=\mathrm{exp}\left[{5.213\left(\frac{{\mathrm{k}}_{\mathrm{n}}}{{\mathrm{\alpha }}_{0}}\right)}^{0.194}-5.977\right],$$
(5)

where αo is the amplitude of the near-bed wave orbital motion and kn is the Nikuradse roughness height.

### Simulations and post processing

We use our wave propagation model to assess how different coral reef states affect the impact waves have on the coast. We run an ensemble of 10,000 simulations that covers all the possible combinations of (i) 10 bottom roughness profiles expressing the different observed coral reef states (i.e. healthy vs. not unhealthy); and (ii) 1000 percentiles of wave conditions. The wave conditions are produced as follows: (i) from the weekly values, we estimate all significant wave height (Hs) percentiles from 0.1 to 100, with a step of 0.1; (ii) the resulting 1000 Hs values are linked to the corresponding peak wave period Tp using a copula expressing the dependence of the two variables42. The output of the simulations is the nearshore Hs and 2% exceedance run-up (R2%) height for each of the 1000 conditions and 10 coral reef states. To quantify how the coral reef states are altering wave propagation during extreme events, we apply extreme value analysis to estimate the R2% for different return periods43. We then compare how the return period curves changed from the two coral reef states and we define the change in frequency of extreme R2% under unhealthy coral reefs. It is important to highlight that the tidal range is < 20 cm at our study site, so will have negligible effect compared to other parameters. In systems with higher tidal range, tidal water level fluctuations should be also considered in the probabilistic framework.

Using the outputs of our simulations, we develop a Bayesian model which includes all the interdependencies between the run-up, the significant offshore wave height (Hs, offshore), and the reef structural complexity (SC). Our model is built in the R package brms44,45 and follows the following structure:

$$RU \sim \mathcal{N}\left({\mu }_{s}, \sigma \right),$$
$${\mu }_{s}=\left(\alpha + {\sigma }_{\zeta }\right)\times {H}_{s, offshore}+\left(\beta + {\sigma }_{\zeta }\right) \times SC+\left(\gamma + {\sigma }_{\zeta }\right) \times SC:{H}_{s, offshore},$$
$$\alpha \sim \mathcal{N}\left(0, 1\right); \beta \sim \mathcal{N}\left(0, 1\right); \gamma \sim \mathcal{N}\left(0, 1\right); \sigma \sim\Gamma \left(\mathrm{2,0.1}\right); {\sigma }_{\zeta } \sim\Gamma \left(\mathrm{2,0.1}\right),$$

where RU is the run-up (m), SC is the structural complexity, and Hs,offshore is the significant offshore wave height (m). The prior sampling is specified to follow a Gaussian ($$\mathcal{N}$$ (location, scale)) and a Gamma (Γ(shape, inverse scale)) distribution. We ran our models with four chains, 5000 draws per chain, and a warm-up period of 1000 steps, thus retaining 16,000 draws to construct posterior distributions. We verify chain convergence (n = 4) with trace plots and confirm that Rhat (the potential scale-reduction factor) is lower than 1.0546. Drawing on our model, we predict the run-up according to six offshore wave height conditions (i.e. from 1 to 6 m with a step of 1 m) and the structural complexity gradient at Mo’orea from 2005 to 2016. In order to define the residual run-up height according to Hs, offshore and the reef structural complexity, we subtract from our run-up estimates the minimum value obtained for each offshore wave height condition.

## Results and discussion

Between 2006 and 2010, Mo’orea experienced an outbreak of the predatory sea star Acanthaster cf. solaris and a cyclone reducing consequently the living coral cover from 50 to 3% and halving the overall structural complexity (Fig. 4). Accordingly, we consider the year after these disturbances (i.e., 2011) as unhealthy coral reefs. By the year 2016, coral cover recovered from these disturbances with a dominance of Pocillopora cf. verrucosa, presenting a higher complexity profile from the three coral species and increasing the overall reef structural complexity (Fig. 4). Therefore, we consider the year 2016 as a healthy coral reef in terms of structural complexity. Overall, the median structural complexity from unhealthy reefs is 1.58 with the very likely range of 1.25–1.92 (5th–95th percentile), whereas the median structural complexity from healthy reefs is 3.86 with the very likely range of 3.59–4.20.

Field measurements show that the median Nikuradse (hydraulic; kn) roughness34 of healthy reefs at Mo’orea is 0.42, with a very likely range of 0.34–0.52. We combine the simultaneous kn and structural complexity measurements in Monte Carlo simulations, in order to produce continuous kn profiles for all observed coral reef states, which we use in our wave propagation simulations. In line with previous studies13, our modeling results show that coral reefs absorb 77% to 91% of the incoming wave energy, with the range expressing the variability of wave and structural complexity conditions. We also confirm the previously reported strong correlation between structural complexity and wave dissipation28, and hence the reduction of wave run-up height on the coast (Fig. 5a). Unhealthy reef conditions result in wave run-up heights 9.6% higher compared to healthy ones (very likely range 8.7–10.7%). Our results also show that wave run up height reduction increases with wave height, highlighting that coral reef protection is more important when it matters most; i.e. during extreme events (Fig. 5b). For example, structural complexity has twice the potential to dissipate offshore waves with significant wave height Hs = 3 m (exceeding the 97.5th percentile in our study site) compared to a wave with Hs = 1 m (below the 2.5th percentile, Fig. 2a).

We apply an extreme value analysis to assess how the loss of coral reef structural complexity controls the frequency of extreme wave run-up. Our findings show that the frequency of extreme overwash and flood conditions on the shore will increase as long as coral health deteriorates, even without rising sea-levels. For example, wave run-up heights, which under healthy reef conditions occur once in a 100-year, will become 50 times more frequent if coral reef structural complexity deteriorates (Fig. 5c). This effect is further amplified with the increase in the return period of big-wave events; a 10-year event will become ca. 10 times more frequent, whereas a 500-year event will become at least 150 times more frequent.

Coral reefs thrive mainly in tropical and sub-tropical regions where the highest intensification of extreme sea levels (ESLs) has been projected8; i.e. the 100 year ESL will occur at least every 10 years after 2050, every year in many locations. Our results imply that reef degradation will leave reef-supporting coastlines more exposed to coastal flooding and erosion than previously projected, thereby exacerbating the risks associated with sea level rise. Wave attenuation relies mainly on reef accretion and structural complexity28, for which the projections are not encouraging. Under a high greenhouse gas emissions scenario by the year 2050, 94% of the reefs worldwide may cease to accrete and start to flatten due to ocean acidification and warming47 as it is already the case in other regions, including Florida48 and some Caribbean islands49. Thus, the effects of rising seas are expected to be further amplified by the loss of living corals, painting a grim picture for the future safety of tropical coastal societies and highlights the critical importance of emission mitigation and coral preservation efforts.