# MEPS 377:13-17 Supplementary appendix

**Pringle JM, Lutscher F, Glick E**

Going against the flow: effects of non-Gaussian dispersal kernels and reproduction over multiple generations

MEPS 377:13-17 | Full text in pdf format

The following Python code calculates the critical value of N which allows retention of a population as a function of *L*_{adv}, the mean downstream distance the larvae are transported, for a given dispersal kernel *K*. It should run for version 2.5 or greater of Python. The program calculates the critical value of *N* using Eq. (1), which is only valid for Gaussian dispersal kernels, Eq. (2), which contains an approximate correction for the excess kurtosis of the dispersal kernel, and by numerically solving Eq. (11), which provides an exact solution for the critical value. The code below allows the use of an arbitrary kernel; as printed, it uses a Gaussian kernel, so that all 3 estimates should be identical. Before this code is adapted to any other kernel, it should be run as printed to insure that this is so, allowing one to test that the code and the routines it calls have been properly installed on the computer being used

Python code (.zip, 8KB)