[GRASS-dev] problems with strings (?) in G7

Hi All,

if I try to run this simple script in G7:

[…]

for i in range(len(w_s)):
tmp = “r_w_speed” + str(i)
print tmp
tmp1 = “r_w_dir” + str(i)
print tmp1
tmp2 = “r_ros” + str(i)
print tmp2

grass.run_command(“r.ros”, model = r_fuel_model,
moisture_1h = r_moi_1h,
moisture_live = r_moi_live,
velocity = tmp,
direction = tmp1,
slope = r_slope,
aspect = r_aspect,
elevation = r_elev,
output = tmp2,
flags = “s”,
verbose = True,
overwrite = True)

I get this mysterious error message:

Calculating ROS (Rate Of Spread)
r_w_speed0
r_w_dir0
r_ros0
WARNING: Illegal filename <����>. Character <�> not allowed.
ERROR: <����> is an illegal file name
r_w_speed1
r_w_dir1
r_ros1
WARNING: Illegal filename <.��>. Character <> not allowed. ERROR: <.��> is an illegal file name

In G6.4 it runs without problems.


Dr. Margherita Di Leo

On Tue, Aug 28, 2012 at 3:14 PM, Margherita Di Leo
<dileomargherita@gmail.com> wrote:

Hi All,

if I try to run this simple script in G7:

...

I get this mysterious error message:

Calculating ROS (Rate Of Spread)
r_w_speed0
r_w_dir0
r_ros0
WARNING: Illegal filename <��� � >. Character <�> not allowed.
ERROR: <��� � > is an illegal file name

...

It would be very nice to have a working example for North Carolina.
Since you are familiar with the commands, would you mind to create such
an example for the manual pages (or, as a starter in
http://grass.osgeo.org/wiki/Natural_Hazards#WildFire
)?

thanks
Markus

On Tue, Aug 28, 2012 at 6:41 PM, Markus Neteler <neteler@osgeo.org> wrote:

It would be very nice to have a working example for North Carolina.
Since you are familiar with the commands, would you mind to create such
an example for the manual pages (or, as a starter in
http://grass.osgeo.org/wiki/Natural_Hazards#WildFire
)?

OK I will try :slight_smile:

ciao madi


Margherita Di Leo