I want to run the r.sun command within a loop. First I've tried to do that
within a small shell-scrip, but recieved some error messages. Although the
loop is working within the linux terminal it doesnt in the GRASS GIS command
line.. (using GRASS GIS 6.4.2)
However, now I want to run the loop in the Python Shell command line. Sadly
I have no idea how.. ;/
I think its not a big challenge if you know the basics of python, but I dont
know them.
Maybe someone can help me, especially how to define variables and implement
the r.sun tool.
export GISBASE="/usr/local/grass-6.4/"
export PATH="$PATH:$GISBASE/bin:$GISBASE/scripts"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GISBASE/lib"
# for parallel session management, we use process ID (PID) as lock file
number:
export GIS_LOCK=$$
# path to GRASS settings file
export GISRC="$HOME/.grassrc6"
and you are working in the chosen location and mapset
# for example list of vectors
res = g.parse_command("g.list", _type="vect")
for elem in res:
print "element:" +elem
etc.