<html style="direction: ltr;">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true" style="direction: ltr;">
    <p><font size="4">Hello Enrico:</font></p>
    <p><font size="4"><br>
      </font></p>
    <p><font size="4">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.</font></p>
    <p><font size="4"><br>
      </font></p>
    <p><font size="4">First, your man_value is way too high. You
        probably want something like 0.03</font></p>
    <p><font size="4">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.</font></p>
    <p><font size="4">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?</font></p>
    <p><font size="4"><br>
      </font></p>
    <p><font size="4">Here's what I tried (changing the above 3
        parameters):<br>
      </font></p>
    <p><font size="4"><span
          style="color:#000000;background-color:#ffffff;"></span></font><span
        style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;"><br>
        </span></span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">r.external
          ./reservoir_farm_granello/dem_invaso2.tif output=dem_2</span><br>
      </span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">g.region -ap
          rast=dem_2</span><br>
      </span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">r.slope.aspect
          elevation=dem_2 dx=dx_2 dy=dy_2</span><br>
      </span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">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_de</span>pth_invaso2_40x30mm
        discharge=discharge_invaso2_40x30mm niterations=30 output_step=5
        random_seed=42 nprocs=8 --overwrite<br>
      </span></p>
    <p><br>
    </p>
    <p><font size="4"><span
          style="color:#000000;background-color:#ffffff;">This resulted
          in 5 depth (and 5 discharge) rasters. For example:</span></font></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;"><br>
        </span></span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">r.univar
          water_depth_invaso2_40x30mm.05
        </span><br>
        100%
        <br>
        total null and non-null cells: 1197120
        <br>
        total null cells: 667811
        <br>
        <br>
        Of the non-null cells:
        <br>
        ----------------------
        <br>
        n: 529309
        <br>
        minimum: 4.25896e-05
        <br>
        maximum: 0.313524
        <br>
        range: 0.313481
        <br>
        mean: 0.00323487
        <br>
        mean of absolute values: 0.00323487
        <br>
        standard deviation: 0.0125372
        <br>
        variance: 0.000157182
        <br>
        variation coefficient: 387.565 %
        <br>
        sum: 1712.24596255017
        <br>
        micha@RMS:bonuschenricus$ r.univar
        water_depth_invaso2_40x30mm.25
        <br>
        100%
        <br>
        total null and non-null cells: 1197120
        <br>
        total null cells: 667811
        <br>
        <br>
        Of the non-null cells:
        <br>
        ----------------------
        <br>
        n: 529309
        <br>
        minimum: 4.25896e-05
        <br>
        maximum: 0.406802
        <br>
        range: 0.406759
        <br>
        mean: 0.00358821
        <br>
        mean of absolute values: 0.00358821
        <br>
        standard deviation: 0.0176433
        <br>
        variance: 0.000311286
        <br>
        variation coefficient: 491.702 %
        <br>
        sum: 1899.27293131027<br>
      </span></p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">r.univar
          discharge_invaso2_40x30mm.05
        </span><br>
        100%
        <br>
        total null and non-null cells: 1197120
        <br>
        total null cells: 667811
        <br>
        <br>
        Of the non-null cells:
        <br>
        ----------------------
        <br>
        n: 529309
        <br>
        minimum: 0
        <br>
        maximum: 0.595495
        <br>
        range: 0.595495
        <br>
        mean: 0.000783053
        <br>
        mean of absolute values: 0.000783053
        <br>
        standard deviation: 0.0121067
        <br>
        variance: 0.000146571
        <br>
        variation coefficient: 1546.08 %
        <br>
        sum: 414.477138618156
        <br>
        micha@RMS:bonuschenricus$ r.univar discharge_invaso2_40x30mm.30
        <br>
        100%
        <br>
        total null and non-null cells: 1197120
        <br>
        total null cells: 667811
        <br>
        <br>
        Of the non-null cells:
        <br>
        ----------------------
        <br>
        n: 529309
        <br>
        minimum: 0
        <br>
        maximum: 0.595495
        <br>
        range: 0.595495
        <br>
        mean: 0.000857986
        <br>
        mean of absolute values: 0.000857986
        <br>
        standard deviation: 0.0125651
        <br>
        variance: 0.000157882
        <br>
        variation coefficient: 1464.49 %
        <br>
        sum: 454.13982509354<br>
        <br>
      </span><span style="font-family:monospace">
      </span></p>
    <p><br>
    </p>
    <p>Attached is the final depth map (after 30 minutes).  You might
      try a longer run time (higher niternations)<br>
    </p>
    <p style="direction: ltr;">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?<br>
    </p>
    <p><br>
    </p>
    <p>HTH</p>
    <p>Micha</p>
    <p><span style="font-family:monospace"><br>
      </span></p>
    <div class="moz-cite-prefix">On 01/08/2023 21:35, bonushenricus
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:09702a80919135ce02a8aa7167dd2402075fe377.camel@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div>Thank you Anna.</div>
      <div>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.</div>
      <div>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.</div>
      <div>Sorry I didn't use a sample vector of points, I did it later
        with temporal.</div>
      <blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px
        #729fcf solid;padding-left:1ex">
        <div>r.slope.aspect <a
            href="mailto:elevation=dem_invaso2_fosso@granello"
            moz-do-not-send="true">elevation=dem_invaso2</a>
          dx=dx_invaso2 dy=dy_invaso2</div>
      </blockquote>
      <blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px
        #729fcf solid;padding-left:1ex">
        <div>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</div>
      </blockquote>
      <blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px
        #729fcf solid;padding-left:1ex">
        <div>r.slope.aspect<span class="Apple-converted-space"> </span><a
            href="mailto:elevation=dem_invaso2_fosso@granello"
            style="color: rgb(46, 52, 54);" moz-do-not-send="true">elevation=dem_invaso6</a><span
            class="Apple-converted-space"> </span>dx=dx_invaso6
          dy=dy_invaso6</div>
      </blockquote>
      <blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px
        #729fcf solid;padding-left:1ex">
        <div>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</div>
      </blockquote>
      <div><span>
          <pre>
