Drivers of phytoplankton community structure change with ecosystem ontogeny during the Quaternary

known of their response to the large-scale environmental change that took place during the Quaternary. This is partly due to the scarcity of continuously preserved freshwater sedimentary records with orbital chronology. We use a 1.363 Ma high-resolution fossil record of planktonic diatoms from ancient Lake Ohrid to evaluate the role of global and regional versus local-scale environmental change in driving temporal community dynamics. By using a Bayesian joint species distribution model, we found that communities were mostly driven by the local-scale environment. Its effects decreased over time, becoming less important than global and regional environment at the onset of the penultimate glacial, 0.183 Ma. Global and regional control over the environment became important with successive deepening of the lake at around 1.0 Ma, and its in ﬂ uence remained persistent until the present. Our high-resolution data demonstrate the critical role of lake depth and its thermal dynamics in determining phytoplankton response to environmental change by in ﬂ uencing lake mixing, nutrient and light availability. With this study we demonstrate the relative impact of various environmental factors and their scale- dependant effect on the phytoplankton communities during the Quaternary, emphasizing the importance of not only considering climate ﬂ uctuations in driving their structure and temporal dynamics but also the local environment.


Introduction
Global environmental change can have far-reaching consequences for the biodiversity, structure, function, and stability of ecosystems (AR5 Synthesis Report, 2014; Lewis and Maslin, 2015). Ongoing, human-induced global change is expected to alter community composition due to species responses via shifts in their abundances and geographical distribution, or in some cases through phenotypic plasticity, evolutionary adaptation, or ultimately, extinction (Lenoir and Svenning, 2015). A growing body of evidence indicates that many species are unable to change their geographical range to more favorable habitats to avoid extinction (Ceballos and Ehrlich, 2018). Due to more dispersal barriers preventing range changes, freshwater species have higher rates of climate-related local extinction than those from marine environments (Wiens, 2016). This is particularly critical as the former species are considered more susceptible to changes in, for example, precipitation, temperature, and elimination or alteration of habitats (Huey et al., 2009;Ivory et al., 2016). Despite growing knowledge on the influence of global change during the past century, we have a very limited understanding of how large-scale environmental alterations such as long-term climate oscillations affected freshwater species and communities (Cohen, 2003).
The Quaternary experienced large-scale, cyclic oscillations from warm interglacial to cold glacial periods, regulated by the variations of the Earth's orbit around the Sun and greenhouse gas forcing (Ehlers et al., 2018). These oscillations have profoundly and repeatedly altered terrestrial and aquatic environments, not only through changes in temperature and precipitation, but also through their effects on element and nutrient cycles (Lowe and Walker, 2015). While there are substantial data on the interactions between Quaternary environments and their terrestrial flora (Birks and Berglund, 2018;Tzedakis et al, 2004Tzedakis et al, , 2013, similar information about its freshwater counterparts is far less available. Part of the problem is the limited number of continuously preserved freshwater sedimentary archives that span a significant portion of the Quaternary. Records extending beyond the last glacial mainly comprise those of ancient lakes (Mackay et al., 2010;Wilke et al., 2016), which usually contain sedimentary successions of over a million years (Martens, 1997). These lakes may also contain exceptional taxonomic and phenotypic biotic diversity and are rich in endemic species (Martens, 1997;Salzburger et al., 2014) offering the possibility to evaluate climate-and other environmentallydriven responses of unique species and communities. Multiple studies on ancient lake sediment records focusing on Pleistocene time-scales have shown that planktonic diatoms shift in coherence with regional expressions of global-scale climate change (Cvetkoska et al., 2016;Khursevich et al., 2001;Reed et al., 2010;Snyder et al., 2013;Stone et al., 2011). Moreover, it has been shown that climate driven lake-level fluctuations during the Quaternary have affected community assembly in various freshwater taxa, such as the iconic cichlid fishes from the East African Lake Malawi (Ivory et al., 2016). While this indicates that global and regional climate may play a substantial role in influencing community dynamics over extended periods of time, the relative importance of long-term change in global and regional, or in local environment, in leading to the present-day community structure is poorly understood. Ancient Lake Ohrid is Europe's oldest and most biodiverse freshwater lake and provided a long, continuous sediment record with well-constrained chronology of 1.363 million years (Ma) (Albrecht and Wilke, 2008;Wagner et al., 2019). The sediment succession covers the lacustrine history of the lake from an initial, shallow basin surrounded by marshes, rivers and springs to the 293 m deep, hydrologically-open lake at present. A significant threshold may have passed around 1.150 Ma, when proxy data indicate the establishment of more permanent deeper water conditions Wagner et al., 2019;Wilke et al., 2020) that might be correlated with the formation of an aphotic zone or a hypolimnion. The sediments contain an undisturbed and well-preserved record of planktonic diatoms (Bacillariophyceae; single-celled siliceous algae). Our previous studies focusing on the Late Pleistocene, 0.130 Ma to the present, suggest that planktonic diatom composition is driven mostly by large-scale temperature change (Cvetkoska et al., 2016;Reed et al., 2010). However, global and regional change may not affect local communities directly. The specific geographical settings of an ecosystem, its geology, tectonics, and microclimate of the surrounding area translate global and regional change into local environmental drivers of community composition, which are thus correlated with global/regional indicators. These contrast with local-scale environmental parameters, for instance hydrological, geomorphic and tectonic variables, which are at most under a weak control from global/regional indicators and thus uncorrelated to them.
Here, we provide the first complete record of planktonic diatoms from Lake Ohrid to investigate how repeated, naturallyforced environmental change influenced community dynamics during the 1.363 Ma long history of the lake. Assuming that global and regional forcings over environment will play a predominant role in structuring the planktonic diatom communities throughout the entire record, we analyzed time-series data of relative species abundances against long-term global and regional, and local-scale environmental (bio-geochemical) proxy data and quantified their influence on community composition over time.

