Supplement 1. The two C codes, metacommunity.c and localcommunity.c, mentioned in the paper used in the simulation of metacommunities and local communities.
File List
localcommunity.c -- C source code
metacommunity.c -- C source codelocalcommunity.out -- compiled code
metacommunity.out -- compiled code
Description
Program metacommunity.c simulates dominance diversity curves under equilibrium between speciation and extinction by drift, using Ewens's algorithm. (See top of the program file for more details.)
Program localcommunity.c simulates community drift with immigration. (See top of the program file for more details.)
Both programs interactively ask for the input parameters. The program
localcommunity requires, in addition, data generated by the program
metacommunity.
The two programs have been tested in a variety of C compilers, therefore they should compile and run in most systems without problems. In Unix systems (including MAX OSX and Linux) the compile instruction is for metacommunity.c and localcommunity.c, respectively:
cc metacommunity.c -lm
cc localcommunity.c -lm
or
gcc metacommunity.c -lm
gcc localcommunity.c -lm
Both programs make use of the subroutine "ran2" of Press et al 1992. Numerical Recipes in C. This can be found in both listings of the programs. We strongly discourage any attempts to change the function ran2, unless the reader is familiar with the procedures to generate pseudo-random numbers.
Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. 1992. Numerical Recipes in C, Second Edition. Cambridge University Press, Cambridge, UK.