Volume Calculation of Area for Reservoir Analysis using Grass

Jim Westervelt westerve at zorro.cecer.army.mil
Wed Dec 2 18:49:45 EST 1992


Yes, GRAASS can be used to do volumetric calculations.  There is no
straightforward program, but the following outline will start you 
in the right direction:

1) Use the screen-oriented digitizing capability to outline the anticipated
extent of the area for which a volume will be calculated.

2) Use the masking program to mask into this area

3) Subtract the DEM values from the fill height value using r.mapcalc

4) Run r.stats on the results
     You now have something like:
	 -1  1357
	 1   3456
	 2   1234
	 ...
	 (The first value is the delta h (height), the second the area)

5) Filter out negative values (areas where the DEM height is greater than
   the fill height). (Use sed(1))
     You now have something like:
	 1   3456
	 2   1234
	 ...

6) Turn the output into a bc(1) input script where the height values are
   multiplied by their corresponding area values.  
     You now have something like:
	 1 * 3456
	 2 * 1234
	 ...

7) Send the result through bc(1)
     You now have something like:
	 3456
	 2468
	 ...

8) Sum these values; add the appropriate dc(1) commands:
     You now have something like:
	 3456
	 2468 +
	 ...
	 p

9) Send through dc(1) for your final volume



More information about the grass-user mailing list