Regional setting
Lake Ohrid (North Macedonia/Albania, Fig. 1) is the oldest, continuously existing freshwater lake in Europe. It is a tectonically formed lake with a mean and maximum water depth of 155 and 293 m (Lindhorst et al., 2015), respectively, and a surface area of 358 km 2 . The hydrological regime of the lake is regulated by 44.8 m 3 s À1 inflow, accounting for~20% direct precipitation,~16% river input and~64% karst aquifers (Lacey and Jones, 2018). The major inflow of the lake is from karstic aquifers, which are charged from mountain range precipitation and from neighbouring Lake Prespa. The two lakes are hydrologically connected through underground channels in the Galicica/Mali Thate mountains and their combined catchment area approximates 2600 km 2 (1300 km 2 excluding Lake Prespa). As a result of the relatively small inflow and dry climate, the calculated water residence time of Lake Ohrid is 70 years. The outflow is regulated through the river Crni Drim, evaporation and groundwater loss, accounting for~31%,~33%, and 36%, respectively (Lacey and Jones, 2018). At present Lake Ohrid is a calcium bicarbonate Ca(HCO 3 ) 2 dominated, oligotrophic lake with an average total phosphorus (TP) concentration of 4.5 mg Â m À3 (Matzinger et al., 2007).
In 2013, a coring campaign was carried out under the umbrella of the International Continental Scientific Drilling Program (ICDP) and a 584 m sediment succession (DEEP-5045-1; Fig. 1B) was retrieved from the central part (DEEP site) of the lake at a water depth of 243 m . The upper 456.1 m composite core depth (mcd) of the sediment succession consisted of undisturbed, fine-grained, and hemipelagic sediments . Moreover, the upper 446.65 mcd that represent the entire lacustrine history back to ca. 1.363 Ma contain a remarkably wellpreserved record, especially of planktonic diatoms , which is rare among sedimentary records from ancient lakes. The development of the age model is described in detail in Francke et al. (2016) and Wagner et al. (2019).

