Abstract Global warming and ocean acidification are forecast to exert significant impacts on marine ecosystems worldwide. However, most of these projections are based on ecological proxies or experiments on single species or simplified food webs. How energy fluxes are likely to change in marine food webs in response to future climates remains unclear, hampering forecasts of ecosystem functioning. Using a sophisticated mesocosm experiment, we model energy flows through a species-rich multilevel food web, with live habitats, natural abiotic variability, and the potential for intra- and intergenerational adaptation. We show experimentally that the combined stress of acidification and warming reduced energy flows from the first trophic level (primary producers and detritus) to the second (herbivores), and from the second to the third trophic level (carnivores). Warming in isolation also reduced the energy flow from herbivores to carnivores, the efficiency of energy transfer from primary producers and detritus to herbivores and detritivores, and the living biomass of detritivores, herbivores, and carnivores. Whilst warming and acidification jointly boosted primary producer biomass through an expansion of cyanobacteria, this biomass was converted to detritus rather than to biomass at higher trophic levels—i.e., production was constrained to the base of the food web. In contrast, ocean acidification affected the food web positively by enhancing trophic flow from detritus and primary producers to herbivores, and by increasing the biomass of carnivores. Our results show how future climate change can potentially weaken marine food webs through reduced energy flow to higher trophic levels and a shift towards a more detritus-based system, leading to food web simplification and altered producer–consumer dynamics, both of which have important implications for the structuring of benthic communities.

Author summary Healthy marine ecosystems are crucial for people’s livelihoods and food production. Global climate stressors, such as warming and ocean acidification, can drastically impact the structure and function of marine food webs, diminishing the production of goods and services. Our ability to predict how future food webs will respond to a changing environment is limited by our understanding of species responses to climate change, which are often tested in isolation or in simplified experimental designs. More realistic predictions of the impacts of climate change on ecosystems requires consideration of entire species communities, including the species interactions that can buffer or exacerbate these impacts. We experimentally tested the effects of warming and acidification, both individually and in combination, on a benthic marine food web in a near-natural ecological setting. Energy flow from the first trophic level (primary producers and detritus) to the second (herbivores), and from the second to the third trophic level (carnivores) was quantified under these different regimes. We show that warming, either alone or in combination with acidification, can constrain productivity to the bottom of the food web by enhancing cyanobacterial biomass and reducing energy flow to higher trophic levels, thus lowering energy transfer efficiency between producers and consumers. In contrast, increased ocean acidification alone showed a positive effect on herbivores and carnivores. Our finding is important because it demonstrates that future warming could drive marine food web collapses to potentially simplified and less productive coastal systems.

Citation: Ullah H, Nagelkerken I, Goldenberg SU, Fordham DA (2018) Climate change could drive marine food web collapse through altered trophic flows and cyanobacterial proliferation. PLoS Biol 16(1): e2003446. https://doi.org/10.1371/journal.pbio.2003446 Academic Editor: Michel Loreau, National Centre for Scientific Research (CNRS), France Received: June 28, 2017; Accepted: December 5, 2017; Published: January 9, 2018 Copyright: © 2018 Ullah et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Data Availability: All relevant data are within the paper and its Supporting Information files. Funding: Environment Institute https://www.adelaide.edu.au/environment/. The funder had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. Australian Research Council http://www.arc.gov.au/ (grant number FT120100183). The funder had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. Australian Research Council http://www.arc.gov.au/ (grant number FT140101192 (to support D.A.F)). D.A.F was supported by Future Fellowship grant # FT140101192. The funder had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. Competing interests: The authors have declared that no competing interests exist. Abbreviations: MTE, metabolic theory of ecology; OA, elevated CO 2 ; OAT, elevated CO 2 and temperature; T, elevated temperature

