<div dir="ltr"><div dir="ltr"><div>I get the same error that Juan gets, both with his commands and with those in the example in the manual page (and both in grass76 and trunk). <br></div><div><br></div><div>[omitting the rest for brevity]</div><div><br></div><div>r.width.funct map=dist2out image=/tmp/my_basin<br> 100%<br>Tot. cells 88407.0<br>Tot. area 8840700.0<br>Max distance 7714.591101<br>Traceback (most recent call last):<br>  File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 135, in <module><br>    sys.exit(main())<br>  File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 84, in main<br>    prc[0,0] , prc[0,1] = findint(kl,0.05) , 0.05<br>  File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 128, 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>IndexError: invalid index to scalar variable.<br></div><div><br></div><div>No idea... <br></div><div><br></div><div>Maybe Madi can help us out here :)</div><div><br></div><div>Vero<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue., 21 feb. 2019 a las 11:37, Helmut Kudrnovsky (<<a href="mailto:hellik@web.de">hellik@web.de</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[keep the discussion always on the ML!]<br>
<br>
>Gesendet: Donnerstag, 21. Februar 2019 um 11:25 Uhr<br>
><br>
>Von: "Juan Lopez" <<a href="mailto:cubarro@gmail.com" target="_blank">cubarro@gmail.com</a>><br>
>An:<br>
>Betreff: Re: [GRASS-user] r.width.funct in correct version<br>
><br>
>Dear Helmut.<br>
>This is the output of g.region command:<br>
> <br>
><br>
>GRASS 7.6.0 (nc):/departamento/Test/nc_basic_spm > g.region -p<br>
>projection: 99 (Lambert Conformal Conic)<br>
>zone:       0<br>
>datum:      nad83<br>
>ellipsoid:  a=6378137 es=0.006694380022900787<br>
>north:      228500<br>
>south:      215000<br>
>west:       630000<br>
>east:       645000<br>
>nsres:      10<br>
>ewres:      10<br>
>rows:       1350<br>
>cols:       1500<br>
>cells:      2025000<br>
<br>
and what is the exact r.width.funct command you used?<br>
<br>
see <br>
<br>
<a href="https://grass.osgeo.org/grass74/manuals/addons/r.width.funct.html" rel="noreferrer" target="_blank">https://grass.osgeo.org/grass74/manuals/addons/r.width.funct.html</a><br>
<br>
for an example:<br>
<br>
###########<br>
g.region raster=elevation -p<br>
<br>
# Calculate flow direction<br>
r.stream.extract elevation=elevation threshold=1000 \<br>
direction=direction <br>
<br>
# Create outlet point <br>
echo "637304.924954,218617.100523" | v.in.ascii input=- sep=',' out=outlet<br>
<br>
# Convert outlet point to raster<br>
v.to.rast input=outlet type=point output=outlet use=cat<br>
<br>
# Calculate distance to outlet map<br>
r.stream.distance -o stream_rast=outlet \<br>
direction=direction distance=dist2out<br>
<br>
# Calculate width function<br>
r.width.funct map=dist2out image=/tmp/my_basin<br>
###########<br>
<br>
<br>
kind regards<br>
Helmut<br>
<br>
<br>
 <br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a></blockquote></div>