Community data sampling
Diatom count data were generated from 350 sediment samples taken at a temporal resolution of 2.0e4.0 ka for the 1.363 Ma long period of lake existence. Processing of sediment samples and preparation of permanent diatom slides followed the protocols described by Cvetkoska et al. (2012). Each slide was analyzed across random transects to count 200e400 diatom valves. Taxon identification and counting were performed by two people trained in the same laboratory, with taxonomic harmonisation including crossvalidation. Diatom analyses were conducted with an Olympus BX51 light microscope at 1,500x magnification and a Carl Zeiss Axioplan 2 microscope at 1,000x magnification. To obtain a robust estimate of taxon richness, the number of counts needed per sample was determined via rarefaction analysis using the package vegan 2.4.4 (Oksanen et al., 2019) for the R statistical environment 3.5.2 ("R: The R Project for Statistical Computing," n.d.). All microscope slides are stored at the Systematics and Biodiversity Collection of the University of Giessen, Germany, UGSB (Diehl et al., 2018).
For this study, we focused on the planktonic community as planktonic diatoms have a higher preservation rate in the fossil record of Lake Ohrid  and a count of zero represents most likely a true absence instead of our inability to recover a fossil due to a low preservation. Moreover, planktonic diatoms are highly sensitive to long-term climate and environmental change (Saros and Anderson, 2015), and by excluding the benthic group we minimized the effects of less relevant variables, such as available substrates, habitat structure, microclimate variability, and physical disturbance, that greatly influence benthic diatoms and their transport to the center of the lake (Bennion et al., 2010). Our dataset comprised 43 extinct and extant planktonic taxa, amongst which 19 are endemic for Lake Ohrid (Fig. 2). We identified high morphological variability in size, shape, and ornamentation features within some dominant species, such as Cyclotella cavitata, Cyclotella fottii and Pantocsekiella ocellata (Fig. S1). To test whether this variability may relate to environmental change, entities that occur for more than 0.01 Ma and have clear distinctiveness, were included in the analyses as independent taxa.

Estimating temporal community dynamics
Community dynamics were displayed as relative diatom abundances over time with Tilia v. 2.0.2. (Grimm, 1991). Major community shifts over time were identified by i) calculating a chord distance matrix between all communities after excluding taxa with <2% overall abundance and ii) subjecting this distance matrix to the Constrained Incremental Sum of Squares cluster analysis, CONISS (Grimm, 1987) implemented in the R package rioja 0.9e21 (Juggins, 2019). The relevant number of clusters was determined via a majority vote across 30 cluster indices. For this, the NbClust 3.0 R package (Charrad et al., 2014) was modified to include the CONISS cluster analysis (available on https://github.com/thauffe).

Assessing the influence and temporal change of global/regional and local environment on community dynamics
To quantify the relative influence of abiotic variables in governing community dynamics, we applied the concept by Wilke et al. (2020) and used sets of previously published data, selected to represent long-term changes in: i) global and regional, and ii) local (basin-scale) environment (see Table 1 for details, Fig. S2). Global and regional control over environment includes variables that represent changes in global ice volume, CO 2 concentrations, and temperatures, orbital parameters, and regional/Mediterranean evaporation and temperatures. Local environmental variables included indicators of ontogeny, nutrient availability, lake mixis, temperatures, organic matter in the sediments, redox conditions, erosion and local precipitation. Collinearity among predictors in regression analysis inflate inferred uncertainty in regression coefficients and thus bias predictor selection (Dormann et al., 2013;Zuur et al., 2010). Our earlier studies and model predictions show clear orbital-scale cyclicity in some of the predictors, such as TIC, K and deciduous oaks . For this study, we used co-correlation analyses to detect collinearity between environmental variables and retained only those as candidate predictors with a Pearson's correlation coefficient r < |0.7|, Fig. S3, a value suggested as most appropriate indicator to avoid severe distortion of regression models in ecology (Dormann et al., 2013). We used the Bayesian joint species distribution model implemented in the R package boral 1.8 (Hui, 2016) to test which environmental variables have significant influence on community composition and whether their influence changes over time. Joint species distribution models provide a hierarchical framework related to generalized linear (regression) models. Besides several desirable statistical properties (Ovaskainen et al., 2017;Warton et al., 2015), the advantage of selecting Bayesian JSDMs over  (Lisiecki and Raymo, 2005) and indicated as grey and white horizontal bars representing interglacial and glacial periods, respectively. (B) CONISS delineated major communities.

