The consequences of tree disease and pre-emptive felling on functional and genetic connectivity for woodland invertebrates

Trees outside woodlands facilitate dispersal of woodland invertebrates and may buffer against fragmentation impacts. European ash ( Fraxinus excelsior ) is common outside woodlands but is threatened by the fungal disease ash dieback ( Hymenoscyphus fraxineus ). Loss of ash trees to disease or pre-emptive felling could represent a substantial loss in connectivity. We assess the impact of tree disease and the pre-emptive felling of non-woodland ash trees on dispersal and gene flow of woodland invertebrates. We use a stochastic individual-based modelling platform, RangeShifter, to explore impacts of tree loss on the spatial dynamics of ‘virtual ’ ash-reliant insects, species which depend on ash to complete their life cycle, with varying dispersal abilities and population densities. We simulate the loss of individual trees in and out of woodlands using current tree cover data from 24 real-world landscapes and estimate functional and genetic connectivity in relation to species-specific habitat-dependent movement costs and the likelihood to move in a straight line. Removal of 10% of ash trees resulted in an increase in dispersal mortality of up to 14.6%


Introduction
Trees outside of woodlands (TOWs) are increasingly recognized as key landscape features for mitigating against some of the impacts of woodland fragmentation (Gibbons et al., 2008;le Roux et al., 2018;Oliver et al., 2006).These features are presumed to increase connectivity for animal species in patchy woodland landscapes by promoting dispersal (the movement of an individual away from its place of birth to a new reproductive site) between woodland patches, defined as functional connectivity.For example, TOWs play a key role in the movement of woodland macro-moths through agricultural land (Merckx and Slade, 2014;Slade et al., 2013), and facilitate the dispersal of the invasive pine processionary moth (Thaumetopoea pityocampa) (Rossi et al., 2016a(Rossi et al., , 2016b)).Dispersal can help to increase the resilience of a species by reducing the risks associated with stochastic events and promoting recolonization after extirpation (Bailey, 2007;Johst et al., 2002;Rossi et al., 2016b).Therefore, across several animal generations, TOWs may act as steppingstones to maintain gene flow between woodlands, defined as genetic connectivity (Rossi et al., 2016b).This could help to buffer against the further fragmentation of woodland patches, which could be particularly important for species such as invertebrates having low dispersal ability and short lifespan and therefore being sensitive to small-scale changes in land cover (Saura et al., 2011).Furthermore, as well as aiding dispersal, steppingstones and corridors facilitate species interactions (e.g.plant-insect interactions), thereby helping to maintain the provision of ecosystem services (Tewksbury et al., 2002).
There is increasing concern over the loss of TOWs, particularly in landscapes where woodlands are increasingly fragmented.This loss of TOWs is partly due to an increase in tree die-off events: hotter and drier climates have increased water stress and risks associated with insects and fire (Kolb et al., 2016).The intensification of agricultural activity also strongly impacts tree seedlings in non-woodland settings, reducing opportunities for recruitment of new TOWs (Brown and Fisher, 2009).Furthermore, the number of tree diseases and their rate of spread have increased globally (Boyd et al., 2013).For example, many elm species (Ulmaceae) are vulnerable to Dutch elm disease, an ascomycete which is spread by multiple insect vectors, and American chestnut blight has led to widespread losses in the American chestnuts (Castanea dentata) (Bajeux et al., 2020;Hepting, 1974).More recently, the invasive myrtle rust (Puccinia psidii) is affecting species in the myrtle family (Myrtaceae) in Australia (Carnegie et al., 2016), and in North America, Cornus anthracose is a fungal disease that threatens dogwoods (Cornaceae) (Daughtrey and Hibben, 1994).In response to such infections, trees may be pre-emptively felled to reduce disease spread and for health and safety concerns (Barrell, 2021;Fuller et al., 2016).
European ash (Fraxinus excelsior) is threatened by the spread of the ascomycete ash dieback fungus (Hymenoscyphus fraxineus) (Hill et al., 2019;Pautasso et al., 2013;Woodward and Boa, 2013).Ash dieback was first observed in Poland in the 1990s (Baral et al., 2014).Since then, the disease spread rapidly across Europe and was first recorded in the UK in 2012, although there is now evidence it was present here in 2004 (Wylder et al., 2018).The cause of ash dieback was identified first in 2006 (Kowalski, 2006) and concluded to be the ascomycete H. fraxineus, an Asian fungus spreading effectively across long distances with the aid of windborne ascospores (Baral et al., 2014).Of most concern are the estimated 4 million ash trees along the UK road and rail network, which, if infected, may present a threat to public health and safety (The Tree Council, 2015).Their loss could represent a substantial reduction in connectivity for woodland species with relatively poor dispersal abilities.
In the UK alone, there are 953 species across a range of taxa that use ash for either food or reproduction (Mitchell et al., 2014).Of those, 239 are invertebrates, 29 of which are classed as obligate (i.e.reliant on ash to complete the life cycle) and 24 as highly associated with ash (rarely using a tree species other than ash to complete the life cycle) (Littlewood et al., 2015;Mitchell et al., 2014).Whilst some studies have considered the impact of ash dieback directly on woodland insect diversity (e.g.Littlewood et al., 2015), very little is known about the possible impacts on insect dispersal of this potential loss in connectivity (but see Henry et al., 2017).Henry et al. (2017) modelled the impact on functional connectivity (the movement of individuals between patches) of the loss of TOWs due to ash dieback and pre-emptive felling of roadside trees for a range of 'virtual' invertebrates using a spatially explicit individual-based model (IBM) (Bocedi et al., 2014a).They found that the removal of 60% of roadside trees (just 1.2% of total land cover) reduced the number of successful dispersers by 17% (Henry et al., 2017).Their research highlighted that TOWs are important for maintaining functional connectivity, and that this is influenced by species' dispersal traits.Furthermore, they illustrated that dynamic and spatially explicit models, informed by the interaction between species and habitats, are a potentially valuable tool for assessing the impacts of fine-scale tree loss on functional connectivity across multiple species.
The models of Henry et al. (2017) only estimated functional connectivity, not genetic connectivity, and the potential loss of small steppingstone patches was not considered in their model.However, functional connectivity measures may show a stronger response to tree loss; individual dispersers may not be able to move during their limited lifespan between distant woodlands, but gene flow may be maintained over several generations via the remaining steppingstones provided by TOWs between the woodlands (Brouwers et al., 2011;Slade et al., 2013).Moreover, the loss of steppingstone patches may have disproportionate impacts on woodlands that are further apart through a decline in genetic connectivity.Furthermore, the models of Henry et al. (2017) represented the loss of roadside trees only, not tree loss within woodlands.Given that woodland trees are more vulnerable to ash dieback than TOWs (Grosdidier et al., 2020), the disease might have important consequences for species persistence within woodland patches.(Brouwers et al., 2011;Slade et al., 2013).We aim to expand upon the models of Henry et al. (2017) to explore the impact of a wider range of tree loss scenarios both within and between woodlands and to focus on the roles of steppingstone patches in maintaining both genetic and functional connectivity between woodlands.
The dispersal traits of a species may contribute to its response to fragmentation (Brouwers et al., 2011;Fletcher et al., 2018;Henry et al., 2017;Jauker et al., 2009;Slade et al., 2013;Synes et al., 2020).We would expect species that live at higher densities to be more resilient to tree loss, as they are likely to produce more dispersers per generation.Furthermore, species movement, and consequently geneflow, may be strongly influenced by the characteristics of the landscape (Püttker et al., 2020) and the interaction between landscape features and dispersal traits of the species (Fletcher et al., 2018).Understanding the relative importance of species dispersal traits, landscape structure and their interaction is key to being able to predict the impact of tree loss on functional and genetic connectivity for woodland invertebrates.However, given the scale and complexities of these issues, it would be impossible to manipulate and monitor real-world ecosystems effectively to test hypotheses, especially when controls and alternative treatments would be required Therefore, IBMs can be extremely useful, as they provide the means to replicate patterns occurring at a population level through modelling individual movement, and allow us to estimate the relative contributions of individual factors and their interactive effects.Furthermore, in an IBM, sensory limitations of dispersing individuals may be represented, such that simulated dispersers will not necessarily follow the most direct route between patches.This is likely to produce more realistic representations of dispersal dynamics than methods such as least cost path or circuit theory, which are likely to give undue weight to direct paths between distant patches (Coulon et al., 2015).
We use a set of virtual ash-reliant invertebrate species to run in silico experiments to reveal the expected impacts of potential scenarios of rapid tree loss in real landscapes.The virtual species approach is increasingly used in spatial ecological modelling of the impact of rapid environmental change on species, as there are commonly limited empirical dispersal data (Henry et al., 2017;Synes et al., 2015Synes et al., , 2020)).Specifically, we address three questions: 1) What are the impacts of tree mortality due to disease and pre-emptive felling of trees on functional and genetic connectivity?2) How does tree loss impact the dispersal of species with different dispersal characteristics?3) How do species' responses vary based on landscape context?

