Input : Terrain cells with elevation , small slope
Algorithm 6: Extracting a depression-free water surface
Output: Elevation of the water surface
1 2 for to do 3 foreach in parallel do 4 5 6 end 7 end
River and lake modeling. To identify the surface of rivers and lakes we begin by filling depressions in the terrain. This is sometimes referred to as pit removal and has value as an algorithm in its own right. Our input is the terrain elevation grid, and a set of recipients identified during depression routing to provide the flow path with minimum energy cost. We call the water surface the elevations obtained after filling the identified depressions. This surface should obey two conditions: it should be as close as possible to the terrain, and at the same time be monotonically non-decreasing along all stream trees, which we intuitively expect since water flows downhill. To achieve this, in Algorithm 6 we introduce a variant of the basin identification algorithm. We follow the water path of each stream tree upwards from destination to sources, retaining as the water surface the maximum elevation previously reached. For completeness, we optionally allow a small slope on the water surface as this is sometimes required in hydrology applications. Note that this variant is only possible with the depression carving strategy, as it requires a continuous path. Next, cells with water discharge above a specified threshold can be tagged as belonging to bodies of water, as illustrated in Figure 9 where the water surface and its discharge are highlighted.
Ecosystem simulation. The water routes derived through river and lake modeling have direct application to ecosystem simulation. Water, along with sunlight and warmth, is a key requirement for plant growth, with different species having varied adaptation to water availability. Modeling water discharge is therefore a crucial element in ecosystem simulations. To demonstrate applicability, Figure 6 shows the outcome of an ecosystem simulation for a biome in the Pyrenees mountains [PGG*24] at the 50 year mark, with water accumulation provided by our flow and depression routing. For clarity, pioneer species with strong drought tolerance have been removed and what remains are species, such as Sessile Oak and European Beech, that require the greater moisture found in riparian areas. Most ecosystem simulations use a month as the timestep granularity, due in part to the overhead of calculating water flow. The acceleration provided here creates an opportunity for shorter, weekly, or even daily, timesteps with non-uniform rainfall across the landscape [PMG*22] and hence greater simulation accuracy.
Figure 6: Ecosystem simulation with water provided by flow routing. Certain species (colored in shades of green, black, and purple) favor river banks due to higher levels of available water.
Terrain erosion. Flow routing is a critical component of terrain erosion, as it provides the mechanism by which material is worn away and transported, ultimately over geological time shaping the mountains themselves. Furthermore, even the ordering of recipient cells plays a role in the implicit integration of the stream power law erosion equation. This is expressed as [CBC*16]:
where the first term is the tectonically induced uplift (or growth rate of the mountain), and the second term is the erosion, dependent on the discharge , erosion coefficients and , and the slope . The discharge provided by flow routing is scale-independent, so to compensate we scale the discharge by accumulating , where is the cell size and is the precipitation. The uplift is usually considered time-independent and therefore applied as a pre-process. This leaves an implicit solution to the second erosive part of Equation 2 as:
where is the time step and . Eq. 3 can be further simplified to:
Figure 7: Different stages in an interactive authoring session. The user paints uplift to provide an initial mountain structure, then changes the deposition parameters (sediment in dark brown and lakes and rivers in blue), and, finally, increases the overall simulation duration.
where and .
As with water surface extraction, we can compute using a simple modification of basin identification (see Algorithm 7). The outcome of applying our accelerated method of fluvial erosion is illustrated in Figure 8. Note that Equation 2 is a special case of the Stream Power Law with the slope exponent set to one. Further research is required to adapt our solution to the general case, for instance with a global Newton-Raphson's algorithm.