Table 1
List of compiled data used to represent the global and regional control over the environment and the local environment in the regression model. Variables marked with asterisk (*) were removed from the analyses due to collinearity. Extended proxy explanations are available in the provided references. Note: for the purpose of this study we simplify the proxy inference of TS and acknowledge the complexity of environmental factors that may influence its content in the sediment record. For a detailed interpretation of potential factors affecting its content in the sediment record we refer to Wagner et al. (2009) and Francke et al. (2016). ordination methods for this study is the possibility to account for temporal autocorrelation in species abundances. In addition, endemic taxa, before/after their first/last occurrence, do not influence parameter inference as they were coded as true absence instead of a wrong abundance of zero. Whether the influence of the selected environmental variables on community composition changes over time was evaluated by two criteria: i) the presence of a difference in the regression slope between an environmental variable and taxon abundance (i.e. a statistical interaction between environmental variable and major communities) among the delimited major communities, and ii) a change in the amount of variance in community composition explained by the global/regional and local variables across the major communities. These two criteria represent the differential effect of the environmental variables and how important they are in influencing community composition over time. Because the stochastic search algorithm for variable selection in boral is not very well explored (pers. comm. F. Hui), we identified the most parsimonious model and the significant environmental variables (and whether they interact with the major communities) by a stepwise backward elimination of variables that do not improve model fit. This was followed by a forward step where a potential improvement in model-fit of all not-included variables is tested. Our criterion for model-fit was the Akaike information criterion (AIC), penalizing for the number of model predictors, which we calculated from the median of the Bayesian posterior distribution of the JSDM's likelihood.
To evaluate the relative importance of the global/regional and local environmental variables for the community composition, we partitioned their explained variance accordingly for the overall planktonic diatom dataset and a posteriori stratified for each major community. We penalized boral's measure of explained variance for the number of predictors relative to the number of observations (Theil, 1961). For convenience we call this measure in this study pseudo-R 2 adjusted (but note that this is substantially different from the traditional coefficient of determination). The JSDM's were specified with a negative binomial distributed error term for the abundances, a random row effect to model community composition without the biasing effect of richness differences, two latent variables for associations between taxa, and an exponential declining temporal autocorrelation. We assessed the model-fit and explained variance after running the analyses for 12,000 MCMC generations, sampling every 5th generation after discarding the first 2000 as burn-in. In our study we refer to a global/regional influence in the case that a global/regional proxy is only weakly correlated with any local-scale environmental proxy derived directly from the sediment core of Lake Ohrid.
To further explore the variation in the diatom data we used the detrended correspondence analysis (DCA) in the in Canoco v. 5.11 statistical package (Braak and Smilauer, 2012). The periodicity in the DCA Axis 1 time-series, as a summary of the total variation in the planktonic diatom dataset, was quantified with REDFIT spectral analysis and significance assessed through bootstrapping (Schulz and Mudelsee, 2002). The time-series analyses were performed in the statistical package PAST (Hammer et al., 2001).

