Appendix 1 for : Dispersal Evolution in Currents : spatial sorting promotes philopatry in upstream patches

Substantial literature is devoted to understanding dispersal evolution, but we lack theory on how dispersal evolves when populations inhabit currents. Such theory is required for understanding connectivity in freshwater and marine environments; moreover, many animals, fungi and plants rely on wind-based dispersal, but the effects of currents on dispersal evolution in these organisms is unknown. We develop an individual-based model for evolution of dispersal probability along a linear environment with a unidirectional current. Even a slight current substantially reduces overall emigration probability compared to no current. Under stronger currents, emigration can be drastically reduced, especially in the upstream patches. When introducing rare long-distance dispersal that is not subject to the current, higher emigration probabilities evolve and the spatial variability in emigration propensity along the stream is reduced. Our results provide an alternative solution to the long debated ‘drift paradox’ concerning the loss of individuals from upstream populations due to advective forces. A combination of natural selection and spatial sorting generates and maintains downstream gradients in dispersal propensity, where individuals from upstream populations tend to be substantially more philopatric. This is likely to have major implications for ecological and genetic connectivity that will impact effective management strategies for populations inhabiting currents. evolving upstream, but higher probabilities evolving downstream. The difference in emigration probability between mutation probabilities decreases as current strength increases. At high current values ( ρ ), dispersal costs have little to no effect on mean emigration probabilities anywhere along the landscape. Results are reported at the end of 1000 generations (except in the case of μ = 0.001, where 20 000 generations were needed) and are means of 100 replicates. Initial emigration probability d = 0.1, long distance dispersal probability ω = 0. The steep increase in mean emigration probability in patch 40 results from reflective boundary conditions causing more dispersive genotypes to accumulate in the last patch.

Overall mean emigration probability decreases as K is increased (from ~1/2K to 2K) but does not change when λ is increased.
Adjusting the intrinsic rate of population increase λ and the local equilibrium density or carrying capacity K can often affect evolving emigration probabilities, especially in the presence of density dependence. In Fig. A1, we investigated the effects of varying these parameters on the results obtained under the baseline parameters reported in the main text (λ=2, K=50). Aside from an overall decrease in mean emigration rate when K is increased, very little difference is seen. Positive downstream gradients are still present and the decrease in effect with increasing current strength is also apparent. Both parameters are included in the population dynamics equation used to model number of offspring in our study, introducing density dependence in the reproductive phase.
Increasing K simultaneously reduces the strength of kin competition and reduced demographic stochasticity, both alleviating selection for higher emigration probability (Travis & Dytham 1998;Cadet et al. 2003). Figure A2: Varying the initial emigration probability d has little to no effect on mean resulting emigration probabilities, regardless of current strength ρ. The only effect that is seen is that at intermediate current strengths, increasing d increases variability around the mean. All other parameters were kept at baseline levels: µ=0.01, c=0.01, LDD=0.

Effect of initial emigration probability
We varied initial emigration probabilities d is to test whether starting conditions affect the results. Varying initial d did affect the resulting emigration probabilities and did not change the resulting positive downstream gradient (Fig. A2). We can therefore be confident that initial conditions in d, as well as λ and K (Fig. A1) do not affect conclusions drawn on the evolutionary impacts of increasing current strengths. While changing boundary conditions affected mean emigration rates at the edges of the stream system, it did not affect the overall trends observed within the stream (Fig. A3). In the baseline experiment, we used reflective boundaries to simulate a closed system, where individuals are not able to "leave". Absorbing upstream and downstream boundaries might represent a section of a stream system where no movement barrier exists for individuals, and mixed boundaries (reflective upstream, absorbing downstream) might represent a stream from source to sea, for example.

Effects of boundary conditions
Sharp declines in mean emigration rates at the edges of the model landscape at absorbing boundaries ( Fig. A3) represent loss of more dispersive individuals. as the key results of positive downstream gradients in emigration probabilities, and the relative effects of increasing current strength on the mean emigration probability remains, even under absorbing and mixed boundary conditions, indicating that conclusions drawn on these observations are not boundary dependent. In upstream patches, an overwhelming majority of genotypes have 0 values, regardless of boundary conditions (Fig. A4) which is consistent with what is found with reflective boundaries (Fig.  3). Likewise, midstream patches experience similar genotypic variation under mixed and absorbing boundaries as with reflective boundaries: wide distributions that narrow and shift towards zero as current strength increases.

Genotypic Variation under different boundary conditions
It is the downstream patches where boundary conditions seem to affect genotype distributions. With absorbing boundaries, the frequency of philopatric individuals increases, presumably because individuals with non-zero genotypes are lost from the system. A high frequency of philopatric genotypes is evident under all current strengths, but is higher at intermediate strengths, e.g. ρ=0.6. The shift of the genotype distribution towards zero under strong currents is less obvious when boundaries are absorbing, with highest frequency genotypes remaining comparable with weaker currents.

Figure A5: The proportion of individuals with genotype d = 0 shows a negative downstream gradient and is highly influenced by current strength ρ. At high current strengths, this proportion nears 1 in the upstream patches. Results are mean proportions across 100 replicates of populations at the end of 1000 generations. All parameters were set to baseline values.
In the upstream patches, the proportion of locally recruiting individuals that exhibit an emigration probability of 0 is highly affected by current strength (Fig. A5). This proportion is close to zero when current strength is 0.5 and increases to almost 1 when it is >0.8. The first ten patches experience this effect most strongly, while the rest of the stream levels out, though the effect of current strength is still seen slightly. This decrease is especially steep in the first few patches. Introduction of LDD events changes the spatial pattern observed in baseline experiments (Fig. A6). The positive downstream gradient in emigration probability that is maintained under all other experiments disappears in midstream patches, where the gradient start flattening. This is likely due to the increased mixing of genotypes that increased LDD rate produces. Additionally, the mean emigration probability in upstream patches increases with increased LDD, even at high current strengths, while downstream patches have little to no observable response. This location-specific response to LDD produces the flattening of the dispersal gradient that can be seen in Fig. 5 in the main paper. Incorporation of any long-distance dispersal increases the genotypic variation in upstream patches under all current strengths >0.5 (Fig. A7). The genotype distribution of the upstream patches with no LDD is very narrow, with only a few individuals having nonzero genotypes. However, when even a low LDD probability is included, such as 0.006, this genotypic variation increases. Though still in low numbers, this accounts for the increase in mean emigration rate in upstream patches seen in Figure 5 in the main paper. Similarly, the genotypic variation in midstream patches also increases, bringing the highest emigration probability from just under 0.4 to 0.58 when LDD=0.02. This reflects the substantial increase in mean emigration probability seen in Figure 5 in the main paper. While there is noise around the mean population size per patch, there is no discernible spatial pattern along the stream, regardless of current strength (Fig. A8). The positive downstream gradient in mean emigration rate seen in Fig. 2 of the main paper can therefore be considered to be independent of population size. The sharp increase at Patch 40 reflects the increase in mean emigration rate in that location and is due to reflective boundary conditions. The possible origins of genotypes reaching a patch is directly affected by current strength as genotypes travel further under stronger currents (Fig. A9). This means that, under stronger currents, genotypes with a non-zero but lower value for emigration probability can reach further downstream faster, overall reducing the accumulation of mutations for increased emigration and thus the population mean genotype. Note also that mutations originating in upstream patches are more likely to persist, potentially due to simpler competitive landscapes (lower diversity of immigrating genotypes there).