Online Material
Appendix A: Model construction
A.1 Data structure
Each vertex in the model has a unique index N and six arrays assigned to it: a position array [X,Y], vertex age array, link array (containing indices of vertices connected to the vertex), two linktype arrays (one for each spatial dimension), determining the type of connections of vertex N to vertices in the link array, and a connection age array, containing the age of connections to vertices in the link array. The values in the linktype and connection age arrays describe connections with vertices whose index occupies a corresponding location in the link array. The values in the linktype array can be either 0, 1 or 1. Zero means that the connection is within the domain, while 1 is a crossboundary connection directed from vertex Nthrough the right/upper boundary and 1 means a connection through the left/lower boundary. It follows that vertices on the opposite sides of a crossboundary connection have opposite corresponding linktype values (1and 1).
A.2 Time evolution
Movement of vertices in the domain is restricted to motion towards one of the neighbouring vertices, that is along triangle sides. When a vertex crosses a domain boundary it reappears on the opposite side, with its link type arrays and link type arrays of vertices connected to it updated accordingly. We apply two kinds of motion schemes: random motion and cellcompetition. Moreover, each scheme has two different versions of vertex movement: constant velocity and constant acceleration. We label them shortly CA, CV, RAand RV for cell competition constant acceleration, cell competition constant velocity, random walk constant acceleration and random walk constant velocity, respectively. The RV algorithm is as follows: for each vertex a neighbour is chosen randomly and the vertex is moved towards that neighbour by a random displacement (a uniformly distributed random number between 0 and 0.28, the domain size is ). For the CVscheme, the vertex is moved towards its closest neighbour by a constant displacement ( ). If the step is larger than the distance between the vertex and the neighbour towards which it is being moved, we merge the vertices (see Sect. 3.2.4 for vertex merging process description). In case of constant acceleration schemes, the movement of a vertex in each timestep is the projection of a vector sum of all previous displacements of the vertex on the triangle side along which the vertex is moved plus (which is the same as in constant velocity case for corresponding models). To prevent 'cell flipping', which happens when a vertex crosses a connection between two other vertices (thus destroying the triangular topology), we introduce the following scheme, illustrated in Fig. A.1.Figure A.1: Illustration of the procedure preventing cellflipping. See text for details. 

Open with DEXTER 
A.3 Cell vanishing  vertex merging
In order to allow for vanishing of cells, we have to define a procedure and criteria for the merging of vertices. After a vertex has moved towards one of its neighbours, the distance between them is measured. If it is below a critical value (free parameter, unless stated otherwise ; the domain size is ), the vertices are merged so that one of the vertices and all the associated array structures vanish and are removed form the data structure. For all common neighbours of the merging vertices, the reference to the disappearing one in the link and other arrays is removed. For all other vertices connected to the disappearing vertex, its reference in the associated link arrays is changed to the remaining, ``merged'' vertex. In ``pathological'' cases, as illustrated in Fig. A.2, when the merging vertices (A and B) have more than two common neighbours (C  E), we have to remove all vertices which are connected to only one other vertex besides A and B (in this case, vertex D). Otherwise, vertices like D would be connected to only two vertices after A and B had merged, thus breaking the triangular topology.Figure A.2: 'Pathological' case of a vertex merger. For details see text. 

Open with DEXTER 
As the age of vertices and lanes (connections) in the model is used to detect mesogranulation in a way similar to the cork method applied in observations and simulations, it is important to define the age inheritance rules properly. Corks are artificial particles which are advected passively on a horizontal plane by the velocity field. They tend to accumulate in downflow regions i.e. downflow lanes and vertices separating granules (Cattaneo et al. 2001; Rieutord et al. 2000; Roudier et al. 2003; Ploner et al. 2000). We postulate a relation between the number of corks accumulated in a downflow structure and its age: the older the structure the more corks it is likely to attract. It follows that when two lanes or vertices merge, the corks naturally remain in the merged lane or vertex. Hence, when two vertices Aand B merge (Fig. A.2), we keep the older age of the connections AE and BE as the age of the new connection of the merged vertex with E, and similarly for C. The age of the merged vertex is also the older age of vertices A and B. The merged vertex inherits the neighbours of both A and B (with link and age arrays updated accordingly). We do not allow vertices to have multiple references to another vertex (a link array has to have unique entries); therefore, the domain has to be bigger than vertices. This also leads to errors in case of ``domain collapse'', when merging of vertices produces a few giant cells and vertices from opposing ends of domain become connected also through the domain. Such case is neither interesting nor sought for, and with proper cell splitting rules it never occurs.
A.4 Cell splitting  vertex appearance
Since the construction of the twodimensional model allows for many different schemes for cell splitting, it is reasonable to investigate what differences those schemes produce, both in the granulation characteristics, as well as in the emerging mesogranulation features. Hence, we apply four different cell splitting schemes: critical cell side length, critical cell area, critical cell area plus the longest side, and random splitting. We label them L, A, AL and R, respectively. Thus, a cellcompetition constant acceleration model with random splitting is labelled CA/R etc.A.4.1 Critical cell side length (L)
When a connection between two vertices A and B (see Fig. A.3) exceeds a critical length (an uniformly distributed random number between 2and 3.5, evaluated individually for each connection at each timestep; the box size is ), the following splitting procedure is initiated: first, two unitary vectors , perpendicular to are determined (thick arrows). Next, the common neighbour of A and B with the smallest (sum of distances to A and B) is found (Cin Fig. A.3).Figure A.3: Illustration of the splitting process, with new vertex X appearing between vertices A and B. Dashed lines are the new connections appearing. 

Open with DEXTER 
A.4.2 Critical cell area (A)
In this scheme the cell is split when it exceeds a critical area value (a uniformly distributed random number between 1.5 and 2.5; the box size is ). The splitting partner cell is chosen to be the neighbour with the largest area. The rules of new vertex position and age inheritance of new structures are like in the ``critical side length'' splitting case.
A.4.3 Critical cell area plus the longest side (AL)
The cell is split when it exceeds a critical area value, and the splitting occurs through the longest side of the cell (in Fig. A.3 the ``splitting connection'' AB is chosen to be the longest side of the cell), regardless of the area of the neighbour sharing the side with the cell. The rules of new vertex position and age inheritance of new structures are like in the `critical side length' splitting case.
A.4.4 Random splitting (R)
In this scheme the splitting is not based on any cell characteristics. Therefore, to keep the number of cells present in the domain constant throughout the simulation, the number of the splitting events in each timestep is equal to the number of vanishing events that took place in this timestep. The cell that is split is chosen randomly (each cell having the same probability of being chosen), as well as the side through which the splitting occurs. The rules of new vertex position and age inheritance of new structures are like in the ``critical side length'' splitting case.