<html style="direction: ltr;">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true" style="direction: ltr;"
    text="#000000" bgcolor="#FFFFFF">
    Hi Tom:<br>
    <br>
    <div class="moz-cite-prefix">On 05/30/2018 05:32 PM, Thomas Adams
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGxgkWigG5D63Du4h_WR181FtWE5sc_CWMeVfiAtgrJYQ69Y1Q@mail.gmail.com">
      <div dir="ltr">
        <div>Hi all,</div>
        <div><br>
        </div>
        <div>I have written an involved script (which I run
          automatically), in part, calling r.basin to get the stream
          channel slope (preferably at the basin outlet). For all basin
          outlet locations, r.basin defines the watershed correctly, but
          for about 10% of the locations the *_parameters.csv file is
          not created and I get errors:</div>
      </div>
    </blockquote>
    <br>
    Have you looked at the addon r.stream.slope ??<br>
    <a class="moz-txt-link-freetext" href="https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/raster#r.stream.slope">https://grasswiki.osgeo.org/wiki/AddOns/GRASS7/raster#r.stream.slope</a><br>
    <blockquote type="cite"
cite="mid:CAGxgkWigG5D63Du4h_WR181FtWE5sc_CWMeVfiAtgrJYQ69Y1Q@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>===========================<br>
          Hypsometric | quantiles<br>
          ===========================<br>
          360 | 0.025<br>
          358 | 0.05<br>
          356 | 0.1<br>
          351 | 0.25<br>
          341 | 0.5<br>
          330 | 0.75<br>
          321 | 0.9<br>
          316 | 0.975<br>
          <br>
          <br>
          Done!<br>
          ../src/gtk/dcclient.cpp(250): assert "Assert failure" failed
          in wxFreePoolGC(): Wrong GC<br>
          ../src/gtk/dcclient.cpp(250): assert "Assert failure" failed
          in wxFreePoolGC(): Wrong GC<br>
          ../src/gtk/dcclient.cpp(250): assert "Assert failure" failed
          in wxFreePoolGC(): Wrong GC<br>
          ../src/gtk/dcclient.cpp(250): assert "Assert failure" failed
          in wxFreePoolGC(): Wrong GC<br>
          ------------------------------<br>
          ------------------------------<br>
           100%<br>
          Tot. cells 1886.0<br>
          Tot. area 188600.0<br>
          Max distance 771.033539<br>
          Traceback (most recent call last):<br>
            File "/home/teaiii/.grass7/addons/scripts/r.width.funct",
          line 132, in <module><br>
              sys.exit(main())<br>
            File "/home/teaiii/.grass7/addons/scripts/r.width.funct",
          line 87, in main<br>
              prc[4,0] , prc[4,1] = findint(kl,0.5) , 0.5<br>
            File "/home/teaiii/.grass7/addons/scripts/r.width.funct",
          line 125, in findint<br>
              z1, z2, f1, f2 = kl[int(Xf[0])][0], kl[int(Xf[0]-1)][0],
          kl[int(Xf[0])][1], kl[int(Xf[0]-1)][1]<br>
          TypeError: only length-1 arrays can be converted to Python
          scalars<br>
          <br>
          ------------------------------<br>
          <br>
          An ERROR occurred running r.basin<br>
          Please check for error messages above or try with another
          pairs of outlet<br>
          coordinates<br>
          Removing region definition <original><br>
          grep: mjk473_dem_parameters.csv: No such file or directory<br>
          <br>
          Channel average slope (percent): <br>
          grep: mjk473_dem_parameters.csv: No such file or directory<br>
          <br>
          Drainage Area (sq km): <br>
          <br>
        </div>
        <div><br>
        </div>
        <div>I know the basin boundary is generated correctly because I
          generate a map automatically.</div>
        <div><br>
        </div>
        <div>So, the above is a problem; I have sent a lot of time
          trying to understand where I'm going wrong. I just re-built
          GRASS 7.4.0 and that had no effect in correcting the problem.</div>
        <div><br>
        </div>
        <div>r.basin generates waaay more than I need. Is there a
          simpler way the get the average main channel slope? I've
          looked through the available modules and can not find another
          way to do this. I just need a single value...</div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Tom<br>
        </div>
        <div><br>
        </div>
        <div><br>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div dir="ltr">
                    <div><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--'"--><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
  </body>
</html>