Temporal community dynamics
The majority vote across the 30 cluster indices indicates a subdivision of the CONISS cluster analysis in three major planktonic communities throughout the 1.363 Ma DEEP sediment succession (Community I: 1.363e0.958 Ma, 447e335 m core depth; Community II: 0.958e0.183 Ma, 335e80 m; Community III: 0.183e0 Ma, 80e0 m, Fig. 2A). Each major community is characterized by relatively few, dominant taxa, but often with high intraspecific trait variability and morphological diversity. Taxa dominances are stable for extended periods of time, sometimes lasting more than 0.300 Ma ( Fig. 2A), to be followed by relatively rapid turnover in community composition.
The initial, Community I persisted for 0.4 Ma and is characterized by shifts in dominance between nutrient-affine non-endemic and endemic taxa with a maximum biostratigraphic span of 0.15 Ma. The extinction of some Pantocsekiella taxa defined the collapse of Community I at 0.958 Ma when deeper water conditions had established in the lake ( Fig. 2A). Community II endured for more than 0.75 Ma and is differentiated by a remarkable dominance of the fossil endemic C. cavitata (i.e. > 50% between 0.958 and 0.620 Ma, Fig. 2A). Its extinction at around 0.213 Ma was followed by an increase in abundance of a novel morphological variety of C. fottii (Fig. 2A). The disappearance of this variety from the record marks the latest community turnover at around 0.183 Ma. The final, Community III existed during the last glacial-interglacial period, in which the assemblages showed high variation in taxa abundances and increased intraspecific diversity of the now dominant endemic C. fottii and non-endemic P. ocellata.

Influence and temporal change of global/regional and local environment on community dynamics
None of the global/regional variables showed high collinearity r < |0.7| with the set of local-scale indicators (Table 1, Fig. S3), thus predictor selection in the Bayesian joint species distribution model (JSDM) is unbiased and allows us to disentangle their influence on the community dynamics. However, there is some multicollinearity among global/regional and local variables, respectively. Based on this co-correlation analysis we selected six uncorrelated predictors to represent the influence of the global and regional change over the environment and seven uncorrelated predictors for the local-scale environmental influence. The results from the Bayesian joint species distribution model show that together the environmental predictors selected by the analysis explain 62.8% of the variance in the diatom data (i.e. the pseudo-R 2 adjusted ; Table 2, Fig. S4). The random row effect, which removes the effect of richness differences among diatom samples, explained only 0.5% because of our consistent taxon determination of 200e400 diatom valves. The remaining, unexplained variance in the dataset is 36.7%, and can be associated with unmeasured environmental and/or biological factors. Of all variables tested, we found 12 environmental predictors to significantly influence diatom communities as they improved the model fit of the Bayesian JSDM and had a non-zero influence on taxon abundances. These include the global and regional variables: eccentricity, precession, LR04, Medstack, and CO 2 ; and the local environmental variables: TIC, TOC, TS, TN, deciduous oaks, medium silt, and coarse silt (Table S1; Fig. S4).
We found support for both of our criteria that test temporal change of environmental influence on community composition: (i) a difference in the regression slope between eccentricity and taxon abundance among the major communities (i.e. a statistical interaction; Fig. S6), and (ii) the partitioning of explained variance in the diatom data, which revealed a changing influence of the global/ regional and local-scale environmental variables between the major communities (Fig. 3).
Partitioning the variance in taxa abundances explained by our regression model, showed that the older Communities I and II were mainly influenced by local environmental variables, with TIC and TS having the highest explanatory power, respectively. The local environment had lowest influence in the most recent Community III, in which we found the highest fraction of unexplained variance among all three communities. Global and regional control over environment had a lower contribution in Community I but increased in its importance for Communities II and III with Earth's eccentricity and LR04 having highest explanatory power, respectively (Table 2, Fig. 3, Fig. S5).
The additional time-series analysis of variation in diatom abundance data shows the 19 ka precession signal and captures a significant period of ca. 28 ka (95% chi-square) in the power spectra (Fig. S7).

