<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" dtd-version="3.0">
  <front>
    <journal-meta>
<journal-id journal-id-type="publisher">GMD</journal-id>
<journal-title-group>
<journal-title>Geoscientific Model Development</journal-title>
<abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title>
<abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
</journal-title-group>
<issn pub-type="epub">1991-9603</issn>
<publisher><publisher-name>Copernicus Publications</publisher-name>
<publisher-loc>Göttingen, Germany</publisher-loc>
</publisher>
</journal-meta>

    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-9-823-2016</article-id><title-group><article-title>CellLab-CTS 2015: continuous-time stochastic cellular automaton modeling using Landlab</article-title>
      </title-group><?xmltex \runningtitle{Landlab cellular automata}?><?xmltex \runningauthor{G.~E.~Tucker et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff2">
          <name><surname>Tucker</surname><given-names>Gregory E.</given-names></name>
          <email>gtucker@colorado.edu</email>
        <ext-link>https://orcid.org/0000-0003-0364-5800</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2">
          <name><surname>Hobley</surname><given-names>Daniel E. J.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-2371-0534</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Hutton</surname><given-names>Eric</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>Gasparini</surname><given-names>Nicole M.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff5">
          <name><surname>Istanbulluoglu</surname><given-names>Erkan</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>Adams</surname><given-names>Jordan M.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-0137-9879</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff5">
          <name><surname>Nudurupati</surname><given-names>Sai Siddartha</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-2090-7561</ext-link></contrib>
        <aff id="aff1"><label>1</label><institution>Cooperative Institute for Research in Environmental Sciences (CIRES), University of Colorado, Boulder, USA</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Department of Geological Sciences, University of Colorado, Boulder, USA</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Community Surface Dynamics Modeling System (CSDMS), University of Colorado, Boulder, USA</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>Department of Earth and Environmental Sciences, Tulane University, New Orleans, USA</institution>
        </aff>
        <aff id="aff5"><label>5</label><institution>Department of Civil and Environmental Engineering, University of Washington, Seattle, USA</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Gregory E. Tucker (gtucker@colorado.edu)</corresp></author-notes><pub-date><day>29</day><month>February</month><year>2016</year></pub-date>
      
      <volume>9</volume>
      <issue>2</issue>
      <fpage>823</fpage><lpage>839</lpage>
      <history>
        <date date-type="received"><day>11</day><month>September</month><year>2015</year></date>
           <date date-type="rev-request"><day>2</day><month>November</month><year>2015</year></date>
           <date date-type="rev-recd"><day>31</day><month>January</month><year>2016</year></date>
           <date date-type="accepted"><day>10</day><month>February</month><year>2016</year></date>
      </history>
      <permissions>
<license license-type="open-access">
<license-p>This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</ext-link></license-p>
</license>
</permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016.html">This article is available from https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016.html</self-uri>
<self-uri xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016.pdf</self-uri>


      <abstract>
    <p>CellLab-CTS 2015 is a Python-language software library for creating
two-dimensional, continuous-time stochastic (CTS) cellular automaton models.
The model domain consists of a set of grid nodes, with each node assigned an
integer state code that represents its condition or composition. Adjacent
pairs of nodes may undergo transitions to different states, according to a
user-defined average transition rate. A model is created by writing a Python
code that defines the possible states, the transitions, and the rates of
those transitions. The code instantiates, initializes, and runs one of four
object classes that represent different types of CTS models. CellLab-CTS
provides the option of using either square or hexagonal grid cells. The
software provides the ability to treat particular grid-node states as moving
particles, and to track their position over time. Grid nodes may also be
assigned user-defined properties, which the user can update after each
transition through the use of a callback function. As a component of the
Landlab modeling framework, CellLab-CTS models take advantage of a suite of
Landlab's tools and capabilities, such as support for standardized input and
output.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <title>Introduction</title>
      <p>The discovery of cellular automata in the 1940s <xref ref-type="bibr" rid="bib1.bibx57" id="paren.1"/>
laid the groundwork for a type of computational model that distinctly differs
from numerical solutions to partial-differential equations (PDEs). For
certain types of geoscientific problems, cellular automaton (CA) models and
their relatives offer several advantages over numerical solutions to PDEs. In
place of the continuum approximation, CA models operate on a discrete
lattice, which makes them useful for natural systems that have an
identifiable characteristic spatial scale. Unlike a numerical approximation,
the solution to a deterministic CA is exact. In some cases, CA models are
quite computationally efficient. Partly for this reason, cellular automaton
techniques are sometimes used to implement <italic>reduced complexity</italic> models,
which deliberately omit aspects of the physics of a system in an attempt to
identify the essential underlying principles. Perhaps most important for
geoscience applications, CA models are well-suited to systems with complex
boundaries and interfaces that involve contact between different types of
media. These properties have made CA-based approaches attractive for modeling
a range of geophysical systems; some examples include the dynamics of the
core-mantle boundary <xref ref-type="bibr" rid="bib1.bibx44" id="paren.2"/>, eolian bedforms
<xref ref-type="bibr" rid="bib1.bibx2 bib1.bibx3 bib1.bibx58 bib1.bibx45 bib1.bibx60 bib1.bibx61" id="paren.3"/>, hillslope
morphology and evolution
<xref ref-type="bibr" rid="bib1.bibx30 bib1.bibx56" id="paren.4"/>, river channels
<xref ref-type="bibr" rid="bib1.bibx43 bib1.bibx46 bib1.bibx13 bib1.bibx29" id="paren.5"/>,
coastlines <xref ref-type="bibr" rid="bib1.bibx4 bib1.bibx17" id="paren.6"/>, drainage basins
and networks
<xref ref-type="bibr" rid="bib1.bibx9 bib1.bibx14 bib1.bibx15 bib1.bibx16" id="paren.7"/>,
ecohydrology <xref ref-type="bibr" rid="bib1.bibx62 bib1.bibx8" id="paren.8"/>, and permafrost
features <xref ref-type="bibr" rid="bib1.bibx35 bib1.bibx52" id="paren.9"/>.</p>
      <p>One interesting variant on CA is the continuous-time stochastic CA, in which
cell transitions occur at randomly chosen time intervals rather than in
discrete steps. These models are especially attractive for geoscience
applications because their parameters represent rates that can be directly
related to field and laboratory measurements, and because they avoid the need
for a discrete-time approximation
<xref ref-type="bibr" rid="bib1.bibx44 bib1.bibx45 bib1.bibx55" id="paren.10"/>. For example, once
appropriate length and timescales have been chosen, the cell-transition
rules take on meaningful dimensions and can be compared to an average
propagation rate of a reaction front, the average frequency and depth of soil
disturbance by burrowing organisms, or any other quantity of interest that
has a definable rate.</p>
      <p>Here we describe a new modeling framework called CellLab-CTS, which is
written in Python and built on the Landlab platform
<xref ref-type="bibr" rid="bib1.bibx38" id="paren.11"/>. CellLab-CTS allows one to quickly build and
explore two-dimensional, continuous-time stochastic CA models. A novel
feature is the option of using either square or hexagonal cells. The aim of
CellLab-CTS is to greatly simplify the process of creating, configuring, and
exploring 2-D CA models. We provide a brief background on the theoretical
framework, describe the algorithms and data structures used to implement
CellLab-CTS, and present several examples that illustrate its versatility.</p>
</sec>
<sec id="Ch1.S2">
  <title>Background</title>
      <p><xref ref-type="bibr" rid="bib1.bibx59" id="text.12"/> defines cellular automata as “simple
mathematical idealizations of natural systems [that] consist of a lattice of
discrete identical sites, each site taking on a finite set of...values.”
Like other types of mathematical model, CA models describe natural systems in
the form of symbolic logic <xref ref-type="bibr" rid="bib1.bibx11" id="paren.13"/>. They are similar to
partial differential equations in the sense that both can be written in
compact form; in the case of a CA, however, the compact form is a set of
algorithms (<italic>rules</italic>) that evolve the numerical value of cell states or
change cell attributes based on interactions among cells. In both cases, the
compact form itself (the equation or the algorithm) often reveals little
about the dynamics of the system and its potential spatial outcomes and
self-organization. To discover and visualize the system's behavior, one needs
to perform numerical calculations. These calculations are often more
computationally efficient, involving fewer parameters or degrees of freedom,
than in the case of numerical solutions of comparable PDEs. The need for
numerical calculations applies especially for complex physical systems that
are computationally irreducible, such that the physical state of the system
at a certain time can only be predicted by simulating the evolution of states
through time. <?xmltex \hack{\newpage}?></p>
      <p>In a classical CA, the cell values evolve over a sequence of discrete time
steps on the basis of a set of deterministic rules that describe the nature
of the system <xref ref-type="bibr" rid="bib1.bibx11" id="paren.14"><named-content content-type="pre">e.g.,</named-content></xref>. These rules describe
sequential transitions in the state of each cell as a function of the other
cells in its immediate neighborhood. Since cellular automata were first invented in the
late 1940s, many variations on this basic concept have been developed and
explored. For example, some use continuous (real) numbers instead of discrete
lattice states (as in the example of lattice Boltzmann models; e.g.,
<xref ref-type="bibr" rid="bib1.bibx10" id="altparen.15"/>). The class of <italic>stochastic cellular automata</italic> use random rather than deterministic rules for updating, which
allows one to explore ensembles of outcomes.</p>
      <p>Of particular interest here are <italic>continuous-time stochastic</italic> (CTS)
cellular automaton models: those in which transitions between discrete cell
states occur at random time intervals. This technique was introduced into the
geosciences by <xref ref-type="bibr" rid="bib1.bibx44" id="text.16"/> in an application to the dynamics of
the core-mantle boundary. The same approach was later used (in 3-D instead of
2-D) to study the growth of instabilities that leads to the formation of
eolian bedforms <xref ref-type="bibr" rid="bib1.bibx45" id="paren.17"/>. In the next section, we describe
the theory behind the CTS approach; the following sections describe how the
concept is implemented in CellLab-CTS.</p>
</sec>
<sec id="Ch1.S3">
  <title>Cellular automata with stochastic, pairwise transitions</title>
      <p>CellLab-CTS implements a two-dimensional, continuous-time stochastic cellular
automaton with pairwise transitions <xref ref-type="bibr" rid="bib1.bibx44" id="paren.18"/>. As a simple
example, consider a model for the mixing of suspended-sediment particles in a
turbulent fluid with isotropic turbulence. As in a classical CA, the domain
of interest is represented as a lattice of cells, each of which belongs to
one of <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> discrete states. For suspended sediment, we have two states: a
cell may be occupied by fluid, or by a sediment grain. The width of each cell
is taken to be the characteristic diameter of a sediment grain. The lattice
represents a vertical cross section through the fluid. Such a model might be
initialized with a bed of sediment particles below a body of (initially)
still fluid (Fig. <xref ref-type="fig" rid="Ch1.F1"/>).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><caption><p>CellLab-CTS model of grains suspended in a stirred (turbulent)
fluid. Left: illustration of cell states, cell-pair states, and cell-pair
transitions. Grains are assumed to be neutrally buoyant, and turbulence is
isotropic, so that there is an equal probability of grain motion in each
direction. Grain motion is modeled as a transition that switches the position
of grain and fluid at a user-specified rate. In this example, we assume that
the grains are 1 mm diameter tea leaves and the characteristic turbulent
velocity fluctuation is 0.01 m s<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, so that cell size
<inline-formula><mml:math display="inline"><mml:mrow><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>=</mml:mo><mml:mn>0.001</mml:mn></mml:mrow></mml:math></inline-formula> m and the mean transition rate is 10 cells s<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>.</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f01.pdf"/>

      </fig>

      <p>The essence of the procedure is that for each pair (or “doublet”;
<xref ref-type="bibr" rid="bib1.bibx44" id="altparen.19"/>) of adjacent cells, there is a certain probability
that during a small interval of time d<inline-formula><mml:math display="inline"><mml:mi>t</mml:mi></mml:math></inline-formula>, the states of one or both cells
will change. For example, in a suspended-particle model, when a sediment cell
lies adjacent to a fluid cell, there is a certain probability that a
turbulent eddy will cause the grain to move into the fluid cell, while its
previous location is replaced by fluid. In other words, the grain and fluid
switch places. Using the Poisson process theory, we can describe each
pairwise transition with a time-independent stationary Poisson process. The
probability distribution of time to the next transition at a particular pair
is<?xmltex \hack{\newpage}?>
          <disp-formula id="Ch1.E1" content-type="numbered"><mml:math display="block"><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">τ</mml:mi><mml:mo>)</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>=</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>R</mml:mi><mml:mi>T</mml:mi></mml:msub><mml:mi>exp⁡</mml:mi><mml:mfenced close=")" open="("><mml:mo>-</mml:mo><mml:msub><mml:mi>R</mml:mi><mml:mi>T</mml:mi></mml:msub><mml:mi mathvariant="italic">τ</mml:mi></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where <inline-formula><mml:math display="inline"><mml:mi mathvariant="italic">τ</mml:mi></mml:math></inline-formula> is the time between transitions at a particular pair, and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mi>T</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>
is the average transition rate for a particular transition type (with
dimensions of <inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:math></inline-formula>). The reciprocal of the transition rate,
<inline-formula><mml:math display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="italic">τ</mml:mi><mml:mo mathvariant="normal">¯</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:msub><mml:mi>R</mml:mi><mml:mi>T</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, is the average waiting time between transitions of that
type. Once the cell size, <inline-formula><mml:math display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula>, is specified, one obtains a mean
transition velocity: <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>V</mml:mi><mml:mi>T</mml:mi></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/></mml:mrow></mml:math></inline-formula>=<inline-formula><mml:math display="inline"><mml:mrow><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>/</mml:mo><mml:mover accent="true"><mml:mi mathvariant="italic">τ</mml:mi><mml:mo mathvariant="normal">¯</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>.</p>
      <p>The transition probability or rate depends on the states of the two cells. We
will refer to a particular pairing of cell types as the <italic>pair state</italic>.
The number of pair states depends on the number of cell states, and on
whether spatial orientation matters. For example, if our turbulence is
isotropic and the particles are neutrally buoyant, the transition probability
for a fluid-plus-particle pair would be independent of orientation. In that
case, there are <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>(</mml:mo><mml:mi>N</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> unique pair states: fluid–fluid, fluid–grain,
and grain–grain (Fig. <xref ref-type="fig" rid="Ch1.F1"/>). On the other hand, if the particles
are denser than the fluid, orientation matters because the downward
transition rate will be greater than the upward or lateral rates
(Fig. <xref ref-type="fig" rid="Ch1.F2"/>). When direction matters, we have <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>M</mml:mi><mml:msup><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> cell-pair
states, where <inline-formula><mml:math display="inline"><mml:mi>M</mml:mi></mml:math></inline-formula> is the number of orientations: two for a raster grid
(vertical and horizontal), and three for a trigonal lattice with hexagonal cells.
In the suspended-sediment example, <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>; a square grid implies <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>M</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>, so
that there are eight cell-pair states (the six shown in Fig. <xref ref-type="fig" rid="Ch1.F2"/>
plus fluid-fluid and grain-grain pairs).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2"><caption><p>Turbulent suspension model with grains (1 mm tea leaves) that are
0.2 % denser than the surrounding fluid. Left: illustration of cell-pair
transitions representing motion in the four directions. Grain settling
velocity of 0.0011 m s<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> imparts asymmetry to the transition
probabilities.</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f02.pdf"/>

      </fig>

      <p>Note that it is possible, and often likely, to have a particular node
(representing, say, a grain) scheduled to undergo more than one transition.
For example, consider a “grain” node in the suspended-sediment model. That
node belongs to four different pairs. If the grain is surrounded by fluid
nodes, then each of those pairs will have the potential to undergo a
transition in which the grain and fluid switch places. When such a transition
occurs at one of the four pairs, it invalidates the other three pair
transitions. Below, we explain how this common situation is handled.</p>
      <p>The suspended-sediment model illustrates the advantage of a stochastic
as opposed to deterministic approach; we are dealing with a system that is in fact inherently stochastic
and unpredictable, because the grain motions arise from turbulent velocity
fluctuations. It is of interest to know how the inherent variability leads to
emergent pattern formation, such as the diffusion-like time evolution of
average concentration (without settling) or the emergence of a Rouse-like
concentration profile (with settling).</p>
      <p>The suspended-sediment examples also illustrate how it is possible to scale a
CTS model. Here, we have chosen the cell size as the diameter of the
particles (1 mm), and the timescale as 1 s. For the neutrally buoyant
case, the transition rate is set to equal a characteristic velocity
perturbation of 1 cm s<inline-formula><mml:math display="inline"><mml:mrow><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.125em" linebreak="nobreak"/></mml:mrow></mml:math></inline-formula>=<inline-formula><mml:math display="inline"><mml:mn> 10</mml:mn></mml:math></inline-formula> cells s<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. For the
denser-than-fluid case, the transition probabilities for upward and downward
motion are decreased or increased, respectively, by a factor of
<inline-formula><mml:math display="inline"><mml:mrow><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mo>=</mml:mo><mml:mi>w</mml:mi><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">δ</mml:mi></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>w</mml:mi><mml:mo>=</mml:mo><mml:mn>0.0011</mml:mn></mml:mrow></mml:math></inline-formula> m s<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> is settling velocity and
<inline-formula><mml:math display="inline"><mml:mrow><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>=</mml:mo><mml:mn>0.001</mml:mn></mml:mrow></mml:math></inline-formula> m is cell width. Thus, the scales and transition rates are
not arbitrary but have a direct physical meaning. For more on this point, see
<xref ref-type="bibr" rid="bib1.bibx45" id="text.20"/> and <xref ref-type="bibr" rid="bib1.bibx55" id="text.21"/>.</p>
</sec>
<sec id="Ch1.S4">
  <title>Algorithms, implementation, and capabilities</title>
      <p>CellLab-CTS is built on Landlab, a Python-language library for constructing
and exploring two-dimensional grid-based models <xref ref-type="bibr" rid="bib1.bibx38" id="paren.22"/>,
which imparts several unique features and capabilities. Because of Landlab's
support for multiple grid types, models built in CellLab-CTS can use either
of the two grid types that are commonly used in cellular automata: a raster
grid with square cells, or a trigonal grid with hexagonal cells (Fig. <xref ref-type="fig" rid="Ch1.F3"/>). Landlab's grid
design lends itself naturally to pairwise cellular automata because the data
structures include links: directed line segments that represent the
connections between adjacent cell pairs.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3"><caption><p>Schematic illustration of CellLab-CTS grid types and geometric
primitives. <bold>(a)</bold> Regular (raster). <bold>(b)</bold>
Trigonal lattice with hexagonal
cells. Note that standard link orientation is within the <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>≥</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:math></inline-formula> half plane;
in other words, the angle of a link, <inline-formula><mml:math display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula>, with respect to the positive
<inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis is always <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>45<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> <inline-formula><mml:math display="inline"><mml:mrow><mml:mo>≤</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>≤</mml:mo></mml:mrow></mml:math></inline-formula> 135<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>.</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f03.pdf"/>

      </fig>

<sec id="Ch1.S4.SS1">
  <title>Landlab's grid design</title>
      <p>One of Landlab's unique features is the ability to create any of a variety of
grid types, including raster (square cells), rectilinear (rectangular cells),
trigonal (hexagonal cells),
Delaunay–Voronoi (Voronoi polygon cells), and radial (a special class of
Delaunay–Voronoi in which nodes are arranged in concentric circles). Each
grid type uses the same <italic>flat</italic> data structure, in which grid elements
are listed sequentially in one-dimensional arrays. For CellLab-CTS, this
means that one can implement CA models using either a raster or hexagonal
grid.</p>
      <p>To understand how CellLab-CTS works, it is helpful to know a bit about
Landlab's grid composition and data structures. Each grid contains a set of
<italic>nodes</italic>, which are points in <inline-formula><mml:math display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> space (Fig. <xref ref-type="fig" rid="Ch1.F3"/>).
Each adjacent pair of nodes is connected by a <italic>link</italic>, which is an
oriented line segment. Every link connects a <italic>tail node</italic> to a
<italic>head node</italic>, with the implied direction being from the tail to the
head. Each node in the grid interior – that is, every node except those
along the perimeter of the grid – sits inside a polygon known as a
<italic>cell</italic>. In the case of CellLab-CTS, cells are either squares or
hexagons. Every cell <italic>face</italic> is crossed by a link. (Note that
CellLab-CTS actually operates on arrays of nodes rather than cells, so that
the outer perimeter of <italic>cell-less</italic> nodes may be included as a boundary
condition; for this reason, the internal documentation refers to nodes and
node pairs rather than cells and cell pairs.)</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4"><caption><p>Example of a simple Landlab raster grid, illustrating open- and
closed-boundary nodes, and active and inactive links.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f04.pdf"/>

        </fig>

      <p>To facilitate boundary-condition handling, nodes come in two flavors:
<italic>core nodes</italic> and <italic>boundary nodes</italic> (Fig. <xref ref-type="fig" rid="Ch1.F4"/>). Core
nodes are those that constitute the computational domain. When a Landlab grid
is created, the default configuration has all interior nodes flagged as core
nodes, and all perimeter nodes flagged as boundary nodes. For modeling
irregular domains (such as a watershed within a rectangular DEM), one can set
up a grid to have boundary nodes in the interior as well as along the
perimeter.</p>
      <p>In configuring a two-dimensional model, one often needs to specify boundary
conditions that are open to flow (such as the downstream end of a stream
channel), and those that are closed to flow (such as the wall of a closed
vessel). To facilitate such boundary-condition handling, boundary nodes in a
Landlab grid are flagged as either <italic>open</italic> or <italic>closed</italic>
(Fig. <xref ref-type="fig" rid="Ch1.F4"/>). Once boundary types have been assigned, the grid's
links are then flagged as <italic>active</italic> or <italic>inactive</italic> according to
the following criteria: (1) a link is active if it connects two core nodes,
or if it connects a core node and an open-boundary node; (2) a link is
inactive if either or both of its nodes is a closed boundary, or if both are
open boundaries (Fig. <xref ref-type="fig" rid="Ch1.F4"/>). This classification allows a model
developer to perform calculations only on active links, thus effectively
treating the inactive links (and the corresponding cell faces) as walls
across which there is no flow of mass, momentum, or energy.</p><?xmltex \hack{\newpage}?>
</sec>
<sec id="Ch1.S4.SS2">
  <title>Node and node-pair (link) states</title>
      <p>In order to implement a cellular automaton model, CellLab-CTS assigns an
integer <italic>node state</italic> to each node in the grid. These values are
encoded in a one-dimensional array of integers called the <italic>node-state grid</italic>. The number of possible node states and their transition behaviors are
determined by the model developer, as explained below. For example, in the
example of turbulent suspension (Figs. <xref ref-type="fig" rid="Ch1.F1"/> and <xref ref-type="fig" rid="Ch1.F2"/>),
there are two possible node states: 0 and 1, representing fluid and a solid
particle, respectively.</p>
      <p>As discussed above, a CellLab-CTS model is based on transitions from one pair
of node states to another pair. Each unique pair is referred to as a
<italic>pair state</italic> or a <italic>link state</italic>. To implement pairwise
transitions, CellLab-CTS takes advantage of the fact that a Landlab grid
includes a set of links connecting pairs of neighboring nodes. We can exploit
this fact by creating a data structure in which each active link in the grid
is assigned a <italic>pair code</italic>. The pair code is a single integer value
that represents the states of the two adjacent nodes, and possibly also the
spatial orientation of the pair.</p>
      <p>To understand how pair coding works, we need to look more closely at
orientation. In some applications, spatial orientation does not matter. For
example, in the isotropic suspension model (Fig. <xref ref-type="fig" rid="Ch1.F1"/>), the
transition rate for a solid-grain pair is the same regardless of whether the
pair in question is horizontal (aligned with the <inline-formula><mml:math display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis) or vertical
(aligned with the <inline-formula><mml:math display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis). In other applications, orientation does matter.
For example, when gravitational settling is added to the turbulent suspension
model, the transition rates differ for horizontal and vertical pairs
(Fig. <xref ref-type="fig" rid="Ch1.F2"/>). Moreover, the transition rate for a vertical pair
also depends on whether the solid particle lies above the fluid particle, or
vice versa.</p>
      <p>To accommodate these difference, CellLab-CTS allows users to create either an
<italic>oriented</italic> or a <italic>non-oriented</italic> model. In a non-oriented model,
the sequence of node-state codes associated with the nodes of a given link,
say 0 at the link's tail node and 1 at its head node, is treated the same
regardless of whether the link is vertical, horizontal, or (in the case of a
hex grid) at an angle of <inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula>30<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> or <inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>30<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>. For a non-oriented
model, whether raster or hex, there are <inline-formula><mml:math display="inline"><mml:mrow><mml:msup><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> unique link states, where <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>
is the number of possible node states. For example, the isotropic turbulent
suspension model (Fig. <xref ref-type="fig" rid="Ch1.F1"/>), which is an example of a
non-oriented (raster) model, there are just four link states: (1) two
adjacent fluid cells, (2) fluid cell at the link's tail and a solid cell at
the link's head, (3) a solid cell at the link's tail and a fluid cell at its
head, and (4) two adjacent solid particles. Note that the order from tail node to
head node still matters; the pair <inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>→</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> is different from the pair
<inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>→</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5"><caption><p>Illustration of cell-pair orientations and corresponding orientation
codes. Arrows represent links, each of which connects a <italic>tail node</italic> to
a <italic>head node</italic>.</p></caption>
          <?xmltex \igopts{width=199.169291pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f05.pdf"/>

        </fig>

      <p>By contrast, an oriented model treats cell pairs in different orientations as
different pair states. In a raster grid, there are two possible orientations:
horizontal and vertical. In a hex grid, there are three. In our examples,
these three hex-grid orientations are vertical, angling up (<inline-formula><mml:math display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula>30<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>),
and angling down (<inline-formula><mml:math display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>30<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>) (Fig. <xref ref-type="fig" rid="Ch1.F5"/>; note that one can
rotate this so that one of the axes is horizontal rather than vertical, but
in either case there are still three orientations). Each of these is given a
separate pair-state code, indicating that the transition type and rate may be
different depending on orientation. For example, in an oriented raster, the
pair <inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>→</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> has different codes for horizontal and vertical
orientation. An oriented raster has <inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msup><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> link states, whereas an oriented
hex has <inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:msup><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> link states.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <title>Transitions and the event queue</title>
      <p>Unlike a traditional discrete-time CA, CellLab-CTS does not use time steps.
Instead, we iterate through a sequence of pair transitions, or
<italic>events</italic>. As noted earlier, each pairwise transition is associated
with a time-independent stationary Poisson process. Thus, the time intervals
between successive transition events at a particular location are stochastic,
with an exponential probability distribution (Eq. <xref ref-type="disp-formula" rid="Ch1.E1"/>). At the start
of a run, every node pair (i.e., every link) is assigned a transition time.
These transition-event times are generated at random from an exponential
probability distribution, the mean of which is <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi mathvariant="italic">τ</mml:mi><mml:mo mathvariant="normal">¯</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/></mml:mrow></mml:math></inline-formula>=<inline-formula><mml:math display="inline"><mml:mrow><mml:mn> 1</mml:mn><mml:mo>/</mml:mo><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>,
where <inline-formula><mml:math display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> indicates the particular type of transition involved. If a
particular node-pair is of a type that has more than one possible transition,
event times are generated for each transition type, and the soonest is
selected and assigned. If a given node pair is of a type that has no
transitions (such as the fluid-fluid and grain-grain pairs in
Fig. <xref ref-type="fig" rid="Ch1.F1"/>), it is assigned an arbitrarily large transition time
that is longer than the duration of the run. <?xmltex \hack{\newpage}?></p>
      <p>Once the initial
event times are assigned, we need to iterate through them in chronological
order. In order to place events in the correct time sequence, we adopt an
approach that is commonly used in other types of discrete-event simulations
<xref ref-type="bibr" rid="bib1.bibx31 bib1.bibx47 bib1.bibx48" id="paren.23"><named-content content-type="pre">e.g.,</named-content></xref>, in
which future events are recorded in a queue that sorts them according to time
of occurrence. When a new event needs to be scheduled, we create an
<italic>event object</italic>, which stores the location of the transition, the time
at which it is scheduled to occur, and the new node states. This event object
is then placed in the <italic>event queue</italic>: a data structure that contains
all scheduled future transitions (Fig. <xref ref-type="fig" rid="Ch1.F6"/>). The event queue is
implemented as a heap, using the Python <monospace>heapq</monospace> library. Events in the
event queue are automatically and efficiently sorted such that the event with
the smallest value of transition time – that is, the next one to occur – is
always at the top. At the same time, we also record the transition time in a
separate array that contains the transition times for every link
(Fig. <xref ref-type="fig" rid="Ch1.F6"/>). Recording the transition times in two different
locations allows us to handle the common case in which a scheduled transition
becomes invalid because the state of one or both cells has changed. The
easiest way to understand how this works is to examine the algorithm for
implementing pair transitions, which we turn to next.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6"><caption><p>Illustration of the event queue and the transition-time array
(<monospace>next_update</monospace>). Each event object contains the ID number of the
link, the time at which the next transition is scheduled to occur, and the
link-state code for the transition (that is, the code for the new cell pair
after transition occurs). Left: events are stored in a heap that is sorted by
transition time, soonest on top. Right: the transition-time array, which is
simply an ordered array, indexed by link ID, containing the time of the next
scheduled transition at the corresponding link. If the transition time for an
event object does not match the corresponding entry in the transition-time
array, it means that the originally scheduled transition has been nullified
by other transitions and is no longer valid (see text).</p></caption>
          <?xmltex \igopts{width=199.169291pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f06.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S4.SS4">
  <title>Algorithm for pair transitions</title>
      <p>At the beginning of a CellLab-CTS simulation, we set up the initial array of
node states. We then loop over all active links, assigning to each one the
corresponding pair code. The pair code, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, for a given link <inline-formula><mml:math display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> is
calculated from the state of each node and the link's orientation:
            <disp-formula id="Ch1.E2" content-type="numbered"><mml:math display="block"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>O</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mi>N</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>O</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the link's orientation code (Fig. <xref ref-type="fig" rid="Ch1.F5"/>), <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is
the state of the tail node, <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> state of the head node, and <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> is the
number of potential node states in the model. Recall that a particular pair
state may have zero, one, or more than one possible transition. For those
pair states that have only one possible transition, the transition time is selected at random from
an exponential distribution with the appropriate rate parameter, and an event
object is created and pushed to the event queue. When a given pair state is
associated with two or more possible transitions, transition times drawn at
random number for each of the potential transitions. The soonest of these is
then entered into an event object and pushed to the event queue.</p>
      <p>A scheduled event at one pair can become obsolete if one or both nodes
changes state as a result of a transition in another pair to which the node
is connected. For instance, consider a particle (state 1) surrounded by four
fluid nodes (state 0) in the suspended-sediment example. The particle belongs
to four different pairs: it is connected to the nodes above, below, right,
and left. Each of these pairs will have a transition scheduled in which the
solid and fluid states switch places, simulating motion of the grain. When a
transition occurs at one of the four pairs, the other three scheduled
transitions immediately become invalid, and their scheduled transitions
should be ignored when they are popped from the event queue. To handle this
situation, whenever an event is scheduled, its transition time is also
recorded separately in the transition-time array (as is done in the
discrete-event algorithms of
<xref ref-type="bibr" rid="bib1.bibx31" id="altparen.24"/> and <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx48" id="altparen.25"/>). Then,
each time an event is popped from the event queue, it is executed only if its
transition time matches the entry in the transition-time array.</p>
      <p>The event-loop algorithm is illustrated in Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>. Note
that each event object <inline-formula><mml:math display="inline"><mml:mi>E</mml:mi></mml:math></inline-formula> includes a time of occurrence (<inline-formula><mml:math display="inline"><mml:mrow><mml:mi>E</mml:mi><mml:mo>.</mml:mo><mml:mtext>time</mml:mtext></mml:mrow></mml:math></inline-formula>),
the ID number of the link at which the event occurs (<inline-formula><mml:math display="inline"><mml:mrow><mml:mi>E</mml:mi><mml:mo>.</mml:mo><mml:mtext>link</mml:mtext></mml:mrow></mml:math></inline-formula>), and
the new link state to which the pair transitions (<inline-formula><mml:math display="inline"><mml:mrow><mml:mi>E</mml:mi><mml:mo>.</mml:mo><mml:mtext>xn_to</mml:mtext></mml:mrow></mml:math></inline-formula>).</p><boxed-text content-type="algorithm" position="float" id="Ch1.Prog1"><caption><p>Event loop</p></caption><?xmltex \hack{\setcounter{ALC@depth}{0}}?>
          <disp-quote content-type="algorithmic" specific-use="numbering{0}"><list>

    <list-item>

              <p specific-use="STATE"><inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>r</mml:mi></mml:msub><mml:mo>←</mml:mo></mml:mrow></mml:math></inline-formula> duration for run</p>
            </list-item>

    <list-item>

              <p specific-use="STATE"><inline-formula><mml:math display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>←</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

              <p specific-use="WHILE"><bold>while</bold> <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>&lt;</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and event queue is not empty <bold>do</bold>  <list>
    <list-item><p specific-use="STATE"><inline-formula><mml:math display="inline"><mml:mrow><mml:mi>E</mml:mi><mml:mo>←</mml:mo></mml:mrow></mml:math></inline-formula> pop next event from event queue</p></list-item>
    <list-item><p specific-use="IF"><bold>if</bold> <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>E</mml:mi><mml:mo>.</mml:mo><mml:mtext>time</mml:mtext></mml:mrow></mml:math></inline-formula> matches the event time for this link recorded in the transition-time array <bold>then</bold>  <list>
    <list-item><p specific-use="STATE">Process the transition event, schedule the next event, and update surrounding pairs</p></list-item></list></p></list-item>
    <list-item><p specific-use="ENDIF"><bold>end</bold> <bold>if</bold></p></list-item>
    <list-item><p specific-use="STATE"><inline-formula><mml:math display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>←</mml:mo><mml:mi>E</mml:mi><mml:mo>.</mml:mo><mml:mtext>time</mml:mtext></mml:mrow></mml:math></inline-formula></p></list-item></list></p>
            </list-item>

    <list-item>

              <p specific-use="ENDWHILE"><bold>end</bold> <bold>while</bold></p>
            </list-item>
          </list></disp-quote></boxed-text>
      <p>The algorithm for a transition event is illustrated in
Algorithm <xref ref-type="other" rid="Ch1.Prog2"/>. When a transition occurs, the state of one or both
nodes will change. This will invalidate any scheduled transitions at the
affected node(s). Therefore, the pair-state codes for each pair attached to
the transitioning nodes must be updated, and new events generated and
scheduled.</p><boxed-text content-type="algorithm" position="float" id="Ch1.Prog2"><caption><p>Processing a transition event</p></caption><?xmltex \hack{\setcounter{ALC@depth}{0}}?>
          <disp-quote content-type="algorithmic" specific-use="numbering{0}"><list>

    <list-item>

              <p specific-use="STATE">Update the states of the two nodes attached to the link</p>
            </list-item>

    <list-item>

              <p specific-use="STATE">Update
the link's pair code</p>
            </list-item>

    <list-item>

              <p specific-use="STATE">Generate the next event for this link (if any)
and push it to the event queue</p>
            </list-item>

    <list-item>

              <p specific-use="FOR"><bold>for</bold> <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>=</mml:mo></mml:mrow></mml:math></inline-formula> each of the link's two nodes (tail
and head) <bold>do</bold>  <list>
    <list-item><p specific-use="IF"><bold>if</bold> the state of <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> has changed as a result of this transition <bold>then</bold>  <list>
    <list-item><p specific-use="FORALL"><bold>for all</bold> other active links <inline-formula><mml:math display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> connected to <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> <bold>do</bold>  <list>
    <list-item><p specific-use="STATE">Update the state-code for <inline-formula><mml:math display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula></p></list-item>
    <list-item><p specific-use="STATE">Generate the next event for <inline-formula><mml:math display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> and push it to the event queue</p></list-item>
    <list-item><p specific-use="STATE">Update the entry for <inline-formula><mml:math display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> in the transition-time array</p></list-item></list></p></list-item>
    <list-item><p specific-use="ENDFOR"><bold>end</bold> <bold>for</bold></p></list-item></list></p></list-item>
    <list-item><p specific-use="ENDIF"><bold>end</bold> <bold>if</bold></p></list-item></list></p>
            </list-item>

    <list-item>

              <p specific-use="ENDFOR"><bold>end</bold> <bold>for</bold></p>
            </list-item>
          </list></disp-quote></boxed-text>
</sec>
<sec id="Ch1.S4.SS5">
  <title>Class hierarchy and data structures</title>
      <p>CellLab-CTS uses Python classes to implement four sub-types of the CA model. The
class inheritance structure is quite simple (Fig. <xref ref-type="fig" rid="Ch1.F7"/>). The base
class, CellLabCTSModel, handles most of the primary data structures. The
simulation grid is represented using a Landlab ModelGrid object (either a
RasterModelGrid or HexModelGrid). The <monospace>node_state</monospace> array contains the
state-code for every node (recall that Landlab nodes represent cells in the
model; Landlab reserves the term <italic>cell</italic> for polygons that surround interior
nodes).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7" specific-use="star"><caption><p>CellLab-CTS class hierarchy and main data structures. The base
class, CellLabCTSModel, has four subclasses: RasterCTS, OrientedRasterCTS,
HexCTS, and OrientedHexCTS. A user selects one of these four subclasses based
on whether the model to be built has a hex or raster grid, and on whether
pair orientation matters. <inline-formula><mml:math display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> is number of grid nodes, <inline-formula><mml:math display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> is number of grid
links, <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:math></inline-formula> is number of possible link (node pair) states, and <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mi>T</mml:mi></mml:mrow></mml:math></inline-formula> is maximum
number of transitions for any link state.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f07.pdf"/>

        </fig>

      <p>Information about the relationship between link states and node states is
contained in the <monospace>node_pair</monospace> list. When a transition occurs, this
list is used to look up the new states of the two nodes given the new state
of the link. The list is indexed by the pair-state codes, and each entry is a
three-element tuple: <inline-formula><mml:math display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi>H</mml:mi><mml:mo>,</mml:mo><mml:mi>O</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> is the state of the tail node, <inline-formula><mml:math display="inline"><mml:mi>H</mml:mi></mml:math></inline-formula>
is the state of the head node, and <inline-formula><mml:math display="inline"><mml:mi>O</mml:mi></mml:math></inline-formula> is the orientation of the link. For
example, the configuration represented by pair-state number three would be
found at <monospace>node_pair[3]</monospace>.</p>
      <p>As discussed previously, transition events are recorded in a heap known as
the event queue. The time of transition for each pair (link) is also recorded
in the <monospace>next_update</monospace> array (Fig. <xref ref-type="fig" rid="Ch1.F6"/>).</p>
      <p>For models in which pair orientation matters, we need to keep track of the
orientation code for each pair. This is done using
<monospace>link_orientation</monospace>, an array of integer orientation codes (as defined
in Fig. <xref ref-type="fig" rid="Ch1.F5"/>), whose length is equal to the number of links in the
grid. The state of each pair is encoded in the <monospace>link_state</monospace> array.
Finally, information about pair-state transitions is encoded in three arrays.
We encode the number of potential transitions for each pair state in the
array <monospace>n_xn</monospace>. For every transition type, we need to record the new
pair state and the rate; these two pieces of information are recorded in
<monospace> xn_to</monospace> and <monospace>xn_rate</monospace>, respectively. Both are
two-dimensional arrays with dimensions equal to the number of unique pair
states and the maximum number of transitions for any given pair state.</p>
</sec>
<sec id="Ch1.S4.SS6">
  <title>Tracking properties associated with moving particles</title>
      <p>The suspended-particle simulations (Figs. <xref ref-type="fig" rid="Ch1.F1"/> and
<xref ref-type="fig" rid="Ch1.F2"/>) are examples of models in which certain node states
represent moving particles. For such models, it is often desirable to keep
track of various properties associated with these particles. For example, one
might wish to keep track of the original position of a particle, or calculate
a position-dependent accumulation or loss of a property such as cosmogenic
nuclide concentration, luminescence, or chemical composition. CellLab-CTS
provides the ability to define and track user-defined data that are
associated with certain node states, which are treated as mobile particles.</p>
      <p>To implement property tracking, the user defines an array or list of
properties that are assigned to nodes in their initial locations. The
properties themselves may be of any data type; for example, for a simple
scalar property, one might use floats, whereas for a collection of
properties, user-defined objects containing multiple data items could be
assigned. CellLab-CTS then creates an array that contains, for each node, the
index in the user-defined property array/list that corresponds to that node.
To handle movement of particles, each transition includes a flag indicating
whether the transition in question involves an exchange of properties between
the two nodes in the pair. For example, the transitions in the turbulent
suspension model (Figs. <xref ref-type="fig" rid="Ch1.F1"/>, <xref ref-type="fig" rid="Ch1.F2"/>) represent particle
motion, and would therefore be flagged as involving an exchange of properties
between the node pairs.</p>
      <p>For each transition involving such an exchange, the simulation keeps track of
the location of the properties in question, thereby allowing the positions of
individual particles to be tracked. Each node location is assigned a
<italic>property ID</italic> that points to the array element in which property data
for that particle are stored. This array element also corresponds to the
original starting location of the particle in question. For example, suppose
that property data for node 5 are stored at array location 19. This would
indicate that the particle represented by node 5 began at node 19 and
subsequently moved to node 5.</p>
      <p>Updating of properties is handled by the CellLab-CTS user, and it involves
the use of a callback function. If a particular transition type involves
particle motion, and one or more user-defined properties of particles evolves
in time, the user would write a function to update these properties. The
function arguments are a CellLabCTSModel object (i.e., the instance of one
of the four subclasses listed in Fig. <xref ref-type="fig" rid="Ch1.F7"/>), the IDs of the two
nodes involved in the transition, and the time at which the transition
occurs. This function is then passed as an optional argument when the
transition in question is set up at the beginning of a run. Then, whenever a
transition of that type takes place, CellLab-CTS automatically calls the
user's function. This use of a callback function gives the user flexibility
to implement any kind of updating of properties during each transition event.</p>
      <p>As an example of user-defined property updating, imagine a version of the
suspended-sediment model (Fig. <xref ref-type="fig" rid="Ch1.F2"/>) in which the grains are
quartz sand (instead of tea leaves), and possess the property of
luminescence. When quartz grains are exposed to background ionizing radiation
in the soil, electrons gradually become displaced from their rest states, and
become <italic>trapped</italic> within defects in the crystal lattice. When the grain is
exposed to light, the trapped electrons are released, returning to their rest
states and giving off a faint glow in the process. This phenomenon, known as
optically stimulated luminescence (OSL), is commonly used in geologic dating
applications <xref ref-type="bibr" rid="bib1.bibx53" id="paren.26"/>.</p>
      <p>Imagine then that our grains begin with a certain luminescence signal <inline-formula><mml:math display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula>,
which we will assume is initially uniform for all grains. Imagine also that a
light is positioned above the container, but that the fluid is partly opaque,
so that the light intensity attenuates with depth below the surface. For
quartz OSL, the rate of signal loss (bleaching) can be approximated by
            <disp-formula id="Ch1.E3" content-type="numbered"><mml:math display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>=</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>L</mml:mi><mml:mrow><mml:mi>T</mml:mi><mml:mo>(</mml:mo><mml:mi>z</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math display="inline"><mml:mi>t</mml:mi></mml:math></inline-formula> is time and <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>(</mml:mo><mml:mi>z</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is an effective timescale for bleaching that
depends on the incoming photon flux and a material-dependent bleachability
parameter (both integrated over the light spectrum). Because the photon flux
attenuates with depth in the fluid column, <inline-formula><mml:math display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula>, according to the Beer–Lambert
law, the bleaching timescale grows with depth below the fluid surface:
            <disp-formula id="Ch1.E4" content-type="numbered"><mml:math display="block"><mml:mrow><mml:mi>T</mml:mi><mml:mo>(</mml:mo><mml:mi>z</mml:mi><mml:mo>)</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>=</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mi>exp⁡</mml:mi><mml:mfenced close=")" open="("><mml:mi>z</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> is the attenuation length scale, which depends on the fluid
opacity (note that we ignore scattering here). For our example, we will use
<inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/></mml:mrow></mml:math></inline-formula>=<inline-formula><mml:math display="inline"><mml:mn> 2.42</mml:mn></mml:math></inline-formula> s <xref ref-type="bibr" rid="bib1.bibx5" id="paren.27"/> and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mo>*</mml:mo></mml:msub><mml:mo>=</mml:mo><mml:mn>0.025</mml:mn></mml:mrow></mml:math></inline-formula> m. The
latter represents quite opaque fluid (think tea with milk), and is used here
simply to create a strong (<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn>50</mml:mn><mml:mo>×</mml:mo></mml:mrow></mml:math></inline-formula>) variation in bleaching rate
through the depth of our 10 cm container. Grains that diffuse toward the top
of the container will therefore experience a much higher bleaching rate than
those that settle toward the bottom.</p>
      <p>To implement a bleaching model, the user's code would define and initialize
an array containing the luminescence signal for each node. It would also
define a simple callback function. The callback function detects whether the
state of either or both nodes represents a particle. If so, the corresponding
entry in the user's luminescence array is updated by extrapolating
Eqs. (<xref ref-type="disp-formula" rid="Ch1.E3"/>) and (<xref ref-type="disp-formula" rid="Ch1.E4"/>):
            <disp-formula id="Ch1.E5" content-type="numbered"><mml:math display="block"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>←</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mi>exp⁡</mml:mi><mml:mfenced close=")" open="("><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mi>z</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math display="inline"><mml:mi>t</mml:mi></mml:math></inline-formula> is the current time and <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the last time the luminescence at
node <inline-formula><mml:math display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> was updated (which the callback function also tracks). The turbulent
suspension model with bleaching is illustrated in Fig. <xref ref-type="fig" rid="Ch1.F8"/>. As
one might expect, the rapid attenuation of light creates a strong vertical
gradient in the degree of bleaching, with some dispersion that reflects
turbulent mixing. Although this particular example is somewhat unrealistic in
that light attenuation is treated as independent of sediment concentration
(in other words, light passes equally through fluid and grains), the example
illustrates the ability to treat certain cell states as moving particles, to
track their movement, and to associate each particle with one or more
properties.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8"><caption><p>Model of turbulent sediment suspension, showing the computed
luminescence signal after 20 s of stirring and bleaching. The original
luminescence signal is removed (bleached) by exposure to light. Because light
intensity declines exponentially from top to bottom, grains near the bottom
are less fully bleached than those near the top. Turbulent mixing disperses
the partially bleached grains.</p></caption>
          <?xmltex \igopts{width=213.395669pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f08.pdf"/>

        </fig>

<?xmltex \hack{\newpage}?>
</sec>
</sec>
<sec id="Ch1.S5">
  <title>Other examples</title>
      <p>Three additional examples serve to illustrate the diversity of applications
that can be written using CellLab-CTS. These applications span the fields of
geomorphology (chemical weathering of crystalline rock), epidemiology (a
susceptible–infectious–recovered model of disease spread), and granular
mechanics (a lattice-grain model).</p>
<sec id="Ch1.S5.SS1">
  <title>Weathering of fractured rocks</title>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9" specific-use="star"><caption><p>Three time slices from a CellLab-CTS model of bedrock weathering
along fracture planes. Light-colored cells are unweathered mineral grains;
dark-colored cells are grains that have been chemically altered to form
saprolite (rock material that has been weathered but not displaced). Left to
right: time 0, time 10, and time 30. Here the time is normalized by initial
fracture width and weathering rate; one time unit represents the average time
to weather fresh rock to a depth of one initial fracture width. For example,
if fracture width (cell size) were 1 cm and weathering rate
<inline-formula><mml:math display="inline"><mml:mrow><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> m yr<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, then one time unit <inline-formula><mml:math display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> 1000 years.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f09.pdf"/>

        </fig>

      <p>One of the current frontiers in geomorphology and soil science lies in
understanding the transformation of rock to soil. One-dimensional reactive
transport models have been used to study the time evolution of a weathering
front in homogeneous, unfractured rock
<xref ref-type="bibr" rid="bib1.bibx39 bib1.bibx40 bib1.bibx41" id="paren.28"><named-content content-type="pre">e.g.,</named-content></xref>.
In crystalline rocks, however, it is often observed that chemical alteration
of the original rock takes place primarily along fracture planes, which serve
as conduits for water, oxygen, and reactive aqueous elements such as hydrogen
ions <xref ref-type="bibr" rid="bib1.bibx50" id="paren.29"/>. The model shown in
Fig. <xref ref-type="fig" rid="Ch1.F9"/> implements a simple hypothesis for the transformation
of parent rock into saprolite (material that has been chemically altered by
not disaggregated). Nodes in the model represent mineral grains; a typical
diameter of such grains in nature might be <inline-formula><mml:math display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> mm. The model begins
with a network of fractures, each initially one grain wide. The rules
representing hydrology and geochemistry are deliberately simplified for the
sake of illustrating a single-transition CellLab-CTS model: any
rock–saprolite pair has a fixed probability per unit time of transforming
into a saprolite–saprolite pair. This example uses the RasterCTS class.</p>
      <p>The model domain forms a set of fracture-bounded blocks of rock, which
weather inward over time from their perimeters. The effective probability of
weathering of a grain depends on its local geometry: a grain exposed on only
one side has a lower probability of weathering within a given time period
than one exposed on all four sides, simply because of the combined
probabilities in the latter. This simple geometric principle leads to a
gradual rounding of the blocks as they weather.</p>
      <p>The code to implement this model is very simple, with only two transition
rules: the pair <italic>saprolite (1)</italic><inline-formula><mml:math display="inline"><mml:mo>→</mml:mo></mml:math></inline-formula><italic>rock (0)</italic>
transitions to <italic>saprolite (1)</italic><inline-formula><mml:math display="inline"><mml:mo>→</mml:mo></mml:math></inline-formula><italic>saprolite (1)</italic>, and
the pair <italic>rock (0)</italic><inline-formula><mml:math display="inline"><mml:mo>→</mml:mo></mml:math></inline-formula><italic>saprolite (1)</italic> also
transitions to <italic> saprolite (1)</italic><inline-formula><mml:math display="inline"><mml:mo>→</mml:mo></mml:math></inline-formula><italic>saprolite (1)</italic>.
These transitions represent isotropic transformation of rock–saprolite pairs
to saprolite–saprolite pairs (two transitions are necessary because ordering
matters: 0–1 is a different pairing than 1–0, and so both must be included
in order to implement isotropic transitions). Although this example uses a
raster grid, one could instead use a hex grid (using the class HexCTS), which
might provide a more faithful representation of the geometry of packed
crystals. One could also, of course, take a more sophisticated approach to
the hydrology and geochemistry, for example by introducing chemically
saturated and unsaturated fluid states <xref ref-type="bibr" rid="bib1.bibx44" id="paren.30"><named-content content-type="pre">cf.</named-content></xref>. An
interesting future challenge would be to couple a dissolution-crystallization
model with a model of aqueous flow in the fracture network.</p>
</sec>
<sec id="Ch1.S5.SS2">
  <title>Susceptible–infectious–recovered model</title>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10" specific-use="star"><caption><p>A susceptible–infectious–recovered (SIR) model built with
CellLab-CTS. This example compares runs with two different infection rates
(top and bottom rows, respectively). Gray is susceptible,
black is infectious, and white is recovered. One time unit is one
average recovery time. This example model uses the HexCTS subclass
(non-oriented model with hexagonal cells).</p></caption>
          <?xmltex \igopts{width=312.980315pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f10.pdf"/>

        </fig>

      <p>The susceptible–infectious–recovered (SIR) concept is a classic
mathematical model in epidemiology. The simplest form of the SIR model
represents a population as having three compartments: those which are
infected, those which have not yet been infected and are therefore
susceptible to the disease, and those which have recovered and are now immune
<xref ref-type="bibr" rid="bib1.bibx26" id="paren.31"/>. Figure <xref ref-type="fig" rid="Ch1.F10"/> illustrates an
implementation of the SIR model as a continuous-time stochastic cellular
automaton, using a hex grid. Each node has one of three states: susceptible
(gray), infectious (black), and recovered (white). Infection and recovery are
modeled as stochastic processes. An infected node has a user-specified
transition rate to recovery (probability per unit time of recovering), which
translates into an exponential probability distribution of recovery times
with mean <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi mathvariant="italic">τ</mml:mi><mml:mo mathvariant="normal">¯</mml:mo></mml:mover><mml:mi>r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> (Eq. <xref ref-type="disp-formula" rid="Ch1.E1"/>). When a susceptible node lies
adjacent to an infectious node, there is a specified infection rate
(probability per unit time that the susceptible node will become infected).
Again, this translates into an exponential probability distribution of time
to infection, with mean <inline-formula><mml:math display="inline"><mml:mover accent="true"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi>I</mml:mi></mml:msub></mml:mrow><mml:mo mathvariant="normal">¯</mml:mo></mml:mover></mml:math></inline-formula>. Thus, for any adjacent
susceptible–infectious pair, there is a race against time: will the infected
node recover before passing on the infection to its neighbor? The outcome
depends on the ratio of infection to recovery rates. When the ratio is
modest, an initial disease cluster spreads relatively slowly, and is likely
to die out before spreading very far (Fig. <xref ref-type="fig" rid="Ch1.F10"/>, top row). When the
ratio is higher, disease is likely to spread throughout the population,
leaving few individuals untouched (Fig. <xref ref-type="fig" rid="Ch1.F10"/>, bottom row).
<?xmltex \hack{\newpage}?></p>
</sec>
<sec id="Ch1.S5.SS3">
  <title>Lattice-grain model</title>
      <p>Granular-flow phenomena are ubiquitous in nature. Examples include
landslides, debris flows, talus-pile formation, and pyroclastic flows, among
others. A variety of cellular automaton approaches have been used to model
granular flows
<xref ref-type="bibr" rid="bib1.bibx6 bib1.bibx7 bib1.bibx21 bib1.bibx49 bib1.bibx36 bib1.bibx27 bib1.bibx37 bib1.bibx28" id="paren.32"/>.
Among these are a family of models known as lattice-grain models (LGrM),
which are based on the well-known lattice-gas model in fluid dynamics but
with additional rules for gravity and friction
<xref ref-type="bibr" rid="bib1.bibx25 bib1.bibx51 bib1.bibx1 bib1.bibx32 bib1.bibx33 bib1.bibx34 bib1.bibx42 bib1.bibx18 bib1.bibx12 bib1.bibx19" id="paren.33"/>.
Here we describe and illustrate a continuous-time stochastic version of a
lattice-grain model.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1"><caption><p>States in the CTS lattice gas and lattice-grain models.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="right"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">State code</oasis:entry>  
         <oasis:entry colname="col2">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">0</oasis:entry>  
         <oasis:entry colname="col2">empty or fluid</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1</oasis:entry>  
         <oasis:entry colname="col2">moving upward</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2</oasis:entry>  
         <oasis:entry colname="col2">moving right and upward</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">3</oasis:entry>  
         <oasis:entry colname="col2">moving right and downward</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">4</oasis:entry>  
         <oasis:entry colname="col2">moving downward</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">5</oasis:entry>  
         <oasis:entry colname="col2">moving left and downward</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">6</oasis:entry>  
         <oasis:entry colname="col2">moving left and upward</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">7</oasis:entry>  
         <oasis:entry colname="col2">resting</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">8</oasis:entry>  
         <oasis:entry colname="col2">wall</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p>In the classic lattice-gas model, a fluid is represented as a set of
particles on a regular lattice
<xref ref-type="bibr" rid="bib1.bibx22 bib1.bibx20 bib1.bibx54" id="paren.34"/>. Each particle is
assumed to have unit mass and speed, and each is assigned a direction of
motion, which may be any of the lattice's cardinal directions. On a hexagonal
lattice (the most common for lattice-gas models), there are therefore six
possible directions. In addition, some models also include stationary
particles. Each iteration of a lattice-gas model has two steps: a movement
step, in which each particle moves one unit in its given direction, and a
collision step, in which collisions between particles are resolved by
changing particle directions (as a representation of collision and rebound
between perfectly elastic particles).</p>
      <p>A typical lattice-grain model starts with these basic rules but with
modifications. Each cell may be occupied by only one grain (as opposed to one
for each possible direction in lattice-gas models). Because grains are not
perfectly elastic, collisions may result in a loss of momentum, with a
specified probability. Finally, gravity is represented by applying a certain
probability for a particle to alter its direction and/or velocity (for those
models that allow varying velocity among particles).</p>
      <p>The stochastic, pairwise transition model of CellLab-CTS can be used to
construct versions of both a lattice-gas and a lattice-grain model; the
latter is simply a version of the former that adds rules for gravity and
friction. Here we present examples of both types of models. The examples are
implemented on a hex grid with a vertical axis and two other axes at
60<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> from vertical. There are nine possible node states, corresponding
to the six directions of motion, an empty state, a resting state, and a wall
state (Table <xref ref-type="table" rid="Ch1.T1"/>).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11" specific-use="star"><caption><p>Motion and collision rules for a pairwise CTS lattice gas model. For
states that have multiple transitions, the transition rate for each is
reduced from unity to the fraction shown. Reduction to a one-fourth rate (instead of
one-half) for rear collisions accounts for the possibility that the lead
particle is faster (so no collision occurs).</p></caption>
          <?xmltex \igopts{width=312.980315pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f11.pdf"/>

        </fig>

      <p>The motion and collision rules for a pairwise CTS lattice gas model are
illustrated in Fig. <xref ref-type="fig" rid="Ch1.F11"/> and listed in Table 2. Because the
model is stochastic, with binary transitions, the rule set is somewhat
different from that of a traditional deterministic lattice-gas model
<xref ref-type="bibr" rid="bib1.bibx11" id="paren.35"><named-content content-type="pre">e.g.,</named-content></xref>. There is no need to deal with three-way
collisions, for example, and we allow only one particle to occupy each node.
Furthermore, the stochastic nature of transitions means that particles
effectively have varying velocity and momentum. This in turn raises the
possibility of collisions from the side or behind (relative to a grain's
direction of motion), as one particle overtakes another. Such collisions are
not possible in a traditional lattice gas, in which particles have the same
velocity and cannot overtake one another. Motion is implemented as a simple
exchange of states (Fig. <xref ref-type="fig" rid="Ch1.F11"/>, top). In some cases, a
collision may produce any of two or three different outcomes, as in the
example of a head-on collision. In these cases, multiple transitions are
encoded, each with a reduced transition rate; this is equivalent to assigning
a fractional probability to each of the potential outcomes. Interestingly,
indirect collisions tend to be less common than head-on collisions, because
they only occur if one of the two particles does not move out of the way
first.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T2"><caption><p>Transitions for orientation 1 in the CTS Lattice Gas model. Node
states are as defined in Table 1. First number of each pair is lower-left and
second is upper-right. Pairs with three possible transitions have a rate of
one-third
each; pair with two possible transitions has rate of one-quarter (representing rear
collision).</p></caption><oasis:table frame="topbot"><?xmltex \begin{scaleboxenv}{.9}[.9]?><oasis:tgroup cols="6">
     <oasis:colspec colnum="1" colname="col1" align="center"/>
     <oasis:colspec colnum="2" colname="col2" align="center"/>
     <oasis:colspec colnum="3" colname="col3" align="center"/>
     <oasis:colspec colnum="4" colname="col4" align="center"/>
     <oasis:colspec colnum="5" colname="col5" align="center"/>
     <oasis:colspec colnum="6" colname="col6" align="center"/>
     <oasis:thead>
       <oasis:row>  
         <oasis:entry colname="col1">Pair</oasis:entry>  
         <oasis:entry colname="col2">Transition</oasis:entry>  
         <oasis:entry colname="col3">Pair</oasis:entry>  
         <oasis:entry colname="col4">Transition</oasis:entry>  
         <oasis:entry colname="col5">Pair</oasis:entry>  
         <oasis:entry colname="col6">Transition</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">  
         <oasis:entry colname="col1">state</oasis:entry>  
         <oasis:entry colname="col2">to</oasis:entry>  
         <oasis:entry colname="col3">state</oasis:entry>  
         <oasis:entry colname="col4">to</oasis:entry>  
         <oasis:entry colname="col5">state</oasis:entry>  
         <oasis:entry colname="col6">to</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>  
         <oasis:entry colname="col1">0–0</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–0</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">6–0</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–1</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–1</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">6–1</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–2</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–2</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">6–2</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–3</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–3</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">6–3</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–4</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–4</oasis:entry>  
         <oasis:entry colname="col4">4–3</oasis:entry>  
         <oasis:entry colname="col5">6–4</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–5</oasis:entry>  
         <oasis:entry colname="col2">5–0</oasis:entry>  
         <oasis:entry colname="col3">3–5</oasis:entry>  
         <oasis:entry colname="col4">5–3</oasis:entry>  
         <oasis:entry colname="col5">6–5</oasis:entry>  
         <oasis:entry colname="col6">5–6</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–6</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–6</oasis:entry>  
         <oasis:entry colname="col4">4–1</oasis:entry>  
         <oasis:entry colname="col5">6–6</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–7</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–7</oasis:entry>  
         <oasis:entry colname="col4">7–2</oasis:entry>  
         <oasis:entry colname="col5">6–7</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">0–8</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">3–8</oasis:entry>  
         <oasis:entry colname="col4">4–8</oasis:entry>  
         <oasis:entry colname="col5">6–8</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–0</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">4–0</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–0</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–1</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">4–1</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–1</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–2</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">4–2</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–2</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–3</oasis:entry>  
         <oasis:entry colname="col2"/>  
         <oasis:entry colname="col3">4–3</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–3</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–4</oasis:entry>  
         <oasis:entry colname="col2">6–3</oasis:entry>  
         <oasis:entry colname="col3">4–4</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–4</oasis:entry>  
         <oasis:entry colname="col6">5–7</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–5</oasis:entry>  
         <oasis:entry colname="col2">5–1</oasis:entry>  
         <oasis:entry colname="col3">4–5</oasis:entry>  
         <oasis:entry colname="col4">5–4</oasis:entry>  
         <oasis:entry colname="col5">7–5</oasis:entry>  
         <oasis:entry colname="col6">4–7, 5–7, 6–7</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–6</oasis:entry>  
         <oasis:entry colname="col2">6–1</oasis:entry>  
         <oasis:entry colname="col3">4–6</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–6</oasis:entry>  
         <oasis:entry colname="col6">5–7</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–7</oasis:entry>  
         <oasis:entry colname="col2">7–2</oasis:entry>  
         <oasis:entry colname="col3">4–7</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–7</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">1–8</oasis:entry>  
         <oasis:entry colname="col2">6–8</oasis:entry>  
         <oasis:entry colname="col3">4–8</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">7–8</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–0</oasis:entry>  
         <oasis:entry colname="col2">0–2</oasis:entry>  
         <oasis:entry colname="col3">5–0</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–0</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–1</oasis:entry>  
         <oasis:entry colname="col2">1–2</oasis:entry>  
         <oasis:entry colname="col3">5–1</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–1</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–2</oasis:entry>  
         <oasis:entry colname="col2">1–3, 3–1</oasis:entry>  
         <oasis:entry colname="col3">5–2</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–2</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–3</oasis:entry>  
         <oasis:entry colname="col2">3–2</oasis:entry>  
         <oasis:entry colname="col3">5–3</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–3</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–4</oasis:entry>  
         <oasis:entry colname="col2">4–2</oasis:entry>  
         <oasis:entry colname="col3">5–4</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–4</oasis:entry>  
         <oasis:entry colname="col6">8–3</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–5</oasis:entry>  
         <oasis:entry colname="col2">4–1, 5–2, 6–3</oasis:entry>  
         <oasis:entry colname="col3">5–5</oasis:entry>  
         <oasis:entry colname="col4">4–6, 6–4</oasis:entry>  
         <oasis:entry colname="col5">8–5</oasis:entry>  
         <oasis:entry colname="col6">8–1, 8–2, 8–3</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–6</oasis:entry>  
         <oasis:entry colname="col2">6–2</oasis:entry>  
         <oasis:entry colname="col3">5–6</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–6</oasis:entry>  
         <oasis:entry colname="col6">8–1</oasis:entry>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–7</oasis:entry>  
         <oasis:entry colname="col2">7–1, 7–2, 7–3</oasis:entry>  
         <oasis:entry colname="col3">5–7</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–7</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>  
         <oasis:entry colname="col1">2–8</oasis:entry>  
         <oasis:entry colname="col2">4–8, 5–8, 6–8</oasis:entry>  
         <oasis:entry colname="col3">5–8</oasis:entry>  
         <oasis:entry colname="col4"/>  
         <oasis:entry colname="col5">8–8</oasis:entry>  
         <oasis:entry colname="col6"/>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup><?xmltex \end{scaleboxenv}?></oasis:table></table-wrap>

      <p>The behavior of the CTS lattice-gas model is illustrated in
Fig. <xref ref-type="fig" rid="Ch1.F12"/>, which shows particles in closed vessel. The number of
particles in each motion state remains roughly constant over time, indicating
that momentum is conserved. The CTS lattice-gas model lacks the speed
advantage of traditional lattice-gas models; we present it here because it
forms the basis for a cellular model of granular mechanics, which we turn to
next.</p>
      <p>To construct a lattice-grain model, we modify the CTS lattice-gas rules
(Fig. <xref ref-type="fig" rid="Ch1.F11"/>) by adding transitions that implement gravity and
frictional energy dissipation. To represent the effects of friction, we add
an extra set of transitions, so that each collision now has the possibility
of an inelastic response, in which momentum is lost to friction. The
frictional transition rules are illustrated in
Fig. <xref ref-type="fig" rid="Ch1.F13"/>. The transition rates for purely elastic
collisions (Fig. <xref ref-type="fig" rid="Ch1.F11"/>, rules 2–11) are reduced by
multiplying each one by a user-specified rebound parameter, <inline-formula><mml:math display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>; this
parameter is effectively the motion-transition rate (one cell per time unit)
times a coefficient of restitution. The corresponding frictional transitions
are assigned a rate of <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula> (except for rule 8, in which each of two
frictional transitions is assigned a rate of <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>;
Fig. <xref ref-type="fig" rid="Ch1.F13"/>, upper right). This approach to inelastic
collisions is similar, for example, to that of <xref ref-type="bibr" rid="bib1.bibx32" id="text.36"/>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F12" specific-use="star"><caption><p>Example of a CTS lattice gas model. Left: particles undergoing
random (brownian) motion in a vessel. Color codes: white is empty,
black is wall, and gray is resting; others moving in the directions
indicated in inset legend. Right: number of particles in each movement
direction versus time, illustrating the conservation of average momentum.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f12.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F13" specific-use="star"><caption><p>Friction rules for lattice-grain model. Unless otherwise noted, each
transition has a rate <inline-formula><mml:math display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>, whereas the corresponding transition rates for
elastic behavior (Fig. <xref ref-type="fig" rid="Ch1.F11"/>) have rate <inline-formula><mml:math display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>f</mml:mi></mml:mrow></mml:math></inline-formula>.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f13.pdf"/>

        </fig>

      <p>Gravity is implemented by assigning transitions that have the effect of
adding downward momentum (Fig. <xref ref-type="fig" rid="Ch1.F14"/>). Thus,
upward-moving particles transition to resting ones, while resting ones
transition to downward-moving particles, and so on. Each of these transitions
is assigned a user-specified rate <inline-formula><mml:math display="inline"><mml:mi>g</mml:mi></mml:math></inline-formula>. This parameter sets the timescale for
the model; <inline-formula><mml:math display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>g</mml:mi></mml:mrow></mml:math></inline-formula> is intended to represent the time required for an initially
stationary grain to fall a distance of one cell. Because of the limitations
of the CTS approach, these rules provide only an approximate representation
of gravitational behavior. For example, in the CTS framework, the average
speed (and hence momentum magnitude) of a particle reflects its average
transition rate. Because the transition rate parameter is constant for each
transition type, it is not possible to represent acceleration (though this
limitation could be overcome in a future version by allowing a variable
transition rate). For example, we approximate the tendency for velocity
vectors to orient downward by applying the transitions shown in the third row
of Fig. <xref ref-type="fig" rid="Ch1.F14"/>, in which a particle moving both
horizontally and downward at a 30<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> angle for the horizontal
transitions to a state of moving purely downward. Obviously, this is somewhat
unrealistic: in the real world (and in the absence of fluid drag), such a
particle would sustain its horizontal momentum while accelerating downward.
We also apply an “angle of repose” rule (bottom column of
Fig. <xref ref-type="fig" rid="Ch1.F14"/>), which allows particles resting on a slope to
undergo down-slope motion. This rule has the effect of imparting a
30<inline-formula><mml:math display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> angle of repose.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F14"><caption><p>Gravity rules for lattice-grain model. Each transition has a rate
<inline-formula><mml:math display="inline"><mml:mi>g</mml:mi></mml:math></inline-formula>. The bottom two transitions represent angle-of-repose behavior. This
example uses the OrientedHexCTS subclass.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f14.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F15" specific-use="star"><caption><p>Three snapshots from a lattice-grain simulation showing the emptying
of a silo. Color codes: white is empty, black is wall, light
gray is resting grain, and dark gray is moving grain.</p></caption>
          <?xmltex \igopts{width=355.659449pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/9/823/2016/gmd-9-823-2016-f15.pdf"/>

        </fig>

      <p>Despite its limitations, the CTS lattice-grain model exhibits many
characteristics of real granular flows, such as the emptying of a funnel and
the resulting formation of a grain pile with angle-of-repose side slopes
(Fig. <xref ref-type="fig" rid="Ch1.F15"/>). The CTS lattice-grain approach appears to be
promising for geomorphic systems, in which the detailed physics of particle
acceleration and momentum exchange are likely to be less important than the
general characteristics of granular behavior
<xref ref-type="bibr" rid="bib1.bibx3 bib1.bibx58 bib1.bibx30 bib1.bibx56" id="paren.37"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
</sec>
</sec>
<sec id="Ch1.S6">
  <title>Discussion</title>
      <p>CellLab-CTS provides a simple, easy-to-use framework for creating pairwise,
continuous-time stochastic cellular automata of the form pioneered by
<xref ref-type="bibr" rid="bib1.bibx44" id="text.38"/>. As a modeling technique, the pairwise CTS method
offers several advantages, both in comparison to more traditional
differential-equation models, and in comparison to other forms of cellular
automaton. The granularity of the approach can bring one closer to the
relevant length scale of a particular system; rather than adopting continuum
equations that are assumed to capture the average behavior of a large
ensemble of particles
<xref ref-type="bibr" rid="bib1.bibx23 bib1.bibx24" id="paren.39"><named-content content-type="pre">e.g.,</named-content></xref>, one can instead
directly address the statistics of interactions among discrete entities.
Starting from an elementary length scale, this approach can shed light on
collective behaviors that may be difficult to analyze using a continuum
approach.</p>
      <p>Pairwise CTS models are not appropriate for every problem. Their limitations
include the use of a single cell size, which makes it difficult to address
granular systems with a large range of particle sizes (though it may be
possible to represent effective aggregates of grains as the unit cell size).
The stochastic framework partly negates the speed advantage of deterministic
models such as lattice gas automata. Nonetheless, there remains a wide
variety of problems that can usefully be addressed with a pairwise CTS
approach.</p>
      <p>As a software implementation of the pairwise CTS concept, CellLab-CTS offers
several practical capabilities. Its overall design makes the process of
building a CTS application quite simple. A user needs only to write a
relatively short Python script that contains (1) a definition of cell states,
(2) definitions of the transitions involved, (3) a function that initializes,
runs, and plots (and/or saves) output from the resulting model, and
optionally (4) a callback function that updates any user-defined data upon
each transition. CellLab-CTS users can choose between raster and hex grids,
and between oriented and non-oriented models. The ability to switch between
grid types makes it possible to test whether the grid type has any influence on
the solutions, and if so, to correct for it. The fact that CellLab-CTS is
built on Landlab means that a user can take advantage of Landlab's various
tools, such as reading of input parameters from a formatted text file using
the ModelParameterDictionary tool, and writing of output to standard file
formats such as netCDF and VTK. These capabilities speed the development
process, while also allowing users to take advantage of Python's extensive
visualization and analysis libraries (such as matplotlib, mayavi, pandas, and
bokeh) as well as Landlab's more specialized visualization routines.</p>
      <p>Another novel feature of CellLab-CTS is the ability to assign properties
(including continuum values) to the grid nodes, and to update these
properties dynamically using a callback-function approach. The
property-tracking capability is complemented with the ability to treat
certain node states as moving particles and to track their trajectories. Any
properties associated with such particles automatically move with them. These
capabilities are especially useful in modeling assemblages of grains: a
common use for cellular automata in geomorphology and granular mechanics
<xref ref-type="bibr" rid="bib1.bibx23" id="paren.40"><named-content content-type="pre">e.g.,</named-content></xref>. <?xmltex \hack{\newpage}?></p>
      <p>CellLab-CTS has some important limitations that could be addressed in future
versions. Unlike the ReSCAL software of <xref ref-type="bibr" rid="bib1.bibx55" id="text.41"/>, the 2015
version of CellLab-CTS is restricted to two-dimensional applications (this is
actually a limitation of the current version of Landlab; once Landlab itself
provides for 3-D grids, adaptation of CellLab-CTS to 3-D will be essentially
automatic). CellLab-CTS 2015 was written completely in Python, and lacks the
speed advantage of a compiled language. Although CellLab-CTS, like Landlab,
makes use of the NumPy library for speed and efficiency, the nature of the
discrete-event simulation algorithms do not lend themselves to array
operations; by definition, the CTS concept is an event-by-event approach. The
speed limitation could be improved by translating CellLab-CTS's core routines
into a compiled language such as Cython or C<inline-formula><mml:math display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula>, while preserving the
flexibility of Python interfaces and libraries.</p>
      <p>One limitation of CellLab-CTS that applies to granular-flow and
sediment-transport problems is the present lack of a <italic>binary</italic> transition
rule, in which a particular transition has a certain probability of not
occurring at all, even if the states of the neighboring cells remain
unchanged. Imagine closing your eyes and placing a pebble on a steep
hillslope. Depending on the microtopography, the pebble might end up in a
stable location, or it might end up rolling partway down the hill. If placed
in a stable location, the pebble will not move until and unless something in
its immediate neighborhood changes. This type of <italic>either-or</italic> situation
could be implemented by modifying the transition rules to include a
conditional probability of occurrence. A particular transition would be
scheduled only with probability <inline-formula><mml:math display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>T</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Such an approach would, for example,
allow for a more realistic angle of repose in the lattice-grain model.</p>
</sec>
<sec id="Ch1.S7" sec-type="conclusions">
  <title>Conclusions</title>
      <p>CellLab-CTS 2015 is a Landlab module that implements pairwise,
continuous-time stochastic (CTS) cellular automata in two dimensions.
CellLab-CTS enables researchers to efficiently create and explore CTS models
by writing a short Python script that encodes the states, transition rules,
and rates. The choice of square or hexagonal cells gives users control over
grid symmetry. CellLab-CTS also provides the capability to represent moving
particles, to assign user-defined properties to these particles, and to
update these properties after each transition with a user-defined callback
function. Integration with Landlab means that CellLab-CTS users can take
advantage of a suite of capabilities, including input and output in
standardized formats, and coupling with other Landlab components.</p>
<sec id="Ch1.S7.SSx1" specific-use="unnumbered">
  <title>Code availability</title>
      <p>CellLab-CTS 2015 is contained within Landlab version 0.1.28. The source code
for version 0.1.28, which was released in September 2015, is provided in a
git repository hosted on GitHub at
<uri>https://github.com/landlab/landlab/tree/v0.1.28</uri> (the latest development
version of Landlab is always available at
<uri>http://github.com/landlab/landlab</uri>). Documentation and installation
instructions for the most current release version of Landlab (including
CellLab-CTS) are provided at <uri>http://landlab.github.io</uri>. Code for the
examples presented in this paper can be found at
<uri>https://github.com/landlab/pub_tucker_etal_gmd</uri>. Software dependencies
are listed at <uri>https://landlab.github.io</uri> under <italic>Install</italic>. To the
best of our knowledge, Landlab and CellLab-CTS will operate on any system
that meets these software requirements; as of this writing, Landlab is known
to work on recent-generation Mac, Linux, and Windows platforms. Landlab and
its components, including CellLab-CTS, are distributed under an MIT
open-source license.</p>
</sec>
</sec>

      
      </body>
    <back><ack><title>Acknowledgements</title><p>This research was supported by the US National Science Foundation
(ACI-1147454, ACI-1450409). Harrison Gray inspired the luminescence example.
Clement Narteau introduced the first author to the <italic>doublet technique</italic>
during a meeting on Earth Surface Process in Roscoff, France, in 2009. We
thank Clement Narteau and Tom Coulthard for helpful
reviews.<?xmltex \hack{\newline}?><?xmltex \hack{\newline}?>Edited by: H. McMillan</p></ack><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Alonso and Herrmann(1996)</label><mixed-citation>Alonso, J. and Herrmann, H.: Shape of the tail of a two-dimensional sandpile,
Phys. Rev. Lett., 76, 4911,  <ext-link xlink:href="http://dx.doi.org/10.1103/PhysRevLett.76.4911" ext-link-type="DOI">10.1103/PhysRevLett.76.4911</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx2"><label>Anderson(1990)</label><mixed-citation>
Anderson, R. S.: Eolian ripples as examples of self-organization in
geomorphological systems, Earth-Sci. Rev., 29, 77–96, 1990.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Anderson and Bunas(1993)</label><mixed-citation>
Anderson, R. S. and Bunas, K. L.: Grain size segregation and stratigraphy in
aeolian ripples modelled with a cellular automaton, Nature, 365, 740–743,
1993.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>Ashton et al.(2001)</label><mixed-citation>
Ashton, A., Murray, A. B., and Arnoult, O.: Formation of coastline features
by
large-scale instabilities induced by high-angle waves, Nature, 414, 296–300,
2001.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>Bailey and Arnold(2006)</label><mixed-citation>
Bailey, R. and Arnold, L.: Statistical modelling of single grain quartz
distributions and an assessment of procedures for estimating burial dose,
Quaternary Sci. Rev., 25, 2475–2502, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Baxter and Behringer(1990)</label><mixed-citation>Baxter, G. W. and Behringer, R.: Cellular automata models of granular flow,
Phys. Rev.w A, 42, 1017, <ext-link xlink:href="http://dx.doi.org/10.1103/PhysRevA.42.1017" ext-link-type="DOI">10.1103/PhysRevA.42.1017</ext-link>, 1990.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Baxter and Behringer(1991)</label><mixed-citation>
Baxter, G. W. and Behringer, R.: Cellular automata models for the flow of
granular materials, Physica D, 51, 465–471, 1991.</mixed-citation></ref>
      <ref id="bib1.bibx8"><label>Caracciolo et al.(2014)</label><mixed-citation>
Caracciolo, D., Noto, L. V., Istanbulluoglu, E., Fatichi, S., and Zhou, X.:
Climate change and Ecotone boundaries: Insights from a cellular automata
ecohydrology model in a Mediterranean catchment with topography controlled
vegetation patterns, Adv. Water Resour., 73, 159–175, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Chase(1992)</label><mixed-citation>
Chase, C. G.: Fluvial landsculpting and the fractal dimension of topography,
Geomorphology, 5, 39–57, 1992.</mixed-citation></ref>
      <ref id="bib1.bibx10"><label>Chen and Doolen(1998)</label><mixed-citation>
Chen, S. and Doolen, G. D.: Lattice Boltzmann method for fluid flows, Ann.
Rev. Fluid Mech., 30, 329–364, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Chopard and Droz(1998)</label><mixed-citation>
Chopard, B. and Droz, M.: Cellular automata, Springer, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>Cottenceau and Désérable(2010)</label><mixed-citation>
Cottenceau, G. and Désérable, D.: Open environment for 2d
lattice-grain
CA, in: Cellular Automata,  Springer,  12–23, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Coulthard and Van De Wiel(2006)</label><mixed-citation>
Coulthard, T. and Van De Wiel, M.: A cellular model of river meandering,
Earth Surf. Process.  Landf., 31, 123–132, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx14"><label>Coulthard et al.(1996)</label><mixed-citation>
Coulthard, T., Kirkby, M., and Macklin, M.: A cellular automaton landscape
evolution model, in: Proceedings of the First International Conference on
GeoComputation, vol. 1,  248–281, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx15"><label>Coulthard et al.(2002)</label><mixed-citation>
Coulthard, T., Macklin, M., and Kirkby, M.: A cellular model of Holocene
upland
river basin and alluvial fan evolution, Earth Surf. Process.
Landf., 27, 269–288, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Coulthard et al.(2007)</label><mixed-citation>
Coulthard, T., Hicks, D., and Van De Wiel, M.: Cellular modelling of river
catchments and reaches: advantages, limitations and prospects,
Geomorphology, 90, 192–207, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx17"><label>Dearing et al.(2006)</label><mixed-citation>
Dearing, J., Richmond, N., Plater, A., Wolf, J., Prandle, D., and Coulthard,
T.: Modelling approaches for coastal simulation based on cellular automata:
the need and potential, Philosophical Transactions of the Royal Society of
London A: Mathematical, Phys. Engineering. Sci., 364, 1051–1071,
2006.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Désérable(2002)</label><mixed-citation>
Désérable, D.: A versatile two-dimensional cellular automata network
for granular flow, SIAM J. Appl. Math., 4, 1414–1436, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx19"><label>Désérable et al.(2011)</label><mixed-citation>
Désérable, D., Dupont, P., Hellou, M., and Kamali-Bernard, S.:
Cellular
automata in complex matter, Complex Systems, 20, 67–91,
2011.</mixed-citation></ref>
      <ref id="bib1.bibx20"><label>d'Humieres et al.(1986)</label><mixed-citation>
d'Humieres, D., Lallemand, P., and Frisch, U.: Lattice gas models for 3D
hydrodynamics, Europhys. Lett., 2, 291–297, 1986.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>Fitt and Wilmott(1992)</label><mixed-citation>Fitt, A. and Wilmott, P.: Cellular-automaton model for segregation of a
two-species granular flow, Phys. Rev. A, 45, 2383, <ext-link xlink:href="http://dx.doi.org/10.1103/PhysRevA.45.2383" ext-link-type="DOI">10.1103/PhysRevA.45.2383</ext-link>,
1992.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>Frisch et al.(1986)</label><mixed-citation>Frisch, U., Hasslacher, B., and Pomeau, Y.: Lattice-gas automata for the
Navier-Stokes equation, Phys. Rev. Lett., 56, 1505–1508, <ext-link xlink:href="http://dx.doi.org/10.1103/PhysRevLett.56.1505" ext-link-type="DOI">10.1103/PhysRevLett.56.1505</ext-link>,
1986.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Furbish and Haff(2010)</label><mixed-citation>Furbish, D. and Haff, P.: From divots to swales: Hillslope sediment transport
across divers length scales, J. Geophys. Res., 115, F03001,
<ext-link xlink:href="http://dx.doi.org/10.1029/2009JF001576" ext-link-type="DOI">10.1029/2009JF001576</ext-link>,
2010.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Furbish et al.(2012)</label><mixed-citation>Furbish, D. J., Haff, P. K., Roseberry, J. C., and Schmeeckle, M. W.: A
probabilistic description of the bed load sediment flux: 1. Theory, J.
Geophys. Res.-Earth, 117, F3, <ext-link xlink:href="http://dx.doi.org/10.1029/2012JF002352" ext-link-type="DOI">10.1029/2012JF002352</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>Gutt and Haff(1990)</label><mixed-citation>
Gutt, G. and Haff, P.: An automata model of granular materials, in:
Proceedings
of the fifth distributed memory computing conference, edited by: Walker, D. W. and  Stout, Q. F., 629 pp., ISBN 0-8186-2113-3, 1990.  522–529, IEEE Computer Society; Los Alamitos, CA (United States),
1990 Society of Petroleum Engineers (SPE) California regional meeting,  Ventura, CA (United States),  4–6 April 1990; CONF-9004156–, IEEE Computer Society, 10662 Los Vaqueros Circle,
Los Alamitos, CA 90720, United States,
1990.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Hethcote(2000)</label><mixed-citation>
Hethcote, H. W.: The mathematics of infectious diseases, SIAM Review, 42,
599–653, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Jasti and Higgs(2006)</label><mixed-citation>
Jasti, V. K. and Higgs, C. F.: A lattice-based cellular automata modeling
approach for granular flow lubrication, J. Tribology, 128, 358–364,
2006.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Jasti and Higgs III(2010)</label><mixed-citation>
Jasti, V. K. and Higgs III, C. F.: A fast first order model of a rough
annular
shear cell using cellular automata, Granul. Matter, 12, 97–106, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Jerolmack and Paola(2007)</label><mixed-citation>
Jerolmack, D. and Paola, C.: Complexity in a cellular model of river
avulsion, Geomorphology, 91, 259–270, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Jyotsna and Haff(1997)</label><mixed-citation>
Jyotsna, R. and Haff, P.: Microtopography as an indicator of modern hillslope
diffusivity in arid terrain, Geology, 25, 695–698, 1997.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Karimabadi et al.(2005)</label><mixed-citation>
Karimabadi, H., Driscoll, J., Omelchenko, Y. A., and Omidi, N.: A new
asynchronous methodology for modeling of physical systems: breaking the curse
of courant condition, J. Comput. Phys., 205, 755–775, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Károlyi and Kertész(1998)</label><mixed-citation>Károlyi, A. and Kertész, J.: Lattice-gas model of avalanches in a
granular pile, Phys. Rev. E, 57, 852–856,   <ext-link xlink:href="http://dx.doi.org/10.1103/PhysRevE.57.852" ext-link-type="DOI">10.1103/PhysRevE.57.852</ext-link>,
1998.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>Károlyi and Kertész(1999)</label><mixed-citation>
Károlyi, A. and Kertész, J.: Granular medium lattice gas model: the
algorithm, Comput. Phys. Commun., 121, 290–293, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx34"><label>Károlyi et al.(1998)</label><mixed-citation>
Károlyi, A., Kertész, J., Havlin, S., Makse, H. A., and Stanley,
H. E.:
Filling a silo with a mixture of grains: friction-induced segregation,
Europhys. Lett., 44, 386–392, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx35"><label>Kessler et al.(2001)</label><mixed-citation>
Kessler, M., Murray, A., Werner, B., and Hallet, B.: A model for sorted
circles
as self-organized patterns, J. Geophys. Res.-Sol Ea., 106, 13287–13306, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx36"><label>Kozicki and Tejchman(2005)</label><mixed-citation>
Kozicki, J. and Tejchman, J.: Application of a cellular automaton to
simulations of granular flow in silos, Granul. Matter, 7, 45–54, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx37"><label>LaMarche et al.(2007)LaMarche, Conway, Glasser, and
Shinbrot</label><mixed-citation>
LaMarche, K. R., Conway, S. L., Glasser, B. J., and Shinbrot, T.: Cellular
automata model of gravity-driven granular flows, Granul. Matter, 9,
219–229, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>Landlab Development Team(2016)</label><mixed-citation>Landlab Development Team: Landlab Documentation, available at:
<uri>http://landlab.github.io</uri>, last access: 25 February 2016.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Lebedeva et al.(2007)</label><mixed-citation>
Lebedeva, M., Fletcher, R., Balashov, V., and Brantley, S.: A reactive
diffusion model describing transformation of bedrock to saprolite, Chemical
Geology, 244, 624–645, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Lebedeva et al.(2010)</label><mixed-citation>
Lebedeva, M., Fletcher, R., and Brantley, S.: A mathematical model for
steady-state regolith production at constant erosion rate, Earth Surf.
Process. Landf., 35, 508–524, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx41"><label>Maher(2010)</label><mixed-citation>
Maher, K.: The dependence of chemical weathering rates on fluid residence
time,
Earth   Planet. Sci. Lett., 294, 101–110, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Martinez and Masson(1998)</label><mixed-citation>
Martinez, J. and Masson, S.: Lattice grain models, E &amp; FN Spon, 556–563,
1998.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Murray and Paola(1994)</label><mixed-citation>
Murray, A. and Paola, C.: A cellular model of braided rivers, Nature, 371,
54–57, 1994.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Narteau et al.(2001)</label><mixed-citation>
Narteau, C., Le Mouël, J., Poirier, J., Sepúlveda, E., and Shnirman,
M.: On a small-scale roughness of the core–mantle boundary, Earth
Planet. Sci. Lett., 191, 49–60, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Narteau et al.(2009)</label><mixed-citation>Narteau, C., Zhang, D., Rozier, O., and Claudin, P.: Setting the length and
time scales of a cellular automaton dune model from the analysis of
superimposed bed forms, J. Geophys. Res.-Earth,
114, F3, <ext-link xlink:href="http://dx.doi.org/10.1029/2008JF001127" ext-link-type="DOI">10.1029/2008JF001127</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Nicholas(2005)</label><mixed-citation>
Nicholas, A. P.: Cellular modelling in fluvial geomorphology, Earth Surf.
Process. Landf., 30, 645–649, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Omelchenko and Karimabadi(2006)</label><mixed-citation>
Omelchenko, Y. and Karimabadi, H.: Self-adaptive time integration of
flux-conservative equations with sources, J. Comput. Phys.,
216, 179–194, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Omelchenko and Karimabadi(2007)</label><mixed-citation>
Omelchenko, Y. and Karimabadi, H.: A time-accurate explicit multi-scale
technique for gas dynamics, J. Computat. Phys., 226, 282–300,
2007.</mixed-citation></ref>
      <ref id="bib1.bibx49"><label>Osinov(1994)</label><mixed-citation>
Osinov, V.: A model of a discrete stochastic medium for the problems of loose
material flow, Continuum Mech. Therm., 6, 51–60, 1994.</mixed-citation></ref>
      <ref id="bib1.bibx50"><label>Pandey and Rajaram(2014)</label><mixed-citation>
Pandey, S. and Rajaram, H.: Investigating the influence of subsurface
heterogeneity on chemical weathering in the critical zone using high
resolution reactive transport models, in: AGU Fall Meeting Abstracts, vol. 1,
p. 3599, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx51"><label>Peng and Herrmann(1994)</label><mixed-citation>Peng, G. and Herrmann, H. J.: Density waves of granular flow in a pipe using
lattice-gas automata, Phys. Rev. E, 49, R1796, <ext-link xlink:href="http://dx.doi.org/10.1103/PhysRevE.49.R1796" ext-link-type="DOI">10.1103/PhysRevE.49.R1796</ext-link>,
1994.</mixed-citation></ref>
      <ref id="bib1.bibx52"><label>Plug and Werner(2002)</label><mixed-citation>
Plug, L. J. and Werner, B.: Nonlinear dynamics of ice-wedge networks and
resulting sensitivity to severe cooling events, Nature, 417, 929–933, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx53"><label>Rhodes(2011)</label><mixed-citation>
Rhodes, E. J.: Optically stimulated luminescence dating of sediments over the
past 200,000 years, Ann. Rev. Earth  Pl. Sc., 39,
461–488, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx54"><label>Rothman and Zaleski(2004)</label><mixed-citation>
Rothman, D. H. and Zaleski, S.: Lattice-gas cellular automata: simple models
of
complex hydrodynamics, vol. 5, Cambridge University Press, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx55"><label>Rozier and Narteau(2014)</label><mixed-citation>
Rozier, O. and Narteau, C.: A real-space cellular automaton laboratory, Earth
Surf. Process. Landf., 39, 98–109, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx56"><label>Tucker and Bradley(2010)</label><mixed-citation>Tucker, G. and Bradley, D.: Trouble with diffusion: Reassessing hillslope
erosion laws with a particle-based model, J. Geophys. Res, 115,  F00A10, <ext-link xlink:href="http://dx.doi.org/10.1029/2009JF001264" ext-link-type="DOI">10.1029/2009JF001264</ext-link>,
2010.</mixed-citation></ref>
      <ref id="bib1.bibx57"><label>Von Neumann(1951)</label><mixed-citation>Von Neumann, J.: The general and logical theory of automata, Cerebral
mechanisms in behavior,  1–41, 1951.
 </mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx58"><label>Werner(1995)</label><mixed-citation>
Werner, B.: Eolian dunes: computer simulations and attractor interpretation,
Geology, 23, 1107–1110, 1995.</mixed-citation></ref>
      <ref id="bib1.bibx59"><label>Wolfram(1983)</label><mixed-citation>
Wolfram, S.: Cellular automata, Los Alamos Science, 9, 2–27, 1983.</mixed-citation></ref>
      <ref id="bib1.bibx60"><label>Zhang et al.(2010)</label><mixed-citation>Zhang, D., Narteau, C., and Rozier, O.: Morphodynamics of barchan and
transverse dunes using a cellular automaton model, J. Geophys.
Res.-Earth,   115, F03041, <ext-link xlink:href="http://dx.doi.org/10.1029/2009JF001620" ext-link-type="DOI">10.1029/2009JF001620</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx61"><label>Zhang et al.(2012)</label><mixed-citation>
Zhang, D., Narteau, C., Rozier, O., and du Pont, S. C.: Morphology and
dynamics
of star dunes from numerical modelling, Nat. Geosci., 5, 463–467, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx62"><label>Zhou et al.(2013)</label><mixed-citation>
Zhou, X., Istanbulluoglu, E., and Vivoni, E. R.: Modeling the ecohydrological
role of aspect-controlled radiation on tree-grass-shrub coexistence in a
semiarid climate, Water Resour. Res., 49, 2872–2895, 2013.</mixed-citation></ref>

  </ref-list><app-group content-type="float"><app><title/>

    </app></app-group></back>
    <!--<article-title-html>CellLab-CTS 2015: continuous-time stochastic cellular automaton modeling using Landlab</article-title-html>
<abstract-html><p class="p">CellLab-CTS 2015 is a Python-language software library for creating
two-dimensional, continuous-time stochastic (CTS) cellular automaton models.
The model domain consists of a set of grid nodes, with each node assigned an
integer state code that represents its condition or composition. Adjacent
pairs of nodes may undergo transitions to different states, according to a
user-defined average transition rate. A model is created by writing a Python
code that defines the possible states, the transitions, and the rates of
those transitions. The code instantiates, initializes, and runs one of four
object classes that represent different types of CTS models. CellLab-CTS
provides the option of using either square or hexagonal grid cells. The
software provides the ability to treat particular grid-node states as moving
particles, and to track their position over time. Grid nodes may also be
assigned user-defined properties, which the user can update after each
transition through the use of a callback function. As a component of the
Landlab modeling framework, CellLab-CTS models take advantage of a suite of
Landlab's tools and capabilities, such as support for standardized input and
output.</p></abstract-html>
<ref-html id="bib1.bib1"><label>Alonso and Herrmann(1996)</label><mixed-citation>
Alonso, J. and Herrmann, H.: Shape of the tail of a two-dimensional sandpile,
Phys. Rev. Lett., 76, 4911,  <a href="http://dx.doi.org/10.1103/PhysRevLett.76.4911" target="_blank">doi:10.1103/PhysRevLett.76.4911</a>, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Anderson(1990)</label><mixed-citation>
Anderson, R. S.: Eolian ripples as examples of self-organization in
geomorphological systems, Earth-Sci. Rev., 29, 77–96, 1990.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Anderson and Bunas(1993)</label><mixed-citation>
Anderson, R. S. and Bunas, K. L.: Grain size segregation and stratigraphy in
aeolian ripples modelled with a cellular automaton, Nature, 365, 740–743,
1993.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Ashton et al.(2001)</label><mixed-citation>
Ashton, A., Murray, A. B., and Arnoult, O.: Formation of coastline features
by
large-scale instabilities induced by high-angle waves, Nature, 414, 296–300,
2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Bailey and Arnold(2006)</label><mixed-citation>
Bailey, R. and Arnold, L.: Statistical modelling of single grain quartz
distributions and an assessment of procedures for estimating burial dose,
Quaternary Sci. Rev., 25, 2475–2502, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Baxter and Behringer(1990)</label><mixed-citation>
Baxter, G. W. and Behringer, R.: Cellular automata models of granular flow,
Phys. Rev.w A, 42, 1017, <a href="http://dx.doi.org/10.1103/PhysRevA.42.1017" target="_blank">doi:10.1103/PhysRevA.42.1017</a>, 1990.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Baxter and Behringer(1991)</label><mixed-citation>
Baxter, G. W. and Behringer, R.: Cellular automata models for the flow of
granular materials, Physica D, 51, 465–471, 1991.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Caracciolo et al.(2014)</label><mixed-citation>
Caracciolo, D., Noto, L. V., Istanbulluoglu, E., Fatichi, S., and Zhou, X.:
Climate change and Ecotone boundaries: Insights from a cellular automata
ecohydrology model in a Mediterranean catchment with topography controlled
vegetation patterns, Adv. Water Resour., 73, 159–175, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Chase(1992)</label><mixed-citation>
Chase, C. G.: Fluvial landsculpting and the fractal dimension of topography,
Geomorphology, 5, 39–57, 1992.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Chen and Doolen(1998)</label><mixed-citation>
Chen, S. and Doolen, G. D.: Lattice Boltzmann method for fluid flows, Ann.
Rev. Fluid Mech., 30, 329–364, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Chopard and Droz(1998)</label><mixed-citation>
Chopard, B. and Droz, M.: Cellular automata, Springer, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Cottenceau and Désérable(2010)</label><mixed-citation>
Cottenceau, G. and Désérable, D.: Open environment for 2d
lattice-grain
CA, in: Cellular Automata,  Springer,  12–23, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Coulthard and Van De Wiel(2006)</label><mixed-citation>
Coulthard, T. and Van De Wiel, M.: A cellular model of river meandering,
Earth Surf. Process.  Landf., 31, 123–132, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Coulthard et al.(1996)</label><mixed-citation>
Coulthard, T., Kirkby, M., and Macklin, M.: A cellular automaton landscape
evolution model, in: Proceedings of the First International Conference on
GeoComputation, vol. 1,  248–281, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Coulthard et al.(2002)</label><mixed-citation>
Coulthard, T., Macklin, M., and Kirkby, M.: A cellular model of Holocene
upland
river basin and alluvial fan evolution, Earth Surf. Process.
Landf., 27, 269–288, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Coulthard et al.(2007)</label><mixed-citation>
Coulthard, T., Hicks, D., and Van De Wiel, M.: Cellular modelling of river
catchments and reaches: advantages, limitations and prospects,
Geomorphology, 90, 192–207, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Dearing et al.(2006)</label><mixed-citation>
Dearing, J., Richmond, N., Plater, A., Wolf, J., Prandle, D., and Coulthard,
T.: Modelling approaches for coastal simulation based on cellular automata:
the need and potential, Philosophical Transactions of the Royal Society of
London A: Mathematical, Phys. Engineering. Sci., 364, 1051–1071,
2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Désérable(2002)</label><mixed-citation>
Désérable, D.: A versatile two-dimensional cellular automata network
for granular flow, SIAM J. Appl. Math., 4, 1414–1436, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Désérable et al.(2011)</label><mixed-citation>
Désérable, D., Dupont, P., Hellou, M., and Kamali-Bernard, S.:
Cellular
automata in complex matter, Complex Systems, 20, 67–91,
2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>d'Humieres et al.(1986)</label><mixed-citation>
d'Humieres, D., Lallemand, P., and Frisch, U.: Lattice gas models for 3D
hydrodynamics, Europhys. Lett., 2, 291–297, 1986.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Fitt and Wilmott(1992)</label><mixed-citation>
Fitt, A. and Wilmott, P.: Cellular-automaton model for segregation of a
two-species granular flow, Phys. Rev. A, 45, 2383, <a href="http://dx.doi.org/10.1103/PhysRevA.45.2383" target="_blank">doi:10.1103/PhysRevA.45.2383</a>,
1992.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Frisch et al.(1986)</label><mixed-citation>
Frisch, U., Hasslacher, B., and Pomeau, Y.: Lattice-gas automata for the
Navier-Stokes equation, Phys. Rev. Lett., 56, 1505–1508, <a href="http://dx.doi.org/10.1103/PhysRevLett.56.1505" target="_blank">doi:10.1103/PhysRevLett.56.1505</a>,
1986.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Furbish and Haff(2010)</label><mixed-citation>
Furbish, D. and Haff, P.: From divots to swales: Hillslope sediment transport
across divers length scales, J. Geophys. Res., 115, F03001,
<a href="http://dx.doi.org/10.1029/2009JF001576" target="_blank">doi:10.1029/2009JF001576</a>,
2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Furbish et al.(2012)</label><mixed-citation>
Furbish, D. J., Haff, P. K., Roseberry, J. C., and Schmeeckle, M. W.: A
probabilistic description of the bed load sediment flux: 1. Theory, J.
Geophys. Res.-Earth, 117, F3, <a href="http://dx.doi.org/10.1029/2012JF002352" target="_blank">doi:10.1029/2012JF002352</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Gutt and Haff(1990)</label><mixed-citation>
Gutt, G. and Haff, P.: An automata model of granular materials, in:
Proceedings
of the fifth distributed memory computing conference, edited by: Walker, D. W. and  Stout, Q. F., 629 pp., ISBN 0-8186-2113-3, 1990.  522–529, IEEE Computer Society; Los Alamitos, CA (United States),
1990 Society of Petroleum Engineers (SPE) California regional meeting,  Ventura, CA (United States),  4–6 April 1990; CONF-9004156–, IEEE Computer Society, 10662 Los Vaqueros Circle,
Los Alamitos, CA 90720, United States,
1990.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Hethcote(2000)</label><mixed-citation>
Hethcote, H. W.: The mathematics of infectious diseases, SIAM Review, 42,
599–653, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Jasti and Higgs(2006)</label><mixed-citation>
Jasti, V. K. and Higgs, C. F.: A lattice-based cellular automata modeling
approach for granular flow lubrication, J. Tribology, 128, 358–364,
2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Jasti and Higgs III(2010)</label><mixed-citation>
Jasti, V. K. and Higgs III, C. F.: A fast first order model of a rough
annular
shear cell using cellular automata, Granul. Matter, 12, 97–106, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Jerolmack and Paola(2007)</label><mixed-citation>
Jerolmack, D. and Paola, C.: Complexity in a cellular model of river
avulsion, Geomorphology, 91, 259–270, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Jyotsna and Haff(1997)</label><mixed-citation>
Jyotsna, R. and Haff, P.: Microtopography as an indicator of modern hillslope
diffusivity in arid terrain, Geology, 25, 695–698, 1997.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Karimabadi et al.(2005)</label><mixed-citation>
Karimabadi, H., Driscoll, J., Omelchenko, Y. A., and Omidi, N.: A new
asynchronous methodology for modeling of physical systems: breaking the curse
of courant condition, J. Comput. Phys., 205, 755–775, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Károlyi and Kertész(1998)</label><mixed-citation>
Károlyi, A. and Kertész, J.: Lattice-gas model of avalanches in a
granular pile, Phys. Rev. E, 57, 852–856,   <a href="http://dx.doi.org/10.1103/PhysRevE.57.852" target="_blank">doi:10.1103/PhysRevE.57.852</a>,
1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Károlyi and Kertész(1999)</label><mixed-citation>
Károlyi, A. and Kertész, J.: Granular medium lattice gas model: the
algorithm, Comput. Phys. Commun., 121, 290–293, 1999.
</mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Károlyi et al.(1998)</label><mixed-citation>
Károlyi, A., Kertész, J., Havlin, S., Makse, H. A., and Stanley,
H. E.:
Filling a silo with a mixture of grains: friction-induced segregation,
Europhys. Lett., 44, 386–392, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Kessler et al.(2001)</label><mixed-citation>
Kessler, M., Murray, A., Werner, B., and Hallet, B.: A model for sorted
circles
as self-organized patterns, J. Geophys. Res.-Sol Ea., 106, 13287–13306, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Kozicki and Tejchman(2005)</label><mixed-citation>
Kozicki, J. and Tejchman, J.: Application of a cellular automaton to
simulations of granular flow in silos, Granul. Matter, 7, 45–54, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>LaMarche et al.(2007)LaMarche, Conway, Glasser, and
Shinbrot</label><mixed-citation>
LaMarche, K. R., Conway, S. L., Glasser, B. J., and Shinbrot, T.: Cellular
automata model of gravity-driven granular flows, Granul. Matter, 9,
219–229, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Landlab Development Team(2016)</label><mixed-citation>
Landlab Development Team: Landlab Documentation, available at:
<a href="http://landlab.github.io" target="_blank">http://landlab.github.io</a>, last access: 25 February 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Lebedeva et al.(2007)</label><mixed-citation>
Lebedeva, M., Fletcher, R., Balashov, V., and Brantley, S.: A reactive
diffusion model describing transformation of bedrock to saprolite, Chemical
Geology, 244, 624–645, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Lebedeva et al.(2010)</label><mixed-citation>
Lebedeva, M., Fletcher, R., and Brantley, S.: A mathematical model for
steady-state regolith production at constant erosion rate, Earth Surf.
Process. Landf., 35, 508–524, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Maher(2010)</label><mixed-citation>
Maher, K.: The dependence of chemical weathering rates on fluid residence
time,
Earth   Planet. Sci. Lett., 294, 101–110, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Martinez and Masson(1998)</label><mixed-citation>
Martinez, J. and Masson, S.: Lattice grain models, E &amp; FN Spon, 556–563,
1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Murray and Paola(1994)</label><mixed-citation>
Murray, A. and Paola, C.: A cellular model of braided rivers, Nature, 371,
54–57, 1994.
</mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Narteau et al.(2001)</label><mixed-citation>
Narteau, C., Le Mouël, J., Poirier, J., Sepúlveda, E., and Shnirman,
M.: On a small-scale roughness of the core–mantle boundary, Earth
Planet. Sci. Lett., 191, 49–60, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Narteau et al.(2009)</label><mixed-citation>
Narteau, C., Zhang, D., Rozier, O., and Claudin, P.: Setting the length and
time scales of a cellular automaton dune model from the analysis of
superimposed bed forms, J. Geophys. Res.-Earth,
114, F3, <a href="http://dx.doi.org/10.1029/2008JF001127" target="_blank">doi:10.1029/2008JF001127</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Nicholas(2005)</label><mixed-citation>
Nicholas, A. P.: Cellular modelling in fluvial geomorphology, Earth Surf.
Process. Landf., 30, 645–649, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Omelchenko and Karimabadi(2006)</label><mixed-citation>
Omelchenko, Y. and Karimabadi, H.: Self-adaptive time integration of
flux-conservative equations with sources, J. Comput. Phys.,
216, 179–194, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Omelchenko and Karimabadi(2007)</label><mixed-citation>
Omelchenko, Y. and Karimabadi, H.: A time-accurate explicit multi-scale
technique for gas dynamics, J. Computat. Phys., 226, 282–300,
2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Osinov(1994)</label><mixed-citation>
Osinov, V.: A model of a discrete stochastic medium for the problems of loose
material flow, Continuum Mech. Therm., 6, 51–60, 1994.
</mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Pandey and Rajaram(2014)</label><mixed-citation>
Pandey, S. and Rajaram, H.: Investigating the influence of subsurface
heterogeneity on chemical weathering in the critical zone using high
resolution reactive transport models, in: AGU Fall Meeting Abstracts, vol. 1,
p. 3599, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Peng and Herrmann(1994)</label><mixed-citation>
Peng, G. and Herrmann, H. J.: Density waves of granular flow in a pipe using
lattice-gas automata, Phys. Rev. E, 49, R1796, <a href="http://dx.doi.org/10.1103/PhysRevE.49.R1796" target="_blank">doi:10.1103/PhysRevE.49.R1796</a>,
1994.
</mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Plug and Werner(2002)</label><mixed-citation>
Plug, L. J. and Werner, B.: Nonlinear dynamics of ice-wedge networks and
resulting sensitivity to severe cooling events, Nature, 417, 929–933, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Rhodes(2011)</label><mixed-citation>
Rhodes, E. J.: Optically stimulated luminescence dating of sediments over the
past 200,000 years, Ann. Rev. Earth  Pl. Sc., 39,
461–488, 2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Rothman and Zaleski(2004)</label><mixed-citation>
Rothman, D. H. and Zaleski, S.: Lattice-gas cellular automata: simple models
of
complex hydrodynamics, vol. 5, Cambridge University Press, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Rozier and Narteau(2014)</label><mixed-citation>
Rozier, O. and Narteau, C.: A real-space cellular automaton laboratory, Earth
Surf. Process. Landf., 39, 98–109, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib56"><label>Tucker and Bradley(2010)</label><mixed-citation>
Tucker, G. and Bradley, D.: Trouble with diffusion: Reassessing hillslope
erosion laws with a particle-based model, J. Geophys. Res, 115,  F00A10, <a href="http://dx.doi.org/10.1029/2009JF001264" target="_blank">doi:10.1029/2009JF001264</a>,
2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib57"><label>Von Neumann(1951)</label><mixed-citation>
Von Neumann, J.: The general and logical theory of automata, Cerebral
mechanisms in behavior,  1–41, 1951.

</mixed-citation></ref-html>
<ref-html id="bib1.bib58"><label>Werner(1995)</label><mixed-citation>
Werner, B.: Eolian dunes: computer simulations and attractor interpretation,
Geology, 23, 1107–1110, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib59"><label>Wolfram(1983)</label><mixed-citation>
Wolfram, S.: Cellular automata, Los Alamos Science, 9, 2–27, 1983.
</mixed-citation></ref-html>
<ref-html id="bib1.bib60"><label>Zhang et al.(2010)</label><mixed-citation>
Zhang, D., Narteau, C., and Rozier, O.: Morphodynamics of barchan and
transverse dunes using a cellular automaton model, J. Geophys.
Res.-Earth,   115, F03041, <a href="http://dx.doi.org/10.1029/2009JF001620" target="_blank">doi:10.1029/2009JF001620</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib61"><label>Zhang et al.(2012)</label><mixed-citation>
Zhang, D., Narteau, C., Rozier, O., and du Pont, S. C.: Morphology and
dynamics
of star dunes from numerical modelling, Nat. Geosci., 5, 463–467, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib62"><label>Zhou et al.(2013)</label><mixed-citation>
Zhou, X., Istanbulluoglu, E., and Vivoni, E. R.: Modeling the ecohydrological
role of aspect-controlled radiation on tree-grass-shrub coexistence in a
semiarid climate, Water Resour. Res., 49, 2872–2895, 2013.
</mixed-citation></ref-html>--></article>