Study landscapes
The study landscapes consisted of twenty-four 5 km X 5 km squares in the east of the UK (Fig. 1).The sample squares were selected to provide a representative range of landscapes for that region, and comprised the four quarters of the six 10 km × 10 km squares used by Henry et al. (2017).
Baseline maps were created in ArcGIS (version 10.7) using tree canopy data extracted from the National Canopy Map (NCM) for England and Wales provided by Blue Sky.The NCM provides the location, height and canopy extent of trees >3 m in height, and is created from high-resolution photography.The NCM data were converted to a 5 m × 5 m raster (approximate size of a mature ash canopy).Each cell in the raster was either a tree cell or a matrix (non-tree) cell.Tree cells within conifer plantation compartments (or within 10 m of a plantation edge) of the Forestry Commission's National Woodland Inventory (NFI; Forestry Commission, 2015) were defined as conifer tree cells (Forestry Commission., 2015).All remaining tree cells were defined as broadleaf F.A. Plenderleith et al. tree cells, and were further categorized as either roadside, isolated or woodland.Tree cells within 25 m either side of a road were classed as roadside trees.All non-roadside trees located beyond 10 m of the NFI broadleaf compartments were categorized as isolated trees (Forestry Commission., 2015).The remainder were then categorized as woodland trees.
There are currently no spatial data for the distribution of ash trees in the UK, and therefore we randomly allocated 13% of broadleaf tree cells to be ash tree cells, based on the Countryside Survey data for regional average ash abundance (Maskell et al., 2013).The final baseline map thus had six habitat types before tree mortality was implemented (Fig. 2).The random allocation of ash was repeated three times for each baseline map ('landscape replicate').
Trees were removed from the modelled landscapes to simulate tree loss due to both disease and pre-emptive felling.Tree removal was simulated in R version 4.0.0 (R Core Team, 2020) using the packages 'raster' and 'rgdal' (Bivand et al., 2019;Hijmans, 2020).This operation created a seventh habitat type 'dead ash trees' (Fig. 2).To test the impact of tree loss due to disease on the dispersal of ash-reliant insect species, we modelled nine levels of tree mortality, from zero to 80 %, increasing in intervals of 10 %.All ash trees in the landscape had an independent probability of being classed as dead.Our mortality treatments are consistent with the expected mortality rate of ash trees in woodlands that have been exposed to ash dieback of 50-75%, based on data in mainland europe (Coker et al., 2019).
We then modelled three levels of pre-emptive felling of trees along roadsides for each level of tree mortality, for a total of 25 tree removal scenarios.For each level of tree mortality, 0, 40 or 80% of dead roadside ash trees were "felled" together with "pre-emptive felling" of neighbouring ash trees within 50 m.Cells containing "felled" ash trees were converted to matrix cells.For each of the 25 tree removal scenarios we created three 'removal replicates' for each landscape replicate.
A map of suitable breeding patches was created by combining clusters of four or more tree cells surrounded by matrix cells, each including at least one live ash tree cell.For each tree removal scenario (each combination of tree mortality and pre-emptive felling), we updated the breeding patch map so that only patches that still contained live ash tree cells were classed as suitable breeding patches.

