[GRASS5] R.flow again

OK, now something even stranger is happening with r.flow.

I just did a script to create a net erosion/deposition map using USPED. I’ve tested it on the Spearfish data set. It includes r.flow, running from the CLI of course.

If I zoom into to a very small area (205x172), it works like a charm. But if I zoom out a little bit, r.flow bombs with the error below.

If I try the same zoom levels with the CLI for r.flow, it works fine. Both are actually running r.flow via the CLI. However, the script is started from a tcltk dialog. Does anyone have any idea what is going on here? This script is nice to automate a tedious set of calculations.

Michael


Run from CLI only


GRASS 6.1.cvs (spearfish60_valencia):~ > g.region -p
projection: 1 (UTM)
zone: 13
datum: nad27
ellipsoid: clark66
north: 4921760
south: 4919710
west: 600720
east: 602440
nsres: 10
ewres: 10
rows: 205
cols: 172
GRASS 6.1.cvs (spearfish60_valencia):~ > r.flow elevation.10m@PERMANENT dsout=test
r.flow Version 13 August 1995, update/fix October 1999

Opening output files…done.
Allocating memory: elevation, aspect, density, e/w distances, quantization tolerances.
Reading input files: elevation…
.
Precomputing: tangents, e/w distances, quantization tolerances, interpolated border elevatio
ns, aspects.
Working…done.
Writing density file…WARNING: ‘cell/test’ was found in more mapsets (also found in user1).
done.
Closing files…done.
De-allocating memory…done.
GRASS 6.1.cvs (spearfish60_valencia):~ > g.region -p
projection: 1 (UTM)
zone: 13
datum: nad27
ellipsoid: clark66
north: 4923130
south: 4918340
west: 599570
east: 603590
nsres: 10
ewres: 10
rows: 479
cols: 402
GRASS 6.1.cvs (spearfish60_valencia):~ > r.flow elevation.10m@PERMANENT dsout=test
r.flow Version 13 August 1995, update/fix October 1999

Opening output files…done.
Allocating memory: elevation, aspect, density, e/w distances, quantization tolerances.
Reading input files: elevation…
.
Precomputing: tangents, e/w distances, quantization tolerances, interpolated border elevatio
ns, aspects.
Working…done.
Writing density file…WARNING: ‘cell/test’ was found in more mapsets (also found in user1).
done.
Closing files…done.
De-allocating memory…done.
GRASS 6.1.cvs (spearfish60_valencia):~ >


Run from script at 479x472 (as above) and r.flow bombs with the following message