Influence of global/regional and local environment on community dynamics
The community composition and abundance of lake phytoplankton are controlled by a complex set of physical, chemical, and biotic factors that interact at diverse spatial and temporal scales (Reynolds, 2006). Our high-resolution time-series data of diatoms in Lake Ohrid shows that taxa abundances and community structure between 1.363 and 0.183 Ma were mainly influenced by the local environment. We also show that the effects of global/regional and local environment varied over time, with the former increasing Table 2 Variance in diatom abundances explained by individual predictors retained in the best-fit joint species distribution model (JSDM). All explained variances were penalized by the number of predictors in the respective partition group to enable a fair comparison between groups of unequal sizes. Explained variances were obtained from the same JSDM and are given for the whole diatom fossil record over the past 1.363 Ma and time-stratified for each part of the diatom abundances that represent a major community.  . 3. Results obtained with the Bayesian joint species distribution model displaying the relative contribution (pseudo-R 2 adjusted ) of individual variables and overall global and regional (warm yellow scaled colours) and local-scale environment (cool blue scaled colours) in explaining variation in diatom data for each planktonic community separately. (For interpretation of the references to colour in this figure legend, the reader is referred to the Web version of this article.) and latter decreasing towards the present.

Global and regional environment
In terms of global and regional control over environment, our regression model demonstrated that long-term environmental changes related to global ice volume and temperatures (LR04), atmospheric CO 2 concentrations, Earth's eccentricity, precession, and regional/Mediterranean temperatures (MedStack) contributed to the diatom community dynamics throughout the last 1.363 Ma. Effects of local-scale environment were highest in Community I, but their importance decreased as the lake became deeper and global and regional change increased their importance (Fig. 3). This could have resulted from the gradual increase in the duration and intensity of the glacial-interglacial cycles during the mid-late Pleistocene (Lang and Wolff, 2011). Additionally, the deepening of Lake Ohrid has probably buffered the effects of: i) the tectonic and geomorphic evolution of the lake; ii) local environment through thermal inertia, leading to a decreased frequency and duration of lake mixis and iii) nutrient and ion supply from the catchment area, and thus supported a higher persistence to external, global and regional forcing. Indeed, climate models suggest that large lakes reduce the seasonal variability in air temperatures in their surrounding area (Notaro et al., 2013).
The amount of explained variance in diatom community composition that relates to Earth's astronomical cycles (Laskar et al., 2004) showed a substantial influence of eccentricity on the mid and late, Communities III and II. In addition to the response of diatom communities on eccentricity pacing, the model showed minor influence of the 19 ka precession signal. The time-series analysis of the diatom community shifts (Communities III and II) shows significant periodicities at 19 ka and 28 ka (95% confidence, chi-square) (Fig. S7). Eccentricity modulates the amplitude of precessional cycles, and together, eccentricity and precession are a powerful combination that controls the degree of summer insolation and seasonal contrast (Lourens, 2016). Both parameters affect day length and light availability e a key limiting factor influencing planktonic diatoms either directly, through effects on their growth rates, or indirectly, through changes in ecosystem processes related to hydrothermal structure and mixing intensity (Anderson, 2000). A link between eccentricity, light intensity and phytoplankton growth has been already demonstrated in some marine sediment records (Amore et al., 2012;Rickaby et al., 2007), but similar observations for freshwater systems are rare (Colman et al., 1995). Hence, our diatom data provides evidence of eccentricitymodulated precession forcing that has most likely influenced the community dynamics in Lake Ohrid during the Quaternary. The ca. 28 ka frequency band has been detected as a significant component in various Pleistocene and Neogene ice core and foraminiferal d 18 O records (Huybers and Wunsch, 2004;Lisiecki and Raymo, 2005;Lourens et al., 2010). Lourens et al. (2010) related the ca. 28 ka oscillation in the d 18 O records to the 41 kyr carrier, representing a non-linear response of the ice sheets to the obliquity forcing that is an important constituent of the high-latitude temperature changes. The detection of the ca. 28 ka pacing in our time-series data indicates an additional effect of the Northern Hemisphere ice sheet dynamics, likely via their indirect influence on the air temperatures and precipitation.
As the lake deepened, long-term variations in ice volume, temperatures, and evaporation (LR04, MedStack) increased their influence over the environment, especially during Community III (0.183e0 Ma). Glacial-interglacial change in global ice volume impact the climate system via feedback effects on temperatures, greenhouse gas concentration, atmospheric circulation, and local ice formations (Stap et al., 2014;Wadham et al., 2019). Indirectly, these feedback mechanisms influence the hydrology and nutrient content of aquatic ecosystems, and therefore its planktonic communities. Water temperature is shown to have strong effects on phytoplankton growth rates, intrinsic cell properties, such as size, volume, and nutrient contents, as well as species competitive interactions (L opez-Urrutia and Mor an, 2015). Non-endemic Pantocsekiella taxa that appear to be influenced by changes in the environment related to global ice volume and temperatures ( Fig. 2A, Fig. S5) started to increase their abundance around 0.450 Ma and became dominant, particularly during the succeeding glacials. These abundance shifts were followed by local extinctions of some previously dominant endemic taxa in Community II (e.g. C. cavitata, C. fottii var. 2 nov.), which were mainly influenced by local environment (Fig. S5), and the establishment of a distinct community at 0.183 Ma (Fig. 2A). The observed change in community structure coincides with the transition towards stronger glacial-interglacial amplitudes in climate variability from around 0.450 Ma ago (Barth et al., 2018) and the penultimate glaciation which commenced 0.191 Ma ago (Lisiecki and Raymo, 2005).
Pronounced environmental variability after 0.450 Ma in Lake Ohrid has most likely caused strong discrepancies in glacialinterglacial temperatures, precipitation, and nutrient contents. Very cold and dry, nutrient depleted glacials interspersed with warm, nutrient replete interglacials that led to abundance shifts or local extinctions and recolonizations in the lake, respectively (see the importance of e.g. LR04 and Medstack, Fig. 3). The penultimate glaciation is one of the strongest Pleistocene glacials that has clearly affected diatom community dynamics in other long-lived lakes across the globe, like for example El'gygytgyn (Snyder et al., 2013), Baikal (Khursevich et al., 2001) and Titicaca (Fritz et al., 2012).

