1r3.flow(1) GRASS GIS User's Manual r3.flow(1)
2
3
4
6 r3.flow - Computes 3D flow lines and 3D flow accumulation.
7
9 raster3d, hydrology, voxel
10
12 r3.flow
13 r3.flow --help
14 r3.flow [-a] [input=name] [vector_field=name[,name,...]]
15 [seed_points=name] [flowline=name] [flowaccumulation=name] [sam‐
16 pled=name] [unit=string] [step=float] [limit=integer]
17 [max_error=float] [skip=integer[,integer,...]] [direction=string]
18 [--overwrite] [--help] [--verbose] [--quiet] [--ui]
19
20 Flags:
21 -a
22 Create and fill attribute table
23
24 --overwrite
25 Allow output files to overwrite existing files
26
27 --help
28 Print usage summary
29
30 --verbose
31 Verbose module output
32
33 --quiet
34 Quiet module output
35
36 --ui
37 Force launching GUI dialog
38
39 Parameters:
40 input=name
41 Name of input 3D raster map
42
43 vector_field=name[,name,...]
44 Names of three 3D raster maps describing x, y, z components of vec‐
45 tor field
46
47 seed_points=name
48 Name of vector map with points from which flow lines are generated
49 If no map is provided, flow lines are generated from each cell of
50 the input 3D raster
51
52 flowline=name
53 Name for vector map of flow lines
54
55 flowaccumulation=name
56 Name for output flowaccumulation 3D raster
57
58 sampled=name
59 Name for 3D raster sampled by flowlines
60 Values of this 3D raster will be stored as attributes of flowlines
61 segments
62
63 unit=string
64 Unit of integration step
65 Default unit is cell
66 Options: time, length, cell
67 Default: cell
68 time: elapsed time
69 length: length in map units
70 cell: length in cells (voxels)
71
72 step=float
73 Integration step in selected unit
74 Default step is 0.25 cell
75 Default: 0.25
76
77 limit=integer
78 Maximum number of steps
79 Default: 2000
80
81 max_error=float
82 Maximum error of integration
83 Influences step, increase maximum error to allow bigger steps
84 Default: 1e-5
85
86 skip=integer[,integer,...]
87 Number of cells between flow lines in x, y and z direction
88
89 direction=string
90 Compute flowlines upstream, downstream or in both direction.
91 Options: up, down, both
92 Default: down
93
95 Module r3.flow computes 3D flow lines and 3D flow accumulation. It
96 accepts either three 3D raster maps representing the vector field or
97 one 3D raster map. In case of one map, it computes on-the-fly gradient
98 field.
99
100 Flow lines
101 Flow lines are computed either from points (seeds) provided in
102 seed_points vector map, or if there are no seeds, it creates seeds in a
103 regular grid in the center of voxels (3D raster cells). Parameter skip
104 then controls the step between the regularly distributed seeds. If
105 skip is not provided, r3.flow decides optimal skip for each dimension
106 based on current 3D region as one tenth of the number of columns, rows,
107 and depths. Flow lines can be computed in upstream direction (in the
108 direction of gradient or vector field), in downstream direction or in
109 both directions.
110
111 Flow accumulation
112 Flow accumulation is computed as the number of flow lines traversing
113 each voxel. Since the flow lines are computed for each voxel, the flow
114 accumulation computation can be more demanding. Parameter skip does
115 not influence the flow accumulation computation, parameter direction
116 does.
117
118 Flow line integration
119 Flow line integration can be influenced by several parameters. Option
120 step controls the integration step and influences the precision and
121 computational time. The unit of step can be defined either in terms of
122 the size of the voxel (3D raster cell), length in map units, or as
123 elapsed time. Option limit specifies the maximum number of steps of
124 each flow line.
125
126 Attributes
127 Without using flag a, no attribute table is created and each flow line
128 is represented by one vector line with one category. With a flag, an
129 attribute table is created and each category (record) represents one
130 segment of a flowline, so that attributes specific for segments can be
131 written. In case of vector_field input, only velocity is written, in
132 case of input option, also values of the input 3D raster are written.
133 Option sampled allows sampling (query) given 3D raster by flow lines
134 (computed from different 3D raster) and write the values of the given
135 3D raster as attributes of the flow line segments. Note that using a
136 flag results in longer computation time, so consider increasing step
137 and max_error parameter.
138
140 r3.flow uses Runge-Kutta with adaptive step size (Cash-Karp method).
141
143 First we create input data using example 1 from r3.gwflow manual page:
144 # set the region accordingly
145 g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000 -p3
146 # now create the input raster maps for a confined aquifer
147 r3.mapcalc expression="phead = if(row() == 1 && depth() == 4, 50, 40)"
148 r3.mapcalc expression="status = if(row() == 1 && depth() == 4, 2, 1)"
149 r3.mapcalc expression="well = if(row() == 20 && col() == 20 && depth() == 2, -0.25, 0)"
150 r3.mapcalc expression="hydcond = 0.00025"
151 r3.mapcalc expression="syield = 0.0001"
152 r.mapcalc expression="recharge = 0.0"
153 r3.gwflow solver=cg phead=phead status=status hc_x=hydcond hc_y=hydcond \
154 hc_z=hydcond q=well s=syield r=recharge output=gwresult dt=8640000 vx=vx vy=vy vz=vz budget=budget
155 Then we compute flow lines in both directions and downstream flowaccu‐
156 mulation.
157 r3.flow vector_field=vx,vy,vz flowline=gw_flowlines skip=5,5,2 direction=both
158 r3.flow vector_field=vx,vy,vz flowaccumulation=gw_flowacc
159 We can visualize the result in 3D view:
160
161 We can store velocity values (and values of the input 3D raster map if
162 we use option input) for each segment of flow line in an attribute ta‐
163 ble.
164 r3.flow -a vector_field=vx,vy,vz flowline=gw_flowlines skip=5,5,2 direction=both
165 v.colors map=flowlines_color@user1 use=attr column=velocity color=bcyr
166 Again, we visualize the result in 3D view and we check ’use color for
167 thematic rendering’ on 3D view vector page.
168
170 r.flow, r3.gradient, r3.gwflow
171
173 Anna Petrasova, NCSU OSGeoREL, developed during GSoC 2014.
174
176 Available at: r3.flow source code (history)
177
178 Main index | 3D raster index | Topics index | Keywords index | Graphi‐
179 cal index | Full index
180
181 © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
182
183
184
185GRASS 7.8.5 r3.flow(1)