Introduction Forecasting the effect of global change on ecosystem functioning is a major challenge in ecology [1], partly because future climate shifts are likely to reorganize complex food webs, generating novel communities composed of new combinations of species [2]. In marine ecosystems, multiple anthropogenic stressors are already eroding biodiversity by changing the composition of species [3] and affecting rates of biomass transfer through ecological networks, resulting in altered food web organisation and dynamics [4,5]. While overexploitation is largely responsible for altering the structure and functioning of many ecosystems [6], global warming is forecast to amplify these effects, having serious consequences for the health and sustainability of marine ecosystems [7]. Despite many studies showing a potential detrimental effect of climate change on biodiversity [2], we still lack a strong and coherent theoretical and empirical foundation for understanding how species communities are likely to respond to global change [8]. Marine ecosystem functioning is maintained by the flow of energy from primary producers at the base of food webs through intermediate consumers to top predators, as well as via cycling of materials such as nutrients within the ecosystem [7,9]. Disturbances such as habitat modification can decouple, alter, or concentrate energy flows towards a smaller number of species and erode resilience by removing alternative feeding pathways in the food web [10]. This can drive trophic food webs to shift states and potentially collapse [11]. In this context, climate change can independently affect, or synergistically amplify, the effect of other disturbances such as habitat degradation, species overexploitation, and species invasions [12]. This can reconfigure future food webs through major structural changes, like shifts in the number of trophic groups and links that connect species at the top of the food chain to basal species, which can result in altered flows of energy and shifts in the biomass of key functional groups, leading to biodiversity loss, with potentially serious implications for ecosystem functioning [13]. Global warming and ocean acidification are already affecting the physiology, behaviour, phenology, demography, abundance, and distribution of many marine species [14]. Elevated temperature (T) affects fish performance and growth through increasing metabolic rates and respiratory demands, leading to a reduced aerobic scope for important life-supporting activities such as feeding, somatic growth, maturation, and predator avoidance [15–17]. Ocean acidification raises the energetic costs involved with calcification and acid-base regulation [18,19] and can impair neural functioning [20]. Besides such direct effects, there is a suite of indirect effects that can impact species persistence and diversity under global change [21]. The survival of a species or a group of species in an ecosystem depends on how well they respond to dynamic changes in productivity, in terms of direction (i.e., positive or negative) and strength. However, the responses of species to global change are not individual-based; they are connected through biotic interactions within and across trophic levels [22,23]. Importantly, the energy flow (biomass fluxes) to higher trophic levels is determined by various biological interactions (e.g., predator–prey relationships, competition, facilitation, and mutualism) of species that are directly or indirectly linked to proximate trophic levels [7,24]. For example, climate change can weaken the energy transfer efficiency between primary producers and consumers by reducing feeding performance with potential impacts further up the food chain [25]. Although ocean warming and acidification can boost basal productivity [26,27], it does not necessarily result in an increase in secondary productivity [28]. The propagation of production through trophic levels could be modified by food chain length [29] or with an increase in the dominance of herbivory-resistant primary producers [30,31]. Cyanobacteria, in the form of toxin-producing deleterious phytoplankton, can potentially divert productivity into alternate food web pathways, which are unavailable to higher trophic levels. Cyanobacteria have been forecast to increase in dominance as a result of global warming [29]. Conversely, in line with metabolic theory [32], increased food demand in predators can intensify top-down control of their prey populations [16], influencing body size-driven metabolic differences in food web structure [33]. Thus, a dichotomy between enhanced bottom up control through an increase in herbivory-resistant primary producers and enhanced top-down control due to higher metabolism-driven energetic demand in predators can jeopardise intermediate trophic levels and weaken food web stability. Such a mismatch can alter trophic energy flow dynamics [25,34], with the consequences expected to be greater in food webs with three trophic levels or more [29]. Forecasting the effects of climate change at the ecosystem level requires holistic approaches that consider complex ecological communities with multiple functional groups or species of different trophic levels [35]. Large-scale mesocosm experiments are ideal for such approaches and have the potential to enhance our understanding of the ecological consequences of climate change on the sudden expansion of opportunistic species, species extinction risk, community structure, and ecosystem functions [36]. We did a community-level manipulation of a temperate marine food web, consisting of 17 functional groups (ranging from primary producers to herbivores to carnivores across 3 broad trophic levels). We maintained these groups in an indoor mesocosm experiment divided into 4 treatments: elevated CO 2 (OA), elevated temperature (T), elevated CO 2 and temperature (OAT), and ambient controls (present-day levels of pCO 2 and temperature), each with 3 replicate mesocosms per treatment. We achieved an elevated pCO 2 of approximately 900 ppm (pH = 7.89) and warming of +2.8°C, which represent the conditions predicted for the end of this century, following a business-as-usual emission scenario (RCP8.5) [37]. We used an ecosystem modelling tool (Ecopath) widely used to characterise quantitative food web structures and pathways of energy flows in aquatic ecosystems [38]. The Ecopath model is built on a system of linear equations and creates a static mass-balanced snapshot of the resources in a given ecosystem according to biomass estimates and food consumption relationships of functional groups that represent the organisms in a food web. The quantitative description of food web properties is essential to advance our understanding of ecosystem structure and functioning at a community level [39]. Using the Ecopath approach, we tested whether: (1) global warming and ocean acidification enhance energy fluxes through bottom-up effects that stimulate primary productivity, or (2) global warming and ocean acidification allow opportunistc groups to proliferate and divert productivity into alternative pathways, as well as (3) biomass of lower trophic levels and detritus will dominate the future structure of marine food webs due to reduced energy transfer efficiencies to higher trophic levels. We also test whether synergies between ocean acidification and increasing temperature are likely to amplify the effect of global warming on marine ecosystems. Thus, through a combination of experimental and modelling approaches, we provide new evidence for altered energy flow (biomass fluxes) and transfer efficiency through food webs due to global change stressors, which is crucial for understanding the potential effects of climate change on marine food web structure and functioning.