Local (basin-scale) environment
Our regression model associated the variance in planktonic taxon abundances and community dynamics to TIC, TOC, TN, TS, deciduous oaks and very coarse to medium silt, representing local variations in primary productivity, temperatures, precipitation, lake mixing frequency, nutrient availability, but also basin ontogeny and moisture availability in the catchment. Although basin-scale environment influenced communities throughout the 1.363 Ma, we noticed a decrease in its importance towards the present. This can be related to the ontogenetic processes of the lake, i.e. basin deepening and widening as inferred from grain sizes and quartz content ( Table 1).
The effects of the basin ontogeny (lake size), primary productivity (trophic state), local temperatures, pH and ion supply on taxon abundances were strongest in Community I (1.363e0.958 Ma, Table 2, Fig. 3), when Lake Ohrid was a relatively shallow, and a highly dynamic depositional environment with higher nutrient levels . Shallow, dynamic lakes under similar climatic boundary conditions are typically characterized by strong seasonal, annual, and multi-millennial fluctuations in water levels, and related changes in light absorption, nutrient resuspension, and release from the sediments, as well as nutrient inputs from the catchment that further control survival and growth of the phytoplankton (Nõges et al., 2007). The rapidly changing basin altered the environmental conditions that may have facilitated coexistence of taxa limited by common resources, but also has led to decreased population size and ultimately extinctions of taxa unable to adapt to such a variable environment ( Fig. 2A,  Fig. S5). This supports our previous finding that extinction has been highly selective during the initial lake phase, mainly affecting the phytoplankton . Beside the demonstrated decline in speciation and extinction rates of diatoms in Lake Ohrid upon the establishment of deeper water conditions , we show that the subsequent change of the trophic state to more oligotrophic conditions filtered out nutrient-affine species, such as C. sollevata and Pantocsekiella sp. 2 nov (Fig. S5). and caused collapse of the initial diatom community at 0.958 Ma.
Subsequent deepening of the lake became more important in shaping the taxon composition in Community II (Fig. 3). With increasing water depth, complete mixis of the lake likely reduced in both, frequency and duration. This may have affected bottom water redox conditions towards lower oxygen saturation, which in turn may have led to better organic matter preservation but also to more nutrient recycling (particularly phosphorus) from the surface sediments (Saeed et al., 2018). Such changes have influenced the relative abundances of several taxa from the genera Cyclotella, Pantocsekiella and Stephanodiscus, limited by certain nutrients in the trophogenic zone of the lake.
The CONISS cluster analysis indicated the transition to a novel community type between 0.183 Ma and the present, with an overall low influence of individual basin-scale variables. The structure of the most recent community is largely unexplained by our environmental variables (Fig. 3) and may therefore relate to some environmental variables like specific nutrients or water pH, and/or biological factors associated to evolutionary responses in taxons' life history traits (i.e. growth rates, population size stability) and/or intrinsic population dynamics related to extinction, recolonization, and dispersal limitation.

