Centre for Research into Ecological and Environmental Modelling, and School of Mathematics and Statistics University of St Andrews St Andrews Scotland