Opening output files…done.
Allocating memory: elevation, aspect, density, e/w distances, quantization tolerances.
Reading input files: elevation…
.
Precomputing: tangents, e/w distances, quantization tolerances, interpolated border elevatio
ns, aspects.
Working…done.
Writing density file…WARNING: ‘cell/test’ was found in more mapsets (also found in user1).
done.
Closing files…done.
De-allocating memory…done.
GRASS 6.1.cvs (spearfish60_valencia):~ > r.usped &
[14] 2283
[13] Exit 1 r.usped
GRASS 6.1.cvs (spearfish60_valencia):~ > too many nested evaluations (infinite loop?)
(procedure “GlobalVar::exists” line 1)
invoked from within
“GlobalVar::exists $_widget($path,var)”
(procedure “ProgressBar::_modify” line 4)
invoked from within
“ProgressBar::_modify .progress”
(“eval” body line 1)
invoked from within
“eval ProgressBar::$cmd .progress $args”
(procedure “.progress” line 1)
invoked from within
“$opt($dlg,progress) _modify”
(procedure “progress” line 7)
invoked from within
“progress $dlg $val”
invoked from within
“if [eof $fh] {
close $fh
} else {
set str [gets $fh]
append str “\n”
if { [fblocked $fh] } { set str [read $fh] }
while {[set idx [string f…”
(procedure “prnout” line 5)
invoked from within
“prnout 1 file16”


Reduce region to 205x172 and run again from same script


Works fine

Michael


Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Michael Barton wrote:

OK, now something even stranger is happening with r.flow.

I just did a script to create a net erosion/deposition map using USPED. I’ve tested it on the Spearfish data set. It includes r.flow, running from the CLI of course.

If I zoom into to a very small area (205x172), it works like a charm. But if I zoom out a little bit, r.flow bombs with the error below.

If I try the same zoom levels with the CLI for r.flow, it works fine. Both are actually running r.flow via the CLI. However, the script is started from a tcltk dialog. Does anyone have any idea what is going on here? This script is nice to automate a tedious set of calculations.

[...]

------------------------------------------------------------------------
Run from script at 479x472 (as above) and r.flow bombs with the following message

------------------------------------------------------------------------
Opening output files...done.
Allocating memory: elevation, aspect, density, e/w distances, quantization tolerances.
Reading input files: elevation...
.
Precomputing: tangents, e/w distances, quantization tolerances, interpolated border elevatio
ns, aspects.
Working...done.
Writing density file...WARNING: 'cell/test' was found in more mapsets (also found in user1).
done.
Closing files...done.
De-allocating memory...done.
GRASS 6.1.cvs (spearfish60_valencia):~ > r.usped &

Have you tried running the _script_ from the CLI, i.e. by giving it its parameters directly, and not via the tcltk interface ?

Moritz

Good idea. I'll try it today.

MIchael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Tue, 06 Dec 2005 11:55:37 +0100
To: Michael Barton <michael.barton@asu.edu>
Cc: grass5 <grass5@grass.itc.it>
Subject: Re: [GRASS5] R.flow again

Michael Barton wrote:

OK, now something even stranger is happening with r.flow.

I just did a script to create a net erosion/deposition map using USPED.
I¹ve tested it on the Spearfish data set. It includes r.flow, running
from the CLI of course.

If I zoom into to a very small area (205x172), it works like a charm.
But if I zoom out a little bit, r.flow bombs with the error below.

If I try the same zoom levels with the CLI for r.flow, it works fine.
Both are actually running r.flow via the CLI. However, the script is
started from a tcltk dialog. Does anyone have any idea what is going on
here? This script is nice to automate a tedious set of calculations.

[...]

------------------------------------------------------------------------
Run from script at 479x472 (as above) and r.flow bombs with the
following message

------------------------------------------------------------------------
Opening output files...done.
Allocating memory: elevation, aspect, density, e/w distances,
quantization tolerances.
Reading input files: elevation...
.
Precomputing: tangents, e/w distances, quantization tolerances,
interpolated border elevatio
ns, aspects.
Working...done.
Writing density file...WARNING: 'cell/test' was found in more mapsets
(also found in user1).
done.
Closing files...done.
De-allocating memory...done.
GRASS 6.1.cvs (spearfish60_valencia):~ > r.usped &

Have you tried running the _script_ from the CLI, i.e. by giving it its
parameters directly, and not via the tcltk interface ?

Moritz

Moritz,

I tried your suggestion and the script works fine from the command line.
Thanks.

It is a problem somehow with gui.tcl, because that is where the progress bar
code is located, or (more likely) something that gui.tcl runs or interacts
with.

I think the problem is fairly new (last month or 2?). Nothing in gui.tcl
itself has changed that recently. However, I don't know about g_gui() or
g_parser() or other related functions.

I might try redirecting the r.flow output to try to keep it out of the
progress bar loop, but even if successful this is a band aid that doesn't
get to the cause of a problem that affects other modules as well.

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Tue, 06 Dec 2005 11:55:37 +0100
To: Michael Barton <michael.barton@asu.edu>
Cc: grass5 <grass5@grass.itc.it>
Subject: Re: [GRASS5] R.flow again

Michael Barton wrote:

OK, now something even stranger is happening with r.flow.

I just did a script to create a net erosion/deposition map using USPED.
I¹ve tested it on the Spearfish data set. It includes r.flow, running
from the CLI of course.

If I zoom into to a very small area (205x172), it works like a charm.
But if I zoom out a little bit, r.flow bombs with the error below.

If I try the same zoom levels with the CLI for r.flow, it works fine.
Both are actually running r.flow via the CLI. However, the script is
started from a tcltk dialog. Does anyone have any idea what is going on
here? This script is nice to automate a tedious set of calculations.

[...]

------------------------------------------------------------------------
Run from script at 479x472 (as above) and r.flow bombs with the
following message

------------------------------------------------------------------------
Opening output files...done.
Allocating memory: elevation, aspect, density, e/w distances,
quantization tolerances.
Reading input files: elevation...
.
Precomputing: tangents, e/w distances, quantization tolerances,
interpolated border elevatio
ns, aspects.
Working...done.
Writing density file...WARNING: 'cell/test' was found in more mapsets
(also found in user1).
done.
Closing files...done.
De-allocating memory...done.
GRASS 6.1.cvs (spearfish60_valencia):~ > r.usped &

Have you tried running the _script_ from the CLI, i.e. by giving it its
parameters directly, and not via the tcltk interface ?

Moritz