[GRASS-user] how to calculate volume of water stored in water storage with r.sim.water?

bonushenricus bonushenricus76 at gmail.com
Sat Aug 5 11:59:36 PDT 2023


Hello
I made two better digital elevation models for my tests, here attached.
There are two designs, each with a pond about 1 metre deep, the same
position on the slope, and two ditches reaching the pond.
One design has a pond with a surface area of 63m², and the other has a
surface area of 131m², with a depth of about 1 metre, with a volume of
52m³ and 118m³, respectively.
I expect that having the same slope and ditches upstream, the two ponds
will be filled with a similar volume of water.
Seen infil_rast for make waterproof the ponds doesn't run, I tried
using flow_control, and it work.
And I tried with hmax=1
Here the "script" (after import geotiff attached)
> r.lake --overwrite elevation=dem_pondB water_level=480.7 lake=pondB
> coordinates=687064.2576117209,4910526.453118301
> #results 118m³ 131m²
> r.lake --overwrite elevation=dem_pondA water_level=480.9 lake=pondA
> coordinates=687064.2576117209,4910526.453118301
> #results 52m³ 63m²
> r.mapcalc expression="flow_control_pondA = if(pondA,0)" --overwrite
> r.mapcalc expression="flow_control_pondB = if(pondB,0)" --overwrite
> r.slope.aspect --overwrite elevation=dem_pondB dx=dx_pondB
> dy=dy_pondB
> r.slope.aspect --overwrite elevation=dem_pondA dx=dx_pondA
> dy=dy_pondA
> r.mask raster=dem_pondA
> r.sim.water --overwrite -t elevation=dem_pondB dx=dx_pondB
> dy=dy_pondB rain_value=40 infil_value=15 man=manning
> flow_control=flow_control_pondB hmax=1
> depth=water_depth_pondB_40x30mm discharge=discharge_pondB_40x30mm
> niterations=30 output_step=5 random_seed=42 nprocs=8
> r.sim.water --overwrite -t elevation=dem_pondA dx=dx_pondA
> dy=dy_pondA rain_value=40 infil_value=15 man=manning
> flow_control=flow_control_pondA hmax=1
> depth=water_depth_pondA_40x30mm discharge=discharge_pondA_40x30mm
> niterations=30 output_step=5 random_seed=42 nprocs=8
The results are:
- water_depth approximately 0.38 meters for pondB (about 49m³) , 0.61
meters for pondA (about 32m³)
- discharge of the watershed: pondB 48m³, pondA 51m³
But I am not sure that the spread of water in the slope, and especially
in the ditches, is correct in this way, with hmax=1.

Openfluid I find difficult to install, also for small watersheds with
the design of ditches, possibly not topologically connected.

Could this route, with hmax=depth of the pond, be correct?

Thanks
-- 
-- 
Perito agrario Enrico Gabrielli
progetto F.A.R.M. www.farm-agroecologia.it
Tessera n. 633 Collegio Periti agrari prov. Di Modena
Biblioteca agricoltura: https://www.zotero.org/groups/aplomb/
https://www.inaturalist.org/observations/bonushenricus