Model
The effect of tree removal on connectivity was modelled using a customised variant of the spatially explicit individual-based modelling platform, RangeShifter V2 (Bocedi et al., 2021).The RangeShifter platform simulates population dynamics using a demographic model coupled with a dispersal model that explicitly accounts for three phases of dispersal: emigration, transfer, and settlement.The transfer phase of dispersal was modelled using the stochastic movement simulator (SMS; Palmer et al., 2011), which simulates movements as a series of independent steps each impacted by habitat-dependent perceived dispersal costs, mortality risk (HM), and the ability to follow a corelated path (i.e. the tendency to maintain a consistent heading between steps -termed directional persistence -DP).The customisation allowed landscape genetics estimates to be calculated directly within each simulation from a sample of woodland patches (as described below).

Species
The model species were designed to represent a range of ash-reliant invertebrates, species classed as obligate by Mitchell et al. (2014), which rely on live ash trees to complete their life cycle.The virtual invertebrate species varied in dispersal traits and population density.We modelled actively dispersing species with a strong preference to disperse through broadleaf tree cells.Species were assumed to have sensory abilities that allow them to move towards trees within their perceptual range (Kinoshita et al., 2015;Turlure et al., 2016).Given an assumed high cost of dispersal through open fields (the landscape matrix), these species would display a strong woodland affinity, and use trees along roadsides and outside of woodlands to facilitate dispersal.The mortality risk for the virtual insect of moving through a dead ash tree cell was assumed to be the same as for live ash tree cells, as standing dead wood may still provide some shelter during dispersal (Kosiński et al., 2018).However, since dead ash trees produce no foliage, they provide less cover than live trees, and were given a higher relative cost of dispersal than live ash trees, but a lower cost of dispersal and mortality risk than matrix cells.
Individuals were simulated dispersing from the natal patch to find a suitable breeding patch and settle; male settlement was dependent on finding a female.We used a simple sexual model with non-overlapping generations.Since our virtual species represented invertebrates that require living ash trees, only live ash tree cells had a non-zero carrying  capacity (K, the number of individuals of a given a species that a single ash tree can support), and the overall carrying capacity within a breeding patch for a given species was proportional to the number of live ash tree cells within it.Carrying capacities were set high enough to allow even small breeding patches to sustain a breeding population, thereby enabling small breeding patches to act as steppingstones, and potentially enabling gene flow to occur between larger woodlands over multiple generations.
Models were parametrised using values from Henry et al. (2017), and preliminary simulations were run on our baseline landscapes to ensure that the modelled populations behaved as expected.We used a fully factorial design to vary the carrying capacity, the cost of moving through a matrix (non-tree) cell (Habitat Mortality, HM), and path autocorrelation (Directional persistence DP).All other parameters were kept constant (Table 1 and supplementary information B).

