<div dir="ltr"><font color="#9900ff">> <span style="font-size:12.8px">Long time back I added the SOLPOS support in r.sunmask.</span><br style="font-size:12.8px"><span style="font-size:12.8px">> Do you have a pointer to the SPA source code? Because implementing it</span><br style="font-size:12.8px"><span style="font-size:12.8px">> from a 40 pages PDF is expensive :-)</span></font><div class="gmail_extra"><br></div><div class="gmail_extra">Sorry about that. Hahaha. Here's the actual C code: </div><div class="gmail_extra"><a href="https://www.nrel.gov/midc/spa/" target="_blank">https://www.nrel.gov/midc/spa/</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><font color="#9900ff">> You may consider to tile the data (r.tile) with sufficient overlap,<br>> then process these tiles in parallel.<br></font></div><div class="gmail_extra"><br></div><div class="gmail_extra">I was choosing between r.tile or simply setting smaller computational regions. If I use r.tile and process the tiles in parallel, I assume I would need to set a different computational region per tile? The workflow would go something like this: Per tile (in parallel) set the computational region using the tile -> run r.horizon -> run r.sun<br><br>Also, do you think I should compute the horizon rasters per tile or as a whole? I tested it once and it was faster when I called r.horizon per tile.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><font color="#9900ff">> Yes, here some pointers:<br>><br>> Hofierka and Zlocha, 2012<br>> A New 3-D Solar Radiation Model for 3-D City Models<br>> <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9671.2012.01337.x/abstract" rel="noreferrer" target="_blank">http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9671.2012.01337.x/abstract</a><br>> <br>> 3-D city modeling for sustainable energy applications<br>> <a href="http://web.science.upjs.sk/hofierka/projekty/vega2_results.html" rel="noreferrer" target="_blank">http://web.science.upjs.sk/hofierka/projekty/vega2_results.html</a></font><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I'll look into this, thank you.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><font color="#9900ff"><span style="font-size:12.8px">> In case you are interested in some more parallel r.sun examples you may have a look here:</span><br style="font-size:12.8px">> <span style="font-size:12.8px"><a href="https://github.com/NINAnor/">https://github.com/NINAnor/</a></span>sentinel4nature/blob/master/r_sun_parallel.sh<br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">> The shell script (based on the content from the GRASS wiki) basically uses the tiling approach Markus was suggesting and applies r.sun > (and r.horizon) in parallel using xargs...</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">> Since my DEM has a lot of NoData within it`s bounding box I droped all tiles not covered by the DEM and used v.mkgrid for the tiling</span></font></div><div class="gmail_extra"><span style="font-size:12.8px"><font color="#9900ff">> (instead of splitting the DEM itself (but now I see that r.tile might have been more efficient).</font></span><br style="font-size:12.8px"></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thank you for this. Do you think I can do the same in Python? I don't mind working in bash but most of those I work with aren't really familiar with shell scripting.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Again, thank you all for the help.</div><div class="gmail_extra"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><br></div><div><br></div><div>Cheers,<br></div><div>Ben Hur</div><div><br></div><div>--<br><div><font size="2"><span style="font-family:'trebuchet ms',sans-serif"><b>Engr. Ben Hur S. Pintor</b><br></span></font></div><font size="2"><span style="font-family:'trebuchet ms',sans-serif"><i>Research Associate</i><br></span></font></div><font size="2"><span style="font-family:'trebuchet ms',sans-serif">Phil-LiDAR 2 Project 5: REMap<br></span></font></div><font size="2"><span style="font-family:'trebuchet ms',sans-serif">UP Training Center for Applied Geodesy and Photogrammetry<br></span></font></div><div><font size="2"><span style="font-family:'trebuchet ms',sans-serif"><i>Juris Doctor<br></i></span></font></div><div><font size="2"><span style="font-family:'trebuchet ms',sans-serif">College of Law<br></span></font></div><div dir="ltr"><div><font size="2"><span style="font-family:'trebuchet ms',sans-serif"><font color="#990000"><b>University of the Philippines Diliman</b></font></span></font></div><div><span style="font-family:'arial black',sans-serif"><font color="#000000"><font size="2"><span style="font-family:'trebuchet ms',sans-serif">Quezon City 1101, PHL</span></font></font></span></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 8:35 PM, Blumentrath, Stefan <span dir="ltr"><<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ben,<br>
<br>
In case you are interested in some more parallel r.sun examples you may have a look here:<br>
<a href="https://github.com/NINAnor/sentinel4nature/blob/master/r_sun_parallel.sh" rel="noreferrer" target="_blank">https://github.com/NINAnor/sentinel4nature/blob/master/r_sun_parallel.sh</a><br>
<br>
The shell script (based on the content from the GRASS wiki) basically uses the tiling approach Markus was suggesting and applies r.sun (and r.horizon) in parallel using xargs...<br>
<br>
Since my DEM has a lot of NoData within it`s bounding box I droped all tiles not covered by the DEM and used v.mkgrid for the tiling (instead of splitting the DEM itself (but now I see that r.tile might have been more efficient).<br>
<br>
BTW, are overlapping tiles required, when r.horizon considers a user-defined distance outside of the current region?<br>
<br>
Cheers,<br>
Stefan<br>
<div><div class="h5"><br>
-----Original Message-----<br>
From: grass-dev [mailto:<a href="mailto:grass-dev-bounces@lists.osgeo.org">grass-dev-bounces@lists.osgeo.org</a>] On Behalf Of Markus Neteler<br>
Sent: 28. april 2016 14:12<br>
To: Ben Hur Pintor <<a href="mailto:bnhr.dev@gmail.com">bnhr.dev@gmail.com</a>><br>
Cc: GRASS-dev <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>
Subject: Re: [GRASS-dev] [r.sun]<br>
<br>
On Thu, Apr 28, 2016 at 1:48 PM, Ben Hur Pintor <<a href="mailto:bnhr.dev@gmail.com">bnhr.dev@gmail.com</a>> wrote:<br>
> Thanks for the response. I've seen a lot of literature and uses of<br>
> r.sun which is one of the reasons why I chose it as my model aside<br>
> from the fact that it's open-source. However, most of the uses are<br>
> European setting which I understand since r.sun is based on ESRA. I<br>
> wanted to see how well r.sun performs in a more tropical setting and<br>
> from my initial findings and studies, it seems to be doing pretty well.<br>
><br>
> r.sun and r.sunmask both seem to use the SOLPOS algorithm, the SPA<br>
> (<a href="http://www.nrel.gov/docs/fy08osti/34302.pdf" rel="noreferrer" target="_blank">http://www.nrel.gov/docs/fy08osti/34302.pdf</a>) is a more recent solar<br>
> positioning algorithm by NREL and is much more precise than SOLPOS so<br>
> I wondered if using SPA instead of SOLPOS might provide better results.<br>
<br>
Long time back I added the SOLPOS support in r.sunmask.<br>
Do you have a pointer to the SPA source code? Because implementing it from a 40 pages PDF is expensive :-)<br>
<br>
> With regards to using LiDAR-derived raster data, my machine can<br>
> actually handle it but it just takes a lot of time. I have a 1m<br>
> resolution LiDAR of a<br>
> 500 sq km area (~5GB) and it really just takes a lot of time and disk<br>
> space<br>
> -- specially for horizon rasters. I'm looking into parallel processing<br>
> to remedy this issue.<br>
<br>
You may consider to tile the data (r.tile) with sufficient overlap, then process these tiles in parallel.<br>
<br>
> Lastly, I would also like to go into 3D urban solar energy modelling<br>
> which is why I asked about v.sun or any other attempts in GRASS to<br>
> develop a model for solar radiation received by 3D objects (i.e.<br>
> buildings including facades and roofs).<br>
<br>
Yes, here some pointers:<br>
<br>
Hofierka and Zlocha, 2012<br>
A New 3-D Solar Radiation Model for 3-D City Models <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9671.2012.01337.x/abstract" rel="noreferrer" target="_blank">http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9671.2012.01337.x/abstract</a><br>
<br>
3-D city modeling for sustainable energy applications <a href="http://web.science.upjs.sk/hofierka/projekty/vega2_results.html" rel="noreferrer" target="_blank">http://web.science.upjs.sk/hofierka/projekty/vega2_results.html</a><br>
<br>
Hope this helps for a start,<br>
Markus<br>
<br>
--<br>
Markus Neteler<br>
</div></div><a href="http://www.mundialis.de" rel="noreferrer" target="_blank">http://www.mundialis.de</a> - free data with free software <a href="http://grass.osgeo.org" rel="noreferrer" target="_blank">http://grass.osgeo.org</a> <a href="http://courses.neteler.org/blog" rel="noreferrer" target="_blank">http://courses.neteler.org/blog</a> _______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div dir="ltr"><span><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><br><div><font size="2"><span style="font-family:trebuchet ms,sans-serif"><b>Engr. Ben Hur S. Pintor</b><br></span></font></div><font size="2"><span style="font-family:trebuchet ms,sans-serif"><i>Research Associate</i><br></span></font></div><font size="2"><span style="font-family:trebuchet ms,sans-serif">Phil-LiDAR 2 Project 5: REMap<br></span></font></div><font size="2"><span style="font-family:trebuchet ms,sans-serif">UP Training Center for Applied Geodesy and Photogrammetry<br></span></font></div><div><font size="2"><span style="font-family:trebuchet ms,sans-serif"><i>Juris Doctor<br></i></span></font></div><div><font size="2"><span style="font-family:trebuchet ms,sans-serif">College of Law<br></span></font></div><div dir="ltr"><div><div><div><div><div><div><font size="2"><span style="font-family:trebuchet ms,sans-serif"><font color="#990000"><b>University of the Philippines Diliman</b></font></span></font></div><div><span style="font-family:arial black,sans-serif"><font color="#000000"><font size="2"><span style="font-family:trebuchet ms,sans-serif">Quezon City 1101, PHL</span></font></font></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></span></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>