[GRASS-user] r.sun - run script

Hy!

For a thesis I have to calculate monthly and yearly sums of solar energy. To
facilitate me the process I thought of using a script for that (first time
for me using a script in GRASS GIS). I found the script that can be seen in
the link below:

http://www.grassbook.org/scripts2nd/rsun_crop.sh.txt rsun_crop.sh

I tried to execute this script, but without success.

Starting the script and setting the input parameters are not rising problems
I guess.

The first thing that comes up is:
"test.sh: line 50: 7593 Segmentation fault" --> Is this a kind of error
message and if yes, what´s the influence of it or what can I do to prevent
it?

Second I get the ERROR that the maps I´m trying to create (for beam, diff
and ref irradiance) are "not found in the current" mapset and that they are
"not found". I first thought that I have to prepare these map before
starting the script, but also when I prepared the maps, it didn´t work.

See screenshot of my bash:
http://osgeo-org.1803224.n2.nabble.com/file/n6203754/Screen_shot_2011-03-24_at_06.27.48.png

Hope someone can help me.

Thanks,
Tim

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-sun-run-script-tp6203754p6203754.html
Sent from the Grass - Users mailing list archive at Nabble.com.

The first thing that comes up is:
"test.sh: line 50: 7593 Segmentation fault" --> Is this a kind of error
message and if yes, what´s the influence of it or what can I do to prevent
it?

I guess the first error message has something to do with my OS. I´m using
Mac OS X 10.6. When I start the script on Windows XP "only" the second error
message still exists.

Second I get the ERROR that the maps I´m trying to create (for beam, diff
and ref irradiance) are "not found in the current" mapset and that they
are "not found". I first thought that I have to prepare these map before
starting the script, but also when I prepared the maps, it didn´t work.

Thanks,
Tim

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-sun-run-script-tp6203754p6203977.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Thu, Mar 24, 2011 at 12:41 PM, TimNorwey <timmy_weyrer@live.at> wrote:

Hy!

For a thesis I have to calculate monthly and yearly sums of solar energy. To
facilitate me the process I thought of using a script for that (first time
for me using a script in GRASS GIS). I found the script that can be seen in
the link below:

http://www.grassbook.org/scripts2nd/rsun_crop.sh.txt rsun_crop.sh

I tried to execute this script, but without success.

Better execute it with the -x flag to obtain detailed output:

sh -x rsun_crop.sh

Starting the script and setting the input parameters are not rising problems
I guess.

The first thing that comes up is:
"test.sh: line 50: 7593 Segmentation fault" --> Is this a kind of error
message and if yes, what´s the influence of it or what can I do to prevent
it?

That means that r.sun crashed for some reasons to be understood.
Any other Mac OS X 10.6 user in this list who could try to run the
script?

Second I get the ERROR that the maps I´m trying to create (for beam, diff
and ref irradiance) are "not found in the current" mapset and that they are
"not found". I first thought that I have to prepare these map before
starting the script, but also when I prepared the maps, it didn´t work.

They are the output of the r.sun run. Since it crashed, no output...

See screenshot of my bash:
http://osgeo-org.1803224.n2.nabble.com/file/n6203754/Screen_shot_2011-03-24_at_06.27.48.png

Consider to post such output as text here for example (easier to read):
http://osgeo.pastebin.com/

Markus

Better execute it with the -x flag to obtain detailed output:
sh -x rsun_crop.sh

thanks for the hint

Consider to post such output as text here for example (easier to read):
http://osgeo.pastebin.com/

I hope you meant it like that:
http://pastebin.com/DbBuyD7t pastebin rsun_crop.sh output

thanks,
tim

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-sun-run-script-tp6203754p6206151.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hey.

Now I think I got it. It´s all about the latitude. Just take a look on the
manual http://grass.osgeo.org/grass62/manuals/html62_user/r.sun.html r.sun
manual :
"...There is no need to define latitude for locations with known and defined
projection/coordinate system..."

Only while running r.sun with a defined latitude, the error occurred. And
I´m pretty sure that I a defined a valid latitude for my location.

So what do you all think about that?

And has anyone else tried to run the script on other OS? With and without
defining latitude?

Would be good to know if the error occurs only on Mac OS or also on other
system.

Here is current working script:
http://osgeo-org.1803224.n2.nabble.com/file/n6206439/r_sun_Tim.sh
r_sun_Tim.sh

Cheers,
Tim

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-sun-run-script-tp6203754p6206439.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Only while running r.sun with a defined latitude, the error occurred. And
I´m pretty sure that I defined a valid latitude for my location.

So what do you all think about that?

And has anyone else tried to run the script on other OS? With and without
defining latitude?

Would be good to know if the error occurs only on Mac OS or also on other
system.

Hi,

I adapted my script a little bit. Here it is:
http://osgeo-org.1803224.n2.nabble.com/file/n6212908/rsun_script_TimNorwey.sh
rsun_script_TimNorwey.sh

And I´m still interested to get some answers to my questions ;-)...

cheers,
tim

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-sun-run-script-tp6203754p6212908.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Sun, Mar 27, 2011 at 9:22 PM, TimNorwey <timmy_weyrer@live.at> wrote:

Only while running r.sun with a defined latitude, the error occurred. And
I´m pretty sure that I defined a valid latitude for my location.

Please repost the error here.

So what do you all think about that?

And has anyone else tried to run the script on other OS? With and without
defining latitude?

Would be good to know if the error occurs only on Mac OS or also on other
system.

Hi,

I adapted my script a little bit. Here it is:
http://osgeo-org.1803224.n2.nabble.com/file/n6212908/rsun_script_TimNorwey.sh

And I´m still interested to get some answers to my questions ;-)...

Markus

Only while running r.sun with a defined latitude, the error occurred. And
I´m pretty sure that I defined a valid latitude for my location.

"test.sh: line 50: 7593 Segmentation fault"

The whole error file can be seen here: http://pastebin.com/DbBuyD7t
pastebin_error_output

So what do you all think about that?

And has anyone else tried to run the script on other OS? With and without
defining latitude?

Would be good to know if the error occurs only on Mac OS or also on other
system.

cheers,
tim

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-sun-run-script-tp6203754p6216204.html
Sent from the Grass - Users mailing list archive at Nabble.com.