</pre>
        </span></div>
      <div>Thank you very much</div>
      <div>I am sure there is some mistake on my part!</div>
      <div><br>
      </div>
      <pre style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">-- 
</pre>
      <pre style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">-- 
Perito agrario Enrico Gabrielli
progetto F.A.R.M. <a href="https://www.farm-agroecologia.it" moz-do-not-send="true">www.farm-agroecologia.it</a>
Tessera n. 633 Collegio Periti agrari prov. Di Modena
Biblioteca agricoltura: <a href="https://www.zotero.org/groups/aplomb/" moz-do-not-send="true" class="moz-txt-link-freetext">https://www.zotero.org/groups/aplomb/</a>
<a href="https://www.inaturalist.org/observations/bonushenricus" moz-do-not-send="true" class="moz-txt-link-freetext">https://www.inaturalist.org/observations/bonushenricus</a></pre>
      <div><br>
      </div>
      <div>Il giorno mar, 01/08/2023 alle 13.17 -0400, Anna Petrášová ha
        scritto:</div>
      <blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px
        #729fcf solid;padding-left:1ex">
        <div dir="ltr">
          <div dir="ltr"><br>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Tue, Aug 1, 2023 at
              10:23 AM bonushenricus <<a
                href="mailto:bonushenricus76@gmail.com"
                moz-do-not-send="true" class="moz-txt-link-freetext">bonushenricus76@gmail.com</a>>
              wrote:<br>
            </div>
            <blockquote type="cite" style="margin:0 0 0 .8ex;
              border-left:2px #729fcf solid;padding-left:1ex">
              <div>
                <div>Thank you, Anna.</div>
                <div>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.</div>
                <div>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?</div>
                <div>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.</div>
                <div>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.</div>
                <div>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.</div>
                <div>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.</div>
                <div>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.</div>
                <div>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.</div>
                <div><span></span></div>
              </div>
              <br>
            </blockquote>
            <div><br>
            </div>
            <div>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. </div>
            <div> </div>
            <blockquote type="cite" style="margin:0 0 0 .8ex;
              border-left:2px #729fcf solid;padding-left:1ex">
              <div>
                <div><span>
                    <pre>-- 