Temporal dynamics of global, regional and local-scale environmental influence
Our regression model revealed that local-scale environment was the main driver of diatom communities for the complete 1.363 Ma record (Table 2). However, time-stratifying the results from the same analysis according to the CONISS defined community shifts revealed that this overall importance varies through time. The influence of the local environment decreases over time and is only more important than the global/regional control over environment until 0.183 Ma. Effects of global and regional environment increased substantially with the establishment of deeper water conditions and remained consistent until the present (Fig. 3, Table 2).
Based on the timing of observed shifts, we interpret that such differential influence may have resulted from: i) processes associated with the lake development, and/or ii) changes in the amplitude, intensity and length of glacial-interglacial cycles that took place during the mid-late Pleistocene (1.0e0.11 Ma).
These results indicate that findings of long-term global change, particularly climate as a key regulator of biological processes in lakes (Gerten and Adrian, 2002) and main driver of community dynamics in freshwater environments (Wiens, 2016), needs a more nuanced perspective. We show that the local environment plays a substantial role in driving the temporal dynamics of freshwater communities while it become less important compared to a regional/global influence in deep lakes. Hence, our results challenge our assumption that global and regional control over environment was the main regulator of Quaternary community dynamics in Lake Ohrid and support findings that local-scale processes have profoundly influenced the structure and composition of diatom assemblages in some ancient lakes, such as Baikal and Titicaca (Colman, 1998;Fritz et al., 2012).

Conclusions
Based on the high-resolution diatom record from Lake Ohrid, distinct diatom communities with little taxon overlap existed in the lake between I: 1.363e0.958 Ma, II: 0.958e0.183 Ma, and III: 0.183e0 Ma. Our regression model shows that global and regional control over the environment related to Earth's eccentricity, ice volume and temperatures, as well as local-scale processes related to lake size, nutrient availability, water column mixing, temperature, precipitation, and local tectonics played a role in driving community dynamics during the Quaternary. We also found differential contribution of global/regional control vs. local-scale scale control on the environment over time. While the local-scale environment played a major role throughout most of the record, its effects decreased over time. The influence of global/regional change was low between 1.363 and 0.958 Ma and increased only after the lake reached deeper conditions. This finding contradicts our assumptions and previous findings that global change plays the key role in driving temporal community dynamics and sheds new light on the importance of local environment.

Author contributions
A.C. initiated the study, with E.J. and T.H. contributing to the study design. A.C. and E.J. generated the diatom data from Lake Ohrid DEEP site sediment succession in collaboration with Z.L and J.R.. A.F., H.V. and T.D. provided the paleoenvironmental data in collaboration with the SCOPSCO Science Team. A.C. and T.H. performed the data analyses. A.C. wrote the manuscript with support from E.J. and T.H., and input of all authors, T.H.D., Z.L., D.W., J.R., A.F., H.V., T.V., B.W. and F.WeC.

Data availability
Upon publication, the diatom and biogeochemical data will be available at www.pangaea.de.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.