Genetics
As RangeShifter V2 allows for the simulation of genetic changes over time, we modelled gene flow between woodlands using neutral loci, which are not subject to selection.The change in distribution of allele values at a given locus over time is therefore due to gene flow, recombination (determined by the crossover probability), mutation (determined by the mutation probability and mutation standard deviation), and genetic drift (see Table 1 for full parameters).Such neutral markers therefore represent single nucleotide polymorphisms, and can be used to extract measures of genetic distance among populations (each woodland patch being treated as a population).We modelled a diploid species with one chromosome bearing 15 independent neutral loci.On model initialisation, integer allele values were derived by multiplying 100 by random draws from a zero-centred normal distribution having a standard deviation of 0.05.

Initialisation and simulation
Populations were initialised in all suitable breeding patches at half their carrying capacity.Initialisation of neutral genes was random.We ran the model under the baseline conditions (no tree removal) for years to allow the population to equilibrate.The tree removal scenario was then implemented, and the model run for a further 50 years; data from years 58 and 60 were output for subsequent analysis as described below.
Simulations were repeated twice for each set of species traits (n = 27), study landscape (n = 24), landscape replicate (n = 3), tree removal scenario (n = 25) and removal replicate (n = 3).In total we ran 291,600 simulations: 24 study landscapes and 27 species traits for the baseline conditions, as well as 8 different levels of tree mortality, each with levels of pre-emptive felling with a fully replicated factorial design.

Data analysis 2.3.1. Demographic data
For each generation and replicate, RangeShifter provides a start and end location, distance travelled, and number of steps taken for each individual.These data were used to calculate the dispersal mortality (defined as the number of dispersers that die during dispersal divided by the total number of emigrants).We defined two types of breeding patches: steppingstone patches (< 0.5 ha, i.e. < 400 non-matrix cells) and woodland patches (> 0.5 ha).Both the natal patch type and the settlement patch type were recorded.RangeShifter also provides a connectivity matrix, which provides the number of individuals moving successfully between each pair of breeding patches.These data were used to calculate the number of functionally isolated woodland patches (patches receiving no immigrants over 2 years, albeit potentially able to act as source patches).

