{'fraction_non_alphanumeric': 0.038422131147540985, 'fraction_numerical': 0.0, 'mean_word_length': 5.620338983050847, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A working guide to spatial mechanistic modelling in Julia

Models that can predict the dynamics of larger scale ecological processes are increasingly important in a rapidly changing world. The Julia language gives a unique opportunity to produce new, generic tools to develop spatial mechanistic models, and to simultaneously increase their performance, resolution and predictive power. Here, we describe two new Julia software packages, DynamicGrids.jl and Dispersal.jl, that facilitate the development of spatial mechanistic models that are concise, extensible and performant, with several key attributes. First, they allow arbitrary spatially and temporally heterogeneous inputs (e.g. regional climatic data to drive population dynamics). Second, they apply rules to discrete spatial grids, including: (a) single grid cells (e.g. population growth, Allee effects, land‐use change), (b) neighborhoods (e.g. local dispersal); and (c) arbitrary locations (e.g. long‐distance wind dispersal, human‐mediated dispersal). Finally, they allow interactions between multiple grids (e.g. predator–prey models, management/environmental feedbacks). Through in‐line examples, we explore how these properties can be used to develop simple and complex grid‐based mechanistic models that run on both CPUs and GPUs. We demonstrate models of population growth, wind and self‐directed dispersal and host–parasitoid dynamics. We also demonstrate the ease by which custom rules can be combined with rules provided by packages, and the potential for use in other fields and interdisciplinary research. These Julia packages provide concise, extensible and performant tools for a wide range of grid‐based spatial models in ecology and beyond. More broadly, they highlight new opportunities for ecological modelling using the Julia language, with its combination of clear syntax, extensibility from its solution to the expression problem and its performance on CPUs and GPUs.