</pre>
                    <pre>-- 
Perito agrario Enrico Gabrielli
progetto F.A.R.M. <a href="http://www.farm-agroecologia.it" target="_blank" moz-do-not-send="true">www.farm-agroecologia.it</a>
Tessera n. 633 Collegio Periti agrari prov. Di Modena
Biblioteca agricoltura: <a href="https://www.zotero.org/groups/aplomb/" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://www.zotero.org/groups/aplomb/</a>
<a href="https://www.inaturalist.org/observations/bonushenricus" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://www.inaturalist.org/observations/bonushenricus</a>
</pre>
                  </span></div>
                <div><br>
                </div>
                <div>Il giorno mar, 01/08/2023 alle 09.23 -0400, Anna
                  Petrášová ha scritto:</div>
                <blockquote type="cite" style="margin:0 0 0 .8ex;
                  border-left:2px #729fcf solid;padding-left:1ex">
                  <div dir="ltr">
                    <div dir="ltr"><br>
                    </div>
                    <br>
                    <div class="gmail_quote">
                      <div dir="ltr" class="gmail_attr">On Mon, Jul 31,
                        2023 at 11:42 PM bonushenricus <<a
                          href="mailto:bonushenricus76@gmail.com"
                          target="_blank" moz-do-not-send="true"
                          class="moz-txt-link-freetext">bonushenricus76@gmail.com</a>>
                        wrote:<br>
                      </div>
                      <blockquote type="cite" style="margin:0 0 0 .8ex;
                        border-left:2px #729fcf solid;padding-left:1ex">
                        <div>
                          <div>Hi Anna</div>
                          <div>I too immediately thought it was enough
                            to compute it for the final step of the
                            simulation,</div>
                          <div>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 </div>
                          <div style="line-height:1.35;margin-left:2em">
                            <div>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 <i>Developments
                                in Water Science</i>, 55:1479–90.
                              Elsevier, 2004. <a
                                href="https://doi.org/10.1016/S0167-5648(04)80159-X"
                                target="_blank" moz-do-not-send="true"
                                class="moz-txt-link-freetext">https://doi.org/10.1016/S0167-5648(04)80159-X</a></div>
                            <div>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.</div>
                            <div>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.</div>
                            <div>Isn't my interpretation right?</div>
                          </div>
                        </div>
                        <div><br>
                        </div>
                      </blockquote>
                      <div><br>
                      </div>
                      <div>No, it should be actual water depth.  I
                        didn't understand the discrepancy you are
                        describing?<br>
                      </div>
                      <blockquote type="cite" style="margin:0 0 0 .8ex;
                        border-left:2px #729fcf solid;padding-left:1ex">
                        <div>
                          <div style="line-height:1.35;margin-left:2em">
                            <span
title="url_ver=Z39.88-2004&ctx_ver=Z39.88-2004&rfr_id=info%3Asid%2Fzotero.org%3A2&rft_id=urn%3Aisbn%3A978-0-444-51840-8&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Path%20sampling%20method%20for%20modeling%20overland%20water%20flow%2C%20sediment%20transport%2C%20and%20short%20term%20terrain%20evolution%20in%20Open%20Source%20GIS&rft.publisher=Elsevier&rft.aufirst=Helena&rft.aulast=Mitasova&rft.au=Helena%20Mitasova&rft.au=Chris%20Thaxton&rft.au=Jaroslav%20Hofierka&rft.au=Richard%20McLaughlin&rft.au=Amber%20Moore&rft.au=Lubos%20Mitas&rft.date=2004&rft.pages=1479-1490&rft.spage=1479&rft.epage=1490&rft.isbn=978-0-444-51840-8&rft.language=en"></span></div>
                          <div><span>
                              <pre>-- 
</pre>
                            </span></div>
                        </div>
                      </blockquote>
                    </div>
                  </div>
                </blockquote>
              </div>
            </blockquote>
          </div>
        </div>
      </blockquote>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
  </body>
</html>