Il giorno ven, 04/08/2023 alle 08.26 +0200, bonushenricus ha scritto:
> Thanks Micha
> What a mistake with Manning's coefficient! I took off a zero!
> For infil: the soil is sandy. The 24.1 mm/h is taken from the soil
> map with published regional data. There are two reference sites in
> the area of soil delineation: 48% sand and 22% clay: 7.7 mm/h; 52%
> sand, 14% clay: 24.1 mm/h. If I can, I will go and measure on the
> ground. But for now, maybe 15 might be good.
> The result, however, still doesn't convince me.
> If I try the simulation on "invaso6", with the same parameters as
> "invaso2", it ends after 10 minutes with a result of 30 cm.
> 
> Il giorno mer, 02/08/2023 alle 00.45 +0300, Micha Silver ha scritto:
> > Hello Enrico:
> > 
> > Anna knows this subject better than I do, but I noticed a few
> > problems with your command, so here are some comments that might
> > help to get a better result.
> > 
> > First, your man_value is way too high. You probably want something
> > like 0.03
> > Second, you are using the '-t' flag but no `output_step`, If you
> > add output_step of a few minutes, then you should get multiple
> > output rasters at each time step.
> > Third, you have 40 mm/hr rain_rate and 24.1 mm/hr infiltration
> > rate. Is that correct? That means that 60% of the rain is
> > infiltrating throughout the 30 minute storm. This might happen in
> > very dry and sandy soil. Is that your situation?
> > 
> > Here's what I tried (changing the above 3 parameters):
> > 
> > r.external ./reservoir_farm_granello/dem_invaso2.tif output=dem_2
> > g.region -ap rast=dem_2
> > r.slope.aspect elevation=dem_2 dx=dx_2 dy=dy_2
> > r.sim.water -t elevation=dem_2 dx=dx_2 dy=dy_2 rain_value=40
> > infil_value=15 man_value=0.0368 depth=water_depth_invaso2_40x30mm
> > discharge=discharge_invaso2_40x30mm niterations=30 output_step=5
> > random_seed=42 nprocs=8 --overwrite
> > 
> > This resulted in 5 depth (and 5 discharge) rasters. For example:
> > 
> > r.univar water_depth_invaso2_40x30mm.05 
> > 100% 
> > total null and non-null cells: 1197120 
> > total null cells: 667811 
> > 
> > Of the non-null cells: 
> > ---------------------- 
> > n: 529309 
> > minimum: 4.25896e-05 
> > maximum: 0.313524 
> > range: 0.313481 
> > mean: 0.00323487 
> > mean of absolute values: 0.00323487 
> > standard deviation: 0.0125372 
> > variance: 0.000157182 
> > variation coefficient: 387.565 % 
> > sum: 1712.24596255017 
> > micha at RMS:bonuschenricus$ r.univar water_depth_invaso2_40x30mm.25 
> > 100% 
> > total null and non-null cells: 1197120 
> > total null cells: 667811 
> > 
> > Of the non-null cells: 
> > ---------------------- 
> > n: 529309 
> > minimum: 4.25896e-05 
> > maximum: 0.406802 
> > range: 0.406759 
> > mean: 0.00358821 
> > mean of absolute values: 0.00358821 
> > standard deviation: 0.0176433 
> > variance: 0.000311286 
> > variation coefficient: 491.702 % 
> > sum: 1899.27293131027
> > 
> > r.univar discharge_invaso2_40x30mm.05 
> > 100% 
> > total null and non-null cells: 1197120 
> > total null cells: 667811 
> > 
> > Of the non-null cells: 
> > ---------------------- 
> > n: 529309 
> > minimum: 0 
> > maximum: 0.595495 
> > range: 0.595495 
> > mean: 0.000783053 
> > mean of absolute values: 0.000783053 
> > standard deviation: 0.0121067 
> > variance: 0.000146571 
> > variation coefficient: 1546.08 % 
> > sum: 414.477138618156 
> > micha at RMS:bonuschenricus$ r.univar discharge_invaso2_40x30mm.30 
> > 100% 
> > total null and non-null cells: 1197120 
> > total null cells: 667811 
> > 
> > Of the non-null cells: 
> > ---------------------- 
> > n: 529309 
> > minimum: 0 
> > maximum: 0.595495 
> > range: 0.595495 
> > mean: 0.000857986 
> > mean of absolute values: 0.000857986 
> > standard deviation: 0.0125651 
> > variance: 0.000157882 
> > variation coefficient: 1464.49 % 
> > sum: 454.13982509354
> > 
> > 
> > Attached is the final depth map (after 30 minutes).  You might try
> > a longer run time (higher niternations)
> > One other note: Your region resolution is 0.2 meters (from the
> > original DEM) so each pixel is 0.04 sq meters.  The sum of values
> > of all non-null cells in the final depth map is about 1900 (from
> > the r.univar result). So the total discharge should be about 76 m³.
> > Does that sound reasonable?
> > 
> > HTH
> > Micha
> > 
> > On 01/08/2023 21:35, bonushenricus wrote:
> >  
> > > 
> > > Thank you Anna.
> > > I will try to attach the two geotiffs in a compressed folder,
> > > with the simplest example of a single ditch, for both reservoirs.
> > > EPSG:32632.
> > > The ditch is not exactly the same for the two reservoirs, they
> > > change a little bit in the final part of the mouth of the
> > > reservoir, but it is very similar.
> > > Sorry I didn't use a sample vector of points, I did it later with
> > > temporal.
> > >  
> > > > r.slope.aspect elevation=dem_invaso2 dx=dx_invaso2
> > > > dy=dy_invaso2
> > >  
> > > > r.sim.water -t elevation=dem_invaso2 dx=dx_invaso2
> > > > dy=dy_invaso2 rain_value=40 infil_value=24.1 man_value=0.368
> > > > depth=water_depth_invaso2_40x30mm
> > > > discharge=discharge_invaso2_40x30mm niterations=30 --overwrite
> > >  
> > > > r.slope.aspect elevation=dem_invaso6 dx=dx_invaso6
> > > > dy=dy_invaso6
> > >  
> > > > r.sim.water -t elevation=dem_invaso6 dx=dx_invaso6
> > > > dy=dy_invaso6 rain_value=40 infil_value=24.1 man_value=0.368
> > > > depth=water_depth_invaso6_40x30mm
> > > > discharge=discharge_invaso6_40x30mm niterations=30 --overwrite
> > > Thank you very much
> > > I am sure there is some mistake on my part!
> > > 
> > > -- 
> > > -- 
> > > Perito agrario Enrico Gabrielli
> > > progetto F.A.R.M. www.farm-agroecologia.it
> > > Tessera n. 633 Collegio Periti agrari prov. Di Modena
> > > Biblioteca agricoltura: https://www.zotero.org/groups/aplomb/
> > > https://www.inaturalist.org/observations/bonushenricus
> > > 
> > > Il giorno mar, 01/08/2023 alle 13.17 -0400, Anna Petrášová ha
> > > scritto:
> > >  
> > > > 
> > > >  
> > > > On Tue, Aug 1, 2023 at 10:23 AM bonushenricus
> > > > <bonushenricus76 at gmail.com> wrote:
> > > >  
> > > > > Thank you, Anna.
> > > > > r.sim.water finishes the simulation not at the end of the
> > > > > rainfall event, in my case at 30 minutes, but at an earlier
> > > > > time. In my case, in the smaller reservoir at 16 minutes, in
> > > > > the case of the more extensive reservoir at 24 minutes. But
> > > > > the water keeps coming even after that. I imagined that the
> > > > > calculation ends when it reaches the steady state of the
> > > > > water blade.
> > > > > But it's not so. Then I don't understand why it ends at 16 or
> > > > > 24 minutes. Doesn't the water continue to arrive after that?
> > > > > Shouldn't it increase?
> > > > > I cannot understand it. In the reservoirs, the discharge is
> > > > > very low, as I expect. But if the discharge does not increase
> > > > > and the precipitation continues, I expect the water depth to
> > > > > rise again.
> > > > > And it is not understandable that two reservoirs, one twice
> > > > > the volume of the other, contain the same depth of 30 cm at
> > > > > the end of the rainfall.
> > > > > To understand how this works, I would apply waterproofing to
> > > > > the reservoirs. The ksat, or infil_value, is the only
> > > > > variable that can explain this: the larger reservoir loses
> > > > > more water.
> > > > > If both reservoirs were waterproof, I would have removed this
> > > > > variable. Unfortunately r.sim.water infil=raster where I have
> > > > > marked value 0 in the reservoirs does not work. There is
> > > > > perhaps a bug that I have reported. So I haven't had a chance
> > > > > to test this.
> > > > > I don't know how to do it; I can't trust the 30 cm as a value
> > > > > to calculate the water volume in the two reservoirs. I will
> > > > > have to use another model.
> > > > > I will try to use a distributed model. Since I have the data
> > > > > in GRASS, I will try using the old geomhydas, hoping the
> > > > > modules will work in GRASS8, and then use the Mhydas models
> > > > > in OpenFluid. I have no other chance unless someone can help
> > > > > me find a solution.
> > > > >  
> > > > 
> > > > 
> > > > Unfortunately I haven't had time to look at the reported issue.
> > > > Perhaps you could share your data and provide exact commands
> > > > and pictures, explaining very clearly what's wrong. 
> > > >  
> > > >  
> > > > > -- 
> > > > > -- 
> > > > > Perito agrario Enrico Gabrielli
> > > > > progetto F.A.R.M. www.farm-agroecologia.it
> > > > > Tessera n. 633 Collegio Periti agrari prov. Di Modena
> > > > > Biblioteca agricoltura: https://www.zotero.org/groups/aplomb/
> > > > > https://www.inaturalist.org/observations/bonushenricus
> > > > > 
> > > > > Il giorno mar, 01/08/2023 alle 09.23 -0400, Anna Petrášová ha
> > > > > scritto:
> > > > >  
> > > > > > 
> > > > > >  
> > > > > > On Mon, Jul 31, 2023 at 11:42 PM bonushenricus
> > > > > > <bonushenricus76 at gmail.com> wrote:
> > > > > >  
> > > > > > > Hi Anna
> > > > > > > I too immediately thought it was enough to compute it for
> > > > > > > the final step of the simulation,
> > > > > > > but I noticed that the same slope, same ditches, same
> > > > > > > rainfall, for two reservoirs at the same location, same
> > > > > > > length along a contour, but different width and depth, at
> > > > > > > the final step of the simulation the water depth was
> > > > > > > always 30 cm, I went to read the article 
> > > > > > > Mitasova, Helena, Chris Thaxton, Jaroslav Hofierka,
> > > > > > > Richard McLaughlin, Amber Moore, e Lubos Mitas. «Path
> > > > > > > Sampling Method for Modeling Overland Water Flow,
> > > > > > > Sediment Transport, and Short Term Terrain Evolution in
> > > > > > > Open Source GIS». In Developments in Water Science,
> > > > > > > 55:1479–90. Elsevier, 2004.
> > > > > > > https://doi.org/10.1016/S0167-5648(04)80159-X
> > > > > > > where I read the Saint-Venant equation. I am an
> > > > > > > agricultural technician and geographer unfortunately
> > > > > > > ignorant of hydrological calculations and serious
> > > > > > > mathematics, and I understood, looking at the equation,
> > > > > > > that the water depth is the depth of overland flow =
> > > > > > > rainfall exces - water flow.
> > > > > > > So the final 30 cm should not be understood as
> > > > > > > accumulated water, but as the blade of water that was
> > > > > > > added at that precise moment.
> > > > > > > Isn't my interpretation right?
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > > No, it should be actual water depth.  I didn't understand
> > > > > > the discrepancy you are describing?
> > > > > >  
> > > > > > > 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20230805/eb581a41/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Gabrielli_Enrico_training_project.tar.bz2
Type: application/x-bzip-compressed-tar
Size: 2419499 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20230805/eb581a41/attachment-0001.bin>


More information about the grass-user mailing list