Genetic data
To estimate landscape genetic indices we sampled a subset of woodlands.We randomly selected 15 woodland patches, termed "sample sites", for each landscape replicate (ash and removal replicate).Within each demographic replicate we discarded sample sites having fewer than five individuals.We then extracted data from a maximum of 20 individuals per retained sample site.Only model replicates having at least three retained sample sites were included in the final analysis.The program then used the sampled individuals to estimate genetic distance (estimated using Jost's D (Jost, 2008) and F ST (Weir and Cockerham, 1984)), and the pairwise geographic distance (km) between patches (calculated as the distance between the central point in each sampled patch).Raw individual-level genetic data were also extracted for a subset of simulations to cross-check genetic indices calculated in Ran-geShifter (Supplementary information C).
To test the relationship between gene flow and geographic distance, we also calculated an isolation by distance (IBD) metric separately for each landscape and demographic replicate.This was estimated from the slope of a linear regression model of genetic distance (F ST or Jost's D) against geographic distance (km).

Linear models
To estimate how much variance in summary metrics (F ST , Jost's D, IBD, dispersal mortality, and number of isolated patches) was explained by each factor of interest, we used linear models.The variance explained was estimated from the type I sum of squares.The explanatory variables included within each linear model were level of tree mortality, level of pre-emptive felling, landscape replicate, removal replicate, species traits (HM, K, DP), model replicate, year replicate (model and year) and 10 km ID (grid ID) and 5 km ID (quadrant).We also included two-way interactions between species traits, removal treatments, and landscapes.For F ST , Jost's D and IBD (F ST and Jost's D).We also ran a separate model for each study landscape to determine the relative importance of the explanatory variables within each landscape.All model outputs were analysed in R version 4.0.0 (R Core Team, 2020) using the packages 'data.table','dplyr', 'plyr' and 'broom', and plots were created with 'ggplot2' and 'ggpubr' (Dowle and Srinivasan, 2019;Kassambara, 2020;Robinson et al., 2020;Wickham, 2011Wickham, , 2016;;Wickham et al., 2020).

Functional connectivity
Tree mortality explained 15.5% of the variation in dispersal mortality and 56.2% of the variation in the number of isolated patches (Table 2).Under baseline conditions (before tree removal) 9.5% of woodland patches were isolated on average and 67% of dispersal events were unsuccessful.Tree mortality increased the proportion of isolated woodland patches, up to 69% under high tree mortality, and increased dispersal mortality to >80% at high tree mortality rates (Fig. 3).Furthermore, the tree cover of the landscape (total number of trees) had no influence on dispersal mortality but influenced the proportion of isolated patches.In general, landscapes with higher tree cover had a lower proportion of isolated woodlands (Supplementary information D).The removal of roadside trees due to pre-emptive felling also led to an increase in dispersal mortality, and an increase in isolated patches (Fig. 3), but only explained 0.7% and 0.6% of variance respectively (Table 2).
Both dispersal mortality and woodland isolation were influenced by species traits (Fig. 4).Carrying capacity explained 18.8% of the variation in isolated patches, and the interaction between carrying capacity and tree mortality explained 2.1% (Table 2).Therefore, the impact of tree mortality on patch isolation may be less pronounced in species that live at a higher density.Carrying capacity had only a small influence on dispersal mortality (Fig. 4), and explained 2.3% of the variation in successful dispersal (Table 2).
As to be expected, HM had the most substantial impact on dispersal mortality (Fig. 4), accounting for 55.2% of the variance (Table 2), but the interaction between tree mortality and HM explained only 0.2%, implying that the effect of tree mortality is not influenced by HM.HM explained only 8.3% of the variance in isolated patches (Table 2).Directional persistence had very little impact on either dispersal mortality or isolated patches (Fig. 4).The variance explained by DP and its interaction with tree mortality was <0.2% (Table 2).
The level of tree mortality influenced the distance travelled by dispersers.As the level of tree mortality increased, the dispersal mortality from both woodland and steppingstone patches increased, and there was a sharp decline in dispersers settling in or emigrating from steppingstone patches.There was also an increase in dispersal distance for woodlandto-woodland dispersers and those using steppingstone patches.At 80% tree mortality, the mean distance moved by woodland-to-woodland dispersers was 201 m compared to 178 m under baseline conditions (Fig. 5), and for those using steppingstone patches the mean distance was 125 m compared with 107 m under baseline conditions.

Genetic connectivity
On average the IBD (F ST ) estimate in baseline conditions gave a positive slope of 0.02, which means that for a 1 km increase in distance between woodlands F ST increased by 0.02.Therefore, patches that were further apart were on average more genetically distant than those closer together.Our simulations reached a maximum distance of 6 km between sampled patches.Study landscape replicate explained 35.5% and 46.9% of the variance in F ST and Jost's D respectively, and 67% and 78.3% of

Table 2
The variance in dispersal mortality (proportion of disperses that die during dispersal), proportion of isolated patches (patches receiving no immigrants in a given year), F ST , Jost's D, and the Isolation by distance (based on F ST and Jost's D) explained by each factor.Only results where variance explained is ≥0.1.variance in IBD (F ST and Jost's D respectively; Table 2, Fig. 6 and Supplementary information E).Much of this variance can be attributed to the 10 km square TL90, which had the lowest tree cover of all landscapes.Furthermore, the location of sampling sites explained <0.2% of the variance in F ST , Jost's D and IBD (F ST and Jost's D) under baseline conditions, and overall, most variance was explained by the study landscape.Therefore, we present the results for each landscape and quadrant separately (see Supplementary information F for full partitioning of variance results for each landscape).
The amount of unexplained variance in F ST and Jost's D ranged from 3 to 23% and from 9.5 to 98.6% in IBD depending on the landscape (Supplementary information F).Tree mortality explained between 36 and 57% of the variance in F ST and Jost's D. However, the amount of variance in IBD (F ST ) explained by tree mortality varied from 0 to 48.5% across the 24 study landscapes and from 0 to 29.3% for IBD (Jost's D).Both Jost's D and F ST increased with increasing levels of tree mortality, but the relationship between tree mortality and IBD was landscape dependent (Fig. 7).Furthermore, ash replicate explained between 1 and 21% of the variance in F ST and Jost's D, and 0 and 81.8% of variation in IBD (F ST and Jost's D).Therefore, the level of gene flow depended on the specific arrangement of breeding patches and individual ash trees within the landscape.
Pre-emptive felling explained up to 11% of the variance in IBD (F ST ) and up to 13.1% in IBD (Jost's D) across landscapes, but only 0-3% in F ST and Jost's D. Therefore, pre-emptive felling impacted the change in gene flow with distance (indicated by the IBD) more than the mean level of gene flow in the landscape.The interaction between tree mortality and pre-emptive felling explained up to 6.2% of variance in IBD (F ST ) and up to 5% of variance in IBD (Jost's D).Therefore, in some landscapes the removal of roadside trees influenced IBD, but the magnitude of this effect depended on the level of tree mortality.
There was less gene flow for species with lower carrying capacity, as Jost's D and F ST estimates were lower and IBD was higher (Fig. 6 and Supplementary information E).The variance in Jost's D and F ST explained by carrying capacity varied from 20 to 37%, and for IBD (Jost's D) it varied from 0.2 to 11.6% and from 0 to 30.7% for IBD (F ST ) across landscapes.In addition, the influence of tree mortality on IBD may depend on carrying capacity in some landscapes.This interaction explained up to 8.4% of variance in IBD (Jost's D) and up to 7.1% of the variance in IBD (F ST ).
Moreover, HM influenced F ST and Jost's D, accounting for up to 18% of the variance.HM also influenced IBD, accounting for up to 18.5% of variance in IBD (Jost's D) and up to 2.4% of variance in IBD (F ST ).The Fig. 6.Mean ± se (A) index of genetic distance (F ST ) and (B) Isolation by distance (based on F ST ) in relation tree mortality and pre-emptive felling for three varied species traits (Carrying capacity, Directional persistence, and Habitat mortality).For carrying capacity, the trait values correspond to low = 500, medium = 750 and high = 1000 (individuals per Ha).For Directional persistence low = 5, medium = 7 and high = 9 and for Habitat mortality (per step mortality probability) low = 0.02, medium = 0.035 and high = 0.05.For each plot the results are averaged across study landscapes and demographic replicates (n = 3888 for each point plotted).results also suggest that HM had a larger impact at 80% tree mortality (Fig. 6), but the interaction only explained 0-0.12% of variance in IBD (Jost's D) and 0-2.4% in IBD (F ST ).DP had very little influence on F ST , Jost's D or IBD (Jost's D and F ST ), and explained very little of the variation in all landscapes (Fig. 7 and Supplementary information F).

Discussion
Tree diseases result in the loss of individuals within and outside of woodlands (Boyd et al., 2013;Grosdidier et al., 2020;Barrell, 2021).For the example of ash dieback in the UK, we have shown, using IBMs, that the removal of trees due to the direct (tree mortality) and indirect (preemptive felling for health and safety concerns) consequences of the disease may be expected to reduce connectivity for ash-reliant invertebrate species.Our models predict that landscape context has the greatest impact on how species responds to tree loss.For example, the landscape with the largest mean IBD across all patches had the lowest overall tree cover.These results suggest that the effect of tree loss on IBD may be greater in landscapes where tree cover is lower, and there are fewer woodland patches.Our results also suggest that woodlands in landscapes with fewer trees are more likely to become functionally isolated (receive no immigrants) after tree loss (see Supplementary information D).However, we found no clear trend between population genetic structure or IBD and the landscape tree cover, and both the genetic differentiation and IBD were very variable between landscapes.This study highlights the potential for spatially realistic, process-based models to be used to assess the impact of tree diseases on landscape connectivity.If suitable species data were available; this approach could be extended to predict the response to tree loss for a real species of interest.For example, a similar approach was used to predict connectivity for six wetland species in response to landscape management, allowing the authors to highlight limitations in current management and provide management recommendations (Hunter-Ayad and Hassall, 2020).Ultimately, this approach to modelling can be extended to inform management options for improving connectivity following tree diseases, including the repopulation of resistant individuals of tree species, such as chestnuts and elm that have been entirely lost from landscapes.

Impacts of tree loss differ between landscapes
Our models predict that the spatial arrangement of trees in the landscape has the greatest impact on how invertebrate species respond to tree loss.As the level of tree mortality increased, there was less gene flow between woodlands.Moreover, in most landscapes, IBD also increased, which suggests that the loss of trees may lead to genetic diversification between invertebrate populations inhabiting isolated woodlands.These consequences may be greater for woodlands that are geographically further apart.However, in some landscapes, there was almost no impact of tree mortality on IBD, and in such cases the movement of individuals across several generations using steppingstone patches may be enough to maintain genetic connectivity between woodlands that are further apart.In contrast, we found in other landscapes that the IBD declined at high levels of tree mortality; here the loss of steppingstone patches (through disease and pre-emptive felling) may result in an increase in distances moved by dispersers as the distances between patches increase (Bocedi et al., 2014b), thereby increasing the rate of gene flow across the landscape.Furthermore, males may have to travel further to find a female and settle, especially under reduced carrying capacity.These results are consistent with previous studies which have shown increased dispersal distance in fragmented conditions (Bonte et al., 2003;Mennechez et al., 2003;Wang et al., 2003).However, responses may vary between species (van Houtan et al., 2007), for example fragmentation led to a decline in dispersal distance of an Australian passerine (Cooper and Walters, 2002).Nevertheless, our results indicate that tree loss may reduce species dispersal success resulting in populations that are more genetically distinct.However, the increase in dispersal distance may result in a decrease in the IBD, despite the decrease in dispersal success.
The differences between study landscapes in how IBD changes as trees are lost may be due to the location of trees and woodlands in the landscape.For example, the ash allocation replicates explained up to 21% of variation in genetic differentiation and up to 61% in IBD.This suggests that for invertebrates reliant on ash to complete their life-cycle, the specific location of these trees in a landscape is important.Previous results support this conclusion in other study systems; for example, trees outside forests are the main source of landscape connectivity for the pine processionary moth (Rossi et al., 2016b).Furthermore, steppingstones and corridors are likely to be more effective when the distance between them is less than the maximum dispersal distance of the species (Brouwers and Newton, 2010).Therefore, tree loss may have a smaller impact in landscapes where woodlands are closer together; however, this will depend on the species dispersal traits (Brouwers and Newton, 2010;Fletcher et al., 2018;Slade et al., 2013).Furthermore, the species response may depend on the amount of available suitable habitat; here the landscape with the largest IBD had the lowest overall tree cover.This suggests that the effect of tree loss on IBD may be greater in landscapes where tree cover is already lower, and woodlands in landscapes with fewer trees may be more likely to become functionally isolated (receive no immigrants).However, more research is needed, as we found no clear relationship between IBD and landscape tree cover.

Influence of species dispersal traits on how tree loss impacts dispersal
The factor with the greatest impact on functional connectivity was dispersal cost, implemented as mortality risk in our models, which led to more patches becoming isolated.This could be because woodland specialists are reliant on habitat corridors and steppingstones, particularly those that are poorer dispersers (Bailey, 2007).Previous modelling studies also found that species that experience a higher cost during dispersal may be more sensitive to fragmentation (Henry et al., 2017;Jauker et al., 2009;Saura et al., 2011;Synes et al., 2020).In addition, when the matrix is better quality (associated with a lower cost of dispersal) steppingstone patches may be more effective (Baum et al., 2004).However, we found that the consequences for gene flow are complex.There is less geneflow between woodlands for species that experience a high cost.Therefore, the loss of steppingstones may have larger impacts on poorer dispersers.However, the species that experience low costs during dispersal had a high IBD.This suggests that for these species tree loss may have the greatest impact on gene flow when woodlands are further apart.
We found that species with low carrying capacities had more isolated local populations, and were more vulnerable to the effects of tree loss.Similarly, rare forest specialists are more adversely affected by forest fragmentation (Henry et al., 2017;Newmark, 1991).These small, isolated populations may also be vulnerable to the negative impacts of genetic drift and inbreeding (Reynolds et al., 1999;Sacchei et al., 1998).The effects of isolation may result in an increased extinction risk for populations experiencing a lower carrying capacity (Baguette et al., 2013;Fagan and Holmes, 2006;Hanski, 1998).
The ability of a virtual species to follow a correlated path (directional persistence) had almost no impact on the results.This is probably because the cost of movement through a matrix cell was high compared to the cost of moving within a tree cell, and therefore individual paths were more heavily influenced by the presence of a tree cell within an individual's perceptual range than by a tendency to follow a straight trajectory, which is what we would expect for species with high woodland affinity (Brouwers et al., 2011;Brouwers and Newton, 2010;Merckx et al., 2009;Slade et al., 2013).However, we recognise that for species which might not experience so high a contrast between open and woodland habitats then their trajectories might be responsive to directional persistence.

Impacts of tree disease and pre-emptive felling on functional and genetic connectivity
Compared to the equivalent pre-emptive felling at low levels of mortality, felling of trees at higher levels of tree mortality led to a larger reduction in dispersal success and further reduced the proportion of isolated woodlands across landscapes.This suggests that, at lower levels of tree mortality, the remaining trees facilitate the dispersal of individuals through the matrix, and this can buffer against tree loss due to pre-emptive felling to some extent (Henry et al., 2017).Beyond a threshold, the loss of a just a few trees may have disproportionate impacts on connectivity; previous studies have predicted this threshold to be at 70-80% habitat loss, which is consistent with our results (Fletcher et al., 2018;Swift and Hannon, 2010).Therefore, the consequences of tree loss on connectivity may in part depend on the rate at which tree loss is occurring.In our models we simulated simplified tree disease dynamics; dead trees had no carrying capacity but were associated with a low cost of dispersal.However, trees in different locations in the landscape and of different ages vary in their susceptibility and response to infection (Coker et al., 2019;Grosdidier et al., 2020).Furthermore, local conditions may influence susceptibility to disease; for example, ash trees in humid and fertile areas are more vulnerable to ash dieback, and infected trees are vulnerable to further attack by root rot pathogens in the genus Armillaria (Chumanová et al., 2019;Enderle et al., 2013;Madsen et al., 2021).To make future modelling exercises more realistic, spatial epidemiological patterns could be incorporated when designating diseased trees in order to represent more realistic spatial clustering of disease outbreaks.
Nevertheless, our models indicate that pre-emptive felling may further reduce connectivity at high levels of tree loss.In the UK, preemptive felling is discouraged, as some ash trees may have genetic tolerance to ash dieback; trees should only be felled if they represent a risk to health and safety (Forestry Commission, 2021;The Tree Council, 2019).From an ecological point of view, this advice may also be beneficial for connectivity.
The genetic structure of an invertebrate population is likely to be influenced by historic barriers to gene flow (Vanhala et al., 2014;Watts et al., 2016).Our simulations allowed 10 years for the genetics to reach an equilibrium before modelling gene flow, and therefore we focus on the impacts of recent fragmentation only.If populations had already been through genetic bottlenecks due to historic barriers, then the impacts to gene flow could have been underestimated.In addition, the selection pressure caused by habitat fragmentation can reduce the likelihood of an individual to disperse due to increasing dispersal cost (Bonte et al., 2012;Fountain et al., 2016) or result in selection on traits associated with better dispersal ability (Schtickzelle et al., 2006).Consequently, the management response to tree disease (e.g.preemptive felling) may have evolutionary as well as ecological impact on woodland invertebrates.Modelling heritable dispersal traits would allow exploration of the extent to which evolution of dispersal traits provides buffering against woodland fragmentation.
In this study we focussed on the impacts of tree loss on connectivity.However, our models could be usefully extended to explore potential intervention options to maximise the benefits of tree planting to increase connectivity (Synes et al., 2020).For species such as ash, the models could focus on how to improve connectivity by determining the optimal location for planting and promoting regeneration of alternative species (Mitchell et al., 2014).For tree species that have been totally lost from the landscape (e.g., N American chestnuts), but for which resistant variants are now being developed (Steiner et al., 2017;Westbrook et al., 2020), we could use models to inform how best to reintroduce individuals such that they form functionally connected networks for species that utilise them.Furthermore, this approach could be applied to explore whether planted and existing trees are functionally connected in order to ensure that gene flow is maintained, as obtaining such information empirically on a large-scale for fragmented tree populations can be difficult (Bacles and Ennos, 2008).

Conclusion
We have shown that the impact of tree loss on functional and genetic connectivity is complex, depending on interactions between species traits and landscape structure.This makes it difficult to generalize about the impacts of ash dieback on connectivity for invertebrates on a landscape scale.Nevertheless, in our models the spatial arrangement of woodland patches and the locations of non-woodland ash trees within the landscape explained the most variation in connectivity.This suggests that future studies aiming to predict the impact of tree disease should explicitly represent the focal landscape.Furthermore, the influence of differences in carrying capacity and the costs experienced when dispersing makes some species more vulnerable to tree loss both within and outside of woodlands.Overall, we demonstrate that individualbased models are useful for exploring dynamics and forming hypotheses regarding real-world patterns.If models can incorporate data for real species, they have the potential to provide insights into how a given species is likely to respond to losses in connectivity.These models could be extended to incorporate evolutionary processes, and, if combined with landscape epidemiology models of tree disease, could provide a powerful tool for investigating the impacts of tree diseases on connectivity for a variety of species.

Fig. 2 .
Fig. 2. Example map showing the seven habitat types present within a landscape.Contains, or is based on, information supplied by the Forestry Commission.© Crown copyright and database right [2015] Ordnance Survey [100021242].

Fig. 3 .Fig. 4 .
Fig. 3. Mean ± se of dispersal mortality shown with red lines (proportion of dispersers that die during dispersal) and proportion of isolated woodlands shown with green lines (woodlands receiving no immigrants in a given year) in relation to tree mortality and pre-emptive felling.For each plot the results are averaged across demographic replicates, species, and landscape (n = 11,664 for each point plotted).(For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 5 .
Fig. 5. Mean ± se (A) number of dispersers and (B) distance travelled (m) by successful dispersers (individuals that disperse and reach a suitable natal patch) in relation to tree mortality and pre-emptive felling.Movements involving a steppingstone patch (so steppingstone to woodland or woodland to steppingstone) are shown in brown and woodland to woodland movements in green.For each plot the results are averaged across study landscapes and demographic replicates(n = 11,664 for each point plotted).

Fig. 7 .
Fig. 7. Mean ± se index of genetic distance (F ST ; left column) and Isolation by distance (based on F ST ; right column) in relation to level of tree morality and by individual landscape (10 km square code shown in panel heading; colours illustrate quadrants).The results are averaged across demographic replicates and species.Note that the y-axis scale differs for square TL90 (top panels).For each plot the results are averaged across demographic replicates (n = 4086 for each point plotted).

Funding
FAP was funded by the Macaulay Development Trust and the Woodland Trust.RJM and JAS were supported by the Scottish Government's Rural and Environment Research and Analysis Directorate 2016-2021 strategic research programme.Development by SCFP of the landscape genetics capability in the customised version of RangeShifter was funded by programme Blanc of l'Agence nationale de la recherche.JMJT was supported by NERC grant NE/T006935/1 'Wildlife Corridors: Do they work and who benefits?'

Table 1
Parameters used in RangeShiftervaried parameters are in italics.