Discussion Our study provides strong empirical evidence that global warming has the capacity to drive a collapse in marine food webs by altering energy flows between successive trophic levels. In our ecologically complex benthic mesocosm experiment, the combination of warming and acidification enhanced the biomass of primary producers, but reduced energy flow to herbivores, while warming (irrespective of acidification) reduced energy flow to carnivores at higher trophic levels. Warming also decreased the trophic transfer efficiency between primary producers and herbivores, consequently reducing standing biomass of herbivores and carnivores. Other studies based on the metabolic theory of ecology (MTE) [32], however, suggest that temperature-driven increased primary production is likely to propagate through food webs via strong top-down control [40,41], resulting in greater levels of heterotrophic biomass, relative to autotrophic biomass [4]. In our case, the combination of warming and acidification decoupled increased basal productivity from herbivore production, while warming in isolation reduced predator production, making most of the primary production unavailable further up the food chain. Thus, energy from enhanced primary producer biomass under future climate conditions may not always transfer through to successive trophic levels, but instead can decouple food demand and supply. Such a decoupling may alter dietary preferences of consumers, modifying consumer–prey relationships within food webs. Our current inability to capture more realistic features of food web responses to global climate change is mostly due to a reliance on short-term, small-scale experiments harbouring single species and lower trophic levels, which provide an ambiguous approximation of naturally complex food webs [4]. Moreover, few studies of ecological responses to climate change include predator–prey dynamics and competitive interactions or allow for the potential proliferation of opportunistic groups of species, all of which can greatly influence or reverse many of the predicted responses of species and communities to climate change [26]. In contrast, our experimental results account for complex multispecies interactions and biotic processes, providing an improved representation of natural systems and how these are likely to respond to global warming [42,43]. Our experimental data provide insights into how anthropogenic climate change can potentially affect food web dynamics for relatively short-lived taxa. This is because large scale mesocosm experiments such as ours bridge the gap between simplified experimental conditions and the real world [44], providing important opportunities to better understand the likely mechanisms by which primary productivity under certain future climate conditions propagates through the food web. Increased standing biomass in our benthic mesocosm experiment was most evident for cyanobacteria under warming (irrespective of acidification). Warming is known to enhance the primary productivity of some taxa, particularly of weedy species such as turf algae [45]. Cyanobacteria form a major component of turf algae [46,47] and are predicted to proliferate and expand under eutrophication and climate change [48]. The potential for cyanobacterial dominance in turf algal assemblages under future warming and acidification has been demonstrated previously using experimental approaches [49]. The effect of warming sea temperatures is expected to be greater in areas that are shallow and nutrient rich [50], providing ideal environmental conditions for cyanobacteria to invade other benthic primary producer groups [51,52]. Some cyanobacteria are known to be toxic and cause localized anoxia and mortality in marine organisms [48]. Cyanobacteria also produce potent allelochemicals that deter feeding and are difficult to control by grazers [53]. Herbivores like macroinvertebrates and small epifaunal invertebrates predominantly feed on mat-forming turf algae rather than cyanobacteria. Metabolic theory suggests that consumers will show a greater response to temperature than producers [4,54,55]. Therefore, we hypothesised a priori that warming would drive an increase in metabolic and consumption rates for macroinvertebrates in our experiment. However, reduced food availability, brought about by palatable types of turf algae being replaced by unpalatable cyanobacteria, caused food limitation, preventing increased metabolic rates for macroinvertebrates at higher temperatures, suppressing the flow of energy to the second trophic level [16,56]. Furthermore, biomass of major prey groups such as copepods, small epifaunal invertebrates, and filter feeders, which largely form the diet of consumers at the third trophic level, collapsed under the warming treatments, resulting in significantly less energy available for the third trophic level. One of the reasons for this collapse is an excessive predation pressure on primary consumers by species at the third trophic level (i.e., predators) due to their higher energetic demand [28], which was not matched by any increase in productivity rates of primary consumers under warming. Alternatively, under warming, the consumer–producer relationship at the base of the food web could be nonsynchronous if consumption rates of herbivores peak earlier than the growth rates of producers, creating a mismatch between production and consumption [45]. This means that under certain conditions, even in the absence of herbivory-resistant primary producers, warming-induced metabolic stress of organisms can effectively decouple the consumer–producer relationship if consumer metabolism and consumption cannot keep pace with increasing production. In our experiment, the collapse of biomass of major functional groups under warming played a major part in reducing the transfer efficiency of energy between trophic levels in a food web. A lower transfer efficiency of energy was evident between trophic levels 1 and 2. This is because transfer efficiency depends on both the availability of food, the biomass of all consumers, and their consumption rates. The lower standing biomass at trophic level 2 and reduced palatable food abundance at trophic level 1 collectively brought about lower overall transfer efficiency between these trophic levels under warming. Metabolic theory states that the structure and dynamics of ecological communities are based on the individual metabolism of organisms where the individual metabolic rate is primarily controlled by body size, body temperature, and resource availability [57]. Metabolic theory does not specifically consider the standing biomass of consumers, which is an important component of our model, allowing us to calculate transfer efficiency. Therefore, food web properties, such as transfer efficiency, are difficult to interpret from the perspective of metabolic theory, yet they can have important community-level effects [58]. The replacement of turf algae by cyanobacteria further resulted in a more detritus-based food web under warming. Detritus can be very important for sustaining food webs and ecosystem stability [59], but only when proper recycling occurs within the system [60]. Decreasing detritus recycling in ecosystems correlates with decreased system resilience to perturbations, with lower rates of recycling resulting in slower recovery [60,61]. We show (based on the Finn's cycling index) that warming significantly reduced the detritus recycling capacity of the system. The inability of herbivores to consume enhanced primary producer biomass and the simultaneous failure of detritivores to transfer excessive detritus production to the successive trophic levels resulted in an accumulation of detrital biomass at the base of the food chain. Therefore, warming-induced detritus accumulation, as observed in our study, might have far-reaching ecosystem consequences for future oceans, such as the spreading of ‘dead zones’ through increased microbial activity and consumption of dissolved oxygen in bottom waters [30]. Reduced secondary and tertiary production has been forecast under future acidification [2]. However, this pattern was not detected in our experiment in energy flows, a proxy for production at different trophic levels. We show that acidification can in fact exert positive bottom-up effects on energy flow towards secondary producers (trophic level 2). Ocean acidification could increase secondary productivity in situations where strong indirect positive effects dampen the direct negative effects of elevated CO 2 , i.e., through increased habitat and food, as well as reduced predator abundances [62,63]. Only benthic carnivores and carnivorous fish at trophic level 3 experienced increased energy flows under acidification, which supports the finding of increased productivity of a carnivorous fish (Favongobius lateralis) in a previous study done in a similar ecological setting [28]. In contrast, omnivorous fish showed a decrease in flow and this group was the major contributor of energy flow to trophic level 3 under control conditions. Taken together, the positive effect of acidification on the energy flows of some functional groups and negative or lack of effects on other groups resulted in no overall significant increase in energy flow to trophic level 3 under acidification. Here we quantify secondary and tertiary production, using a more complex (and ecologically realistic) food web, which better captured real-world community structure and important species interactions, and how these are likely to change in response to future global warming and ocean acidification [8,39,64]. This broader food web model also allows us to quantify energy transfer efficiency across multiple trophic levels; an important ecosystem function which can regulate many ecological processes (i.e., trophic structure, food chain length) and mediate ecosystem services (i.e., fisheries production) [65–67]. Our results indicate that the response of future food webs to ocean acidification and temperature are likely to depend on the localized community composition and consumer–resource interactions of the specific ecosystem. Although we used one of the most complex benthic mesocosm experiments to date, our approach is not devoid of caveats. For example, difficulties in separating the functional roles of turf and cyanobacteria meant that they were modelled as one functional group ‘mat-forming algae’. In our model, we did not consider regular bacteria (other than cyanobacteria) as a separate functional group, but rather considered them under detritus. Thus, detritivores are considered to mainly feed on detritus and its associated bacteria. We opted for not using an extra bacterial compartment because bacteria would largely overshadow any other trophic flows of the system [68]. Our study showed a relatively larger biomass flux between trophic levels 1 to 2 compared to between trophic levels 2 and 3 due to the presence of relatively large-bodied primary consumers (such as herbivorous macroinvertebrates: Bulla quoyii), which were too big to handle for the gape-limited predators in our system. The presence of a wider range of higher-order invertebrate predators, as is the case in natural ecosystems, would have reduced this disproportionally high flux between primary producers and primary consumers by stronger top-down control. However, since the focus of our study was to show relative difference among the climate treatments, the results still provide a valuable quantitative insight into the potential future of some benthic marine ecosystem under two co-occurring global climate stressors. One of the weaknesses of earlier applications of the Ecopath model were assumptions of ‘steady-state’ or equilibrium conditions, meaning that the model outputs should only be considered for the period across which the model input parameters are deemed valid [69]. Ecopath modelling approaches now no longer assume steady-state conditions but instead the model parameterizations are based on a mass-balance assumption over a chosen arbitrary period. The mass-balance approach in Ecopath filters for mutually incompatible estimates of flow [69]. Moreover, under the Ecopath modelling approach, we assumed that mortality for a prey equals consumption of a predator and that all prey are equal in terms of energetic content. Additional care needs to be taken when inferences are drawn from ecosystem models built for highly dynamic systems due to likely nonlinearities in important food web properties of some functional groups, operating at fine temporal scales. Nevertheless, since we used multiple sampling points through time and averages based on multiple replicates for our model input, especially for taxonomic groups that have the potential to show large oscillations with environmental fluctuations, the model outputs are likely to be indicative of near-future ecological states. Lastly, model outputs were tested using the PREBAL diagnostic and pedigree index (see Supplementary Methods for details on model and data quality), and confirmed a stable model that is ecologically robust. In summary, our results suggest that warming has the capacity to drive an energetic collapse at the base of marine food webs, and this effect can propagate to higher trophic levels—subsequently leading to a collapse in species biomass of the entire food web. The underlying mechanism for this collapse is the replacement of preferred turf algae by cyanobacterial biomass that drives the system towards food limitation for herbivores, with detrimental effects on their predators, combined with a switch towards a less efficient detritus-driven system. Several studies have reported an apparent increase in the occurrence of cyanobacteria in marine waters globally as a result of increasing temperatures [52], and regionally in temperate [70], tropical [51,71], and subtropical [72,73] areas. Thus, these findings are particularly important in the context of climate change, as mismatches in trophic dynamics can decouple linkages between trophic levels driving ecosystems towards simplified, less productive systems, with cascading effects on ecosystem resilience and functioning.

Materials and methods Ethics statement This research was carried out under the approval of the University of Adelaide animal ethics committee (approval S-2012-193A). All the habitats and organisms collections were permitted by the Minister for Transport and Infrastructure and the Government Department of Primary Industry and Regions SA (exemptions: 9902676 and 9902752). Experimental design An indoor mesocosm experiment was maintained from February 2015 to July 2015. A total of 12 circular mesocosms, each holding 1,800 L of water were set up inside a large temperature-controlled room to simulate shallow temperate coastal ecosystems typical of the Gulf St. Vincent, South Australia (S4 Fig). All habitats and organisms used in the mesocosms were collected at a depth of 1–5 m within 60 km distance of the mesocosm facility. Each mesocosm comprised of a mosaic of the 3 primary local habitats (with 2 replicate patches per habitat per mesocosm): rocky reef, seagrass, and open sand [74]. Rocky reefs consisted of natural rocks collected in situ and included attached macrophytes dominated by an assemblage of fucoids (Order Fucales; mainly species belonging to the families Fucaceae and Sargassaceae) and benthic invertebrates. Rocks were selected to be as similar as possible in terms of presence and cover of major fucoid species. Seagrass habitat was mimicked by artificial green polypropylene ribbon harbouring epiphytes and planted into fine silica sand at a depth of 6 cm. The seagrass habitat resembled the most abundant local seagrass Posidonia spp. [74] and was incubated in situ for 2 weeks to allow for epiphytic colonization. The circular ‘rocky reef' patches and ‘artificial seagrass’ patches were of equal size (0.42 m diameter). The space in between and around these patches was ‘open sand’ habitat, comprising fine silica sand with a depth range between 6–25 cm. The open sand and sand within the seagrass patches were additionally seeded with 0.025 m3 natural sediment collected in situ between patches of live seagrass and included all infauna and flora. Fish and invertebrates were introduced into the mesocosm and represented different feeding guilds (see S6 Table for a list of species associated with the mesocosms, their stocking density, and mean sizes). The fishes were selected based on their high local juvenile abundances in shallow coastal waters during summer, while the gastropods came from the rocks used to build the rocky reef patches and were redistributed evenly among all mesocosms. In the flow-through system, unfiltered seawater from 1.5 km off-shore and 8 m depth continuously supplied nutrients and planktonic propagules to each mesocosm at 2,300 L day−1. A diffuser was used to form a light circular current in the mesocosms to simulate tidal water movement alternating direction in 6-hour intervals (S4 Fig). A lamp was mounted above each mesocosm with a spectrum close to sunlight, which is roughly equivalent to 72.83 ± 24.78 μmoles/m2/second Photon flux corresponding to a local water depth of 6–7 m (14/10 light-dark cycle, 30-minute dawn and dusk dimming). We applied a control temperature of 21.0°C in our mesocosm experiment corresponding to the average summer temperature based on a 5-year dataset of 2 local temperature loggers (5 m depth, 2010–2015, SA Water). OA at each mesocosm was achieved through a header tank preconditioned to elevated pCO 2 levels using pure CO 2 (control system ACQ110 Aquatronica, Italy). Additionally, each mesocosm was supported by a 60-L bin bubbled heavily with enriched air at 1,000 ppm pCO 2 (PEGAS 4000 MF Gas Mixer, Columbus Instruments, Columbus, Ohio) or ambient air at 400 ppm pCO 2 , to maintain target levels. Submersible titanium heaters inside the 60-L bins were used for the future warming treatments. Temperature and pH were measured daily (Mettler Toledo SevenGo SG2, calibrated daily; S5 Fig), while salinity was measured fortnightly (SR6 refractometer; Vital Sine). The total alkalinity was also measured fortnightly by Gran titration from water samples (888 Titrando, Metrohm, Switzerland). The diurnal variability in pH (S6 Fig) confirms that our mesocosms were autonomous systems that mimicked natural day-night fluctuations. For a description of other seawater properties, see S7 Table. Species sampling and processing The fish community, herbivorous macroinvertebrates, small epifaunal invertebrates, filter feeders, and macro-crustaceans were all sampled and counted at the end of the experiment and their biomass measured as wet weight. Biomass of tanaids, copepods, and meiobenthos was determined using benthic samplers (6.5 cm in diameter and 2 cm depth filled with 1.5 cm of mesocosm sand, with 2 replicate samplers per mesocosm), which were placed at the bottom of the tanks for about a month, allowing colonization of these species. Samples were collected twice from each mesocosm during the experimental period and pooled for each mesocosm prior to processing. Tanaids, meiobenthos, and copepods were extracted from the sand within the benthic samplers via floatation using a Ludox TM colloidal solution with a specific gravity of 1.18. The animals were then collected using a 120 μm sieve. Microzooplankton biomass was measured following volumetric method [75] by filtering 400 L of water from each mesocosm through a plankton sampler at the end of the experiment. Phytobenthos biomass was measured using the same benthic samplers as above. Two samplers were placed in each mesocosm for biomass measurements. A micro-spatula was used to carefully scrape the thin phytobenthic layer from the upper surface (approximately 1 mm thick) of the sand. The remaining sand was filtered through a pre-combusted and pre-weighed Whatman GF/C glass fiber filters to determine the detritus biomass. In the laboratory, photosynthetic pigments were extracted from freeze-dried sand samples (0.3–0.6 g) with 10 ml 90% acetone. After 48 hours of darkness at –20°C, the samples were stirred in a vortex, centrifuged at 3,500 rpm for 15 minutes, and extracts were analyzed in a 6,405 UV/Vis, Jenway spectrophotometer and their concentration calculated [76]. Phytoplankton biomass (measured as Chlorophyll a) was quantified based on photosynthetic pigment concentration. Four litres of water were filtered from each mesocosm with Whatman GF/C glass fiber filters of 4.7 cm diameter, and ground and extracted [76]. Samples for both phytobenthos and phytoplankton were collected twice during the experimental period, and the average of both was used as the model input. To estimate the biomass of macrophytes and mat-forming algae, all habitats (rock, seagrass, and open sand) were sampled at the end of the study period. Their wet weight was determined to the nearest 0.1 mg. Mat-forming algae were defined as a mix of turf and cyanobacteria. The relative cover of cyanobacteria in mat-forming algae was estimated using the Coral Point Count with Excel Extensions (CPCe) Software [77]. In addition, community metabolism was measured as gross oxygen production (mgO 2 /m3/min1) once per mesocosm at the end of the study. Oxygen concentration was measured in 1 minute intervals over at least 30 minutes (HQ40d Portable Meter, sensor LDO101, HachTM). A linear regression model of O 2 production rate (where O 2 concentration was modelled as function of time) was fitted and confirmed a high level of precision in the measurement of O 2 concentrations across the 12 mesocosms (mean ± SD, R2 = 0.94 ± 0.04). Food web model construction We built mass-balanced food web models. Trophic links were weighted by material fluxes among functional groups using Ecopath [78]. We modelled energy or mass flow over a 4 month time step based on local summer conditions today and in the future. We then converted and expressed the model produced energy flow results from the experimental period to values/month to make it more comparable to other systems. Our model used the following input parameters: biomass, represented by the value B; production per unit of biomass, represented by the value P/B; consumption per unit of biomass, represented by the value Q/B; diet matrix; and the model-estimated ecotrophic efficiency, represented by the value EE. The latter is a parameter that is derived from the model, describing the fraction of the productivity that is used in the system. Most of these model parameters were calculated using our empirical mesocosm data, including final biomass (end-of-experiment) and diet composition of consumers of various functional groups (see S8, S9 and S10 Tables). The Q/B ratio for most of the functional groups was calculated using stomach content analysis and in situ feeding trials that incorporated treatment effects. Therefore, it incorporates the direct effects of temperature on metabolism, accounting for estimates of trophic biomass fluxes and efficiencies. In cases where data were not available, data were derived from empirical equations and published information (see S1 Text). Flow and transfer efficiency were based on the trophic aggregation routine [69] that aggregates the entire system into discrete trophic levels sensu [79]. The discrete trophic levels start with level I, corresponding to the primary producers and the nonliving, detrital compartments. Strict herbivores or detritivores consequently occupy a position of level II. This is followed by higher-order consumers that are allocated to several discrete trophic positions according to the type and amounts of food that reach them along feeding pathways. Energy flows were calculated for different trophic levels following [80], where—for example—if a group obtains 40% of its food as an herbivore and 60% as a carnivore, the corresponding fractions of the flow through the group are attributed to the herbivore level and the carnivore level, respectively. The relative flows (these are proportions adding up to 1) were converted to absolute amounts and shown as the net amount of energy that flows to higher trophic levels through consumption (g/m2/month). The ‘transfer efficiency’ is the percentage of trophic flows at trophic level n that is converted into flows at level n + 1. The transfer efficiency of a given trophic level (trophic level = n) not only depends on the available energy at a given trophic level (trophic level = n) but also the standing biomass at the next trophic level (trophic level = n + 1). The transfer efficiencies between successive discrete trophic levels were calculated as the sum of the flow that is transferred from any given level to the next higher level, plus exports from the original level relative to the throughput (or input) of the given (originating) trophic level [69,78]. The throughput is the sum of all flows (such as consumption, export, respiration, and flows to detritus) in a given trophic level and represents the ‘size of the trophic level in terms of flow’ [81]. Calculation of transfer efficiency from trophic level 1 to 2 is not possible without having information on gross primary production or respiration [82]. We measured net productivity and respiration in each mesocosm and used them to estimate the transfer efficiency between trophic level 1 and 2 for each mesocosm food web [69,78]. The initial output for both energy flow and transfer efficiency was obtained for discrete trophic levels I to V. However, for the simplicity of the model output and better visualization, we pooled the data for trophic levels III to Vand showed this as 1 integrated trophic level (i.e., trophic level 3). We used the Ecopath pedigree routine to quantify the uncertainty associated with the model parameters by recording the origin and quality of the input data and assigning a value of uncertainty or a confidence interval to each input (e.g., biomass, P/B, Q/B, diets), which are then used to calculate the overall model pedigree index. The pedigree index varies between 0 (low precision information) and 1 (high quality, i.e., obtained from modelled system and highly precise), allowing a description of the quality of the model [78]. Our overall individual model pedigree index of 0.71, and a measure of fit of t = 3.819, indicates a very high quality and robust model compared to 393 previously constructed models from habitats from around the world, for which pedigree values ranged between 0.164 and 0.676 [83]. More details on the parameterization and model computation are given in the Supplementary Methods. Statistical analysis The effects of warming and ocean acidification on food web properties (response variables: absolute energy flow, transfer efficiency, and standing biomass) were analysed using two-way ANOVAs. Both climate factors were treated as fixed and orthogonal. Before analysis, normality was checked for all response variables using the Shapiro-Wilk test, and homogeneity of variances was assessed using a Levene’s test as well as by evaluating plots of residuals against predicted values. Response variables were log 10 transformed prior to analysis if they did not conform to a normal distribution. For significant interactions, posthoc multiple comparisons adjusted by false discovery rate were performed [84]. All data analyses were done with the software package R version 3.2.3 [85].

Acknowledgments We would like to thank W. Hutchinson and M. Gluis for their technical advice and supports during the mesocosm experiment. We acknowledge the effort from all the students who helped with the construction and maintenance of the mesocosm, with special thanks to Camilo Ferreira and Georgia Walden, Emma Marangon, and Angélique Bonnet. We also thank T. Kildea for providing local temperature data.