Supplement 1: Numerical algorithms for comparison of full model and scaling approximation.
Ecological Archives M069-004-S1.
Sean R. Connolly and Joan Roughgarden
Department of Biological Sciences
Stanford, CA 94305.
For all correspondence:
Sean R. Connolly
Department of Geosciences
University of Arizona
Tucson, AZ 85721
These files (with .m extensions) are ASCII text files containing the numerical algorithms used to plot Figs. 1 and 6 and are referenced in the corresponding figure legends. These algorithms are written as MATLAB scripts. The MATLAB scripts are provided simply for convenience: anyone with access to MATLAB can avoid the trouble of coding the algorithms from scratch by copying, running, and modifying the scripts. The descriptions provided in the legends of Figs. 1 and 6 are sufficient for recreating the algorithms in other languages (e.g., C). The notation used is similar to that used by Noye (1984). Thus, even those without a working knowledge of MATLAB should be able to work through the scripts, using this chapter as a guide (provided that they have some programming background).
For both competition and predator-prey models, we used a forward-time, centered-space control-volume scheme for the larval dynamics, and a forward-time scheme for the benthic dynamics. Larval and adult dynamics were stepped in alternation; that is, we stepped the adult dynamics using larval and adult abundances from the previous time step, then used the new adult abundances and the previous larval abundances to step the larval dynamics. Full control volumes (rather than half-volumes) abut the coastal and frontal boundaries. Larval dynamics were stepped using the Thomas Algorithm (Noye 1984). For comparison, we used a forward-time scheme to model the benthic dynamics of the scaling approximation. This insured that differences between the trajectories of the two models would not be artifacts of differing numerical methods.
The algorithms were written as MATLAB (1994) scripts. Their execution requires both core MATLAB software and the Symbolic Toolkit. The scripts fvccomp.m (for the competition model) and fvcpp.m (for the predator-prey model) are the "master" scripts; that is, these are the scripts that should be invoked from the command line. In turn, fvccomp.m invokes the scripts fvvars.m and fvcvecs.m, while fvcpp.m invokes fvvarspp.m and fvcvecspp.m. Our notation in these scripts follows that of Noye (1984) (i.e. our Ai(j) corresponds to his aj, our Betai(j) corresponds to his bj; the index i signifies the species to which the vector corresponds).
MATLAB. 1994. MATLAB version 4.2c. The Math Works, Natick, Massachusetts, USA.
Noye, J. 1984. Finite difference techniques for partial differential equations. Pages 95--354 in J. Noye, editor. Computational techniques for differential equations. North-Holland, Amsterdam, The Netherlands.
ESA Publications | Ecological Archives | Permissions | Citation | Contacts