[GRASS-user] r.sun and r.horizon

Markus Neteler neteler at osgeo.org
Fri Nov 6 17:26:00 EST 2009


On Fri, Nov 6, 2009 at 8:41 PM, Jonathan Greenberg
<greenberg at ucdavis.edu> wrote:
> I saw some posts by Markus about getting r.horizon and r.sun "synced" (such
> that the output files of r.horizon correspond to the time steps of r.sun)--

[ that was from Hamish ]

> I was wondering if there are any conclusions on how best to use r.horizon
> and r.sun together so they most closely mimic using the -s shadow flag,
> specifically with daily integrations.  We're about to start doing some
> MASSIVE r.sun processing (input DEM ~ 80gb) so we'd like to know how to
> pre-calculate the horizon info to speed this up.  Thanks!

I have done such calculations last week. From all the tests done by Hamish
I got the conclusion that it is *currently* the best to not use r.horizon but
to calculate the horizon within r.sun.

Here what I used:

# step=0.05: 3 minutes time step alias 1deg sun movement
# horizonstep=1 to match step

r.sun -s elevin=$DEM day=$DOY horizonstep=1 step=0.05 \
         linkein=linke_turbidity${month} \
         insol_time=${PREFIX}_insol_time.$DOY

Advantage: without the r.horizon output maps the RAM consumption
is much lower. See formula in
http://grass.osgeo.org/grass64/manuals/html64_user/r.sun.html
where 'horizonsteps' refers to the r.horizon output maps.

Some notes (and multi-core parallelization trick) have been collected at
http://grass.osgeo.org/wiki/R.sun
but a new section of "Recommendations" should be added there.
Contributions welcome.

Markus


More information about the grass-user mailing list