• Keine Ergebnisse gefunden

The model itself can be divided in two main parts, (i) the pre-processing and (ii) the core model. These can be further subdivided into single sub-processing steps where each step is associated with one or several GRASS GIS commands that run partly in computation loops. All central computation steps are commented in the Python script of FIDIMO and shown in Fig. 2.2.

Pre-processing

First, FIDIMO sets up the GRASS region configured by the river raster input and an SQlite database connection. All vector attribute tables are stored in the SQlite database of the running GRASS location providing the advantage to loop easily over single vector items (e.g. source population points) using SQL.

Furthermore,FIDIMOconverts the stream from raster to vector format (GRASS command r.to.vect) and breaks the stream at network nodes and locations of move-ment barriers into linear stream segmove-ments representing the processing units for later computational steps. The optionally imported barrier points are internally snapped to the nearest cell of the river raster beforehand. Subsequently, the bro-ken river vector is transformed back to raster format (GRASS command v.to.rast)

Statistical inference Loop over segments Loop over source points Import into

Figure 2.2: Flow chart of main computational steps of FIDIMO.

in which the stream segment number provides the category value for the output raster map.

Due to the importance of distinguishing up- and downstream positions of cells within the stream network (e.g. to determine if a barrier is up- or downstream of a particular source population), r.watershed (http://grass.osgeo.org/grass65/

manuals/r.watershed.html) is applied, a built-in watershed basin analysis tool in GRASS that generates a set of raster maps indicating e.g. flow accumulation, drainage direction and the location of streams. In FIDIMO, the flow direction is calculated using so-called pseudo-elevation maps created by r.cost (http://grass.

osgeo.org/grass65/manuals/r.cost.html). This command generates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent costs. Applying r.cost specifically on a raster where the costs per cell refer to the actual spatial resolution and starting from the outflow point creates a map with increasing values (distance) while proceeding upstream in the network. Hence, the resulting raster map shows higher values in the headwaters and lower values in the downstream part of the river network indicating also flow direction.

In addition, the output of the GRASS tool r.watershed is used for calculating Strahler stream order (Strahler 1957) and Shreve stream order (Shreve 1966) using the GRASS add-on r.stream.order (Jasiewicz and Metz 2011). The stream order maps are prerequisites for the calculation of actual movement distances and for the split of populations in upstream movement at network nodes (Fig. 2.3).

During the pre-processing, the raster map of source populations or the map with randomly set source populations, respectively, are converted to a source population point file. In a later stage each point will act as a source for dispersal with a starting probability that is either derived from the input raster cell value or is set to “1” in case of random input. Extracting information of the particular stream order and stream segment number and adding it to a new “Segment” and “Strahler” column complements the source point’s attribute table.

1

2

6 4 1 1 1

1 1 1 1

1

1 2

2 2

3 9

A

10

B

Figure 2.3: (A) original concept of Shreve stream order (Shreve, 1966) and (B) relative Shreve stream order used as weighting factor for upstream dispersal.

Core model

The FIDIMO main part builds on nested loops over each source point in each stream segment. This segment-wise approach allows for a combined computation of source points that share common upstream barriers and thus reduces compu-tational time. The dispersal kernel and its underlying parameters (𝜎𝑠𝑡𝑎𝑡, 𝜎𝑚𝑜𝑏, 𝑝) are calculated using the R package ‘fishmove’ based on the user-supplied input and the Strahler stream order of each source point. To reduce computational time, dispersal kernels for a broad range of stream orders are calculated and stored in a Python object in advance and recalled at the particular computation step.

As next step a raster map containing distances from each source point are cal-culated (GRASS command r.cost) providing the basic map for the application of the dispersal kernel. This distance map and the dispersal kernel are truncated at a maximum distance where the truncation criterion (user supplied percentage of area under dispersal kernel, default = 99%) is achieved.

The previously generated distance raster map only describes the distance of each

raster cell centre to the source. Thus r.mapcalc, an arithmetic GRASS tool for raster map layers calculates real distances of the lower (x𝑙𝑜𝑤𝑒𝑟) and upper boundary (x𝑢𝑝𝑝𝑒𝑟) of each cell based on the spatial resolution of the raster and considering how the flow passes each cell (orthogonal or diagonal). Both distance maps are exported to NumPy arrays (via the GRASS command grass.script.array) and act as the lower and upper limits for the integration of the fish dispersal kernel and thus for its discretisation in definite space:

∫︁ 𝑥𝑢𝑝𝑝𝑒𝑟

FIDIMOuses the SciPy tool for cumulative density functions (stats.norm.cdf()) for calculating the cell discrete probabilities based on:

𝑐𝑑𝑓(𝑥𝑙𝑜𝑤𝑒𝑟) = The map derived must be corrected because some of the fish moving upstream enter the tributaries. Hence, the probability of the occurrence of a fish species must be split at river junctions. InFIDIMO, the fish moving upstream are apportioned to the main stem and tributary based on stream order since local stream size is positively related to fish dispersal (Hitt and Angermeier 2008). A raster map of the relative stream order is created (Shreve’s (1966) stream order divided by the max-imum upstream stream order) and is used as a multiplication factor for upstream movement (see Fig. 2.3B). Shreve’s stream order is used instead of the Strahler order since it is considered a better approximation of stream size (Knighton 1998).

In Shreve’s method, a magnitude of one is assigned for all exterior branches. Con-sequently, confluent tributaries are added up so that the confluence of two first order streams result in a second order stream. Each additional confluent tributary

increases the resulting stream order by its magnitude. The approach to portion the probability of occurrence based on stream order is a reasonable but gross approxi-mation. We are aware that the choice of a dispersal route in a dendritic network is strongly species dependent (Hitt and Angermeier 2008) as well as related to phys-ical and chemphys-ical properties of the confluent streams (e.g. Banks 1969; Neeson et al. 2011; Rakowitz et al. 2008; Thorstad et al. 2008). Downstream movement was restricted to the main stem only (using the GRASS command r.drain) disregarding any change in movement direction during one dispersal step.

If information on migration barriers are provided, only those that are located upstream of the processed stream segment are selected and ordered according to their distance from the segment. Subsequently, starting with the most downstream barrier, the part upstream of each barrier is multiplied by the barrier specific passability rate. The part of the population that is hindered in further upstream movement is relocated downstream each barrier, linearly decreasing to a distance of in maximum 200 m below. This approach accounts for the typical accumulation effect of fish downstream of barriers (Jurajda et al. 1998).

Finally, all generated maps are aggregated in a raster output map representing the probability density based on the dispersal kernel of ‘fishmove’.