I am trying to optimize the speed of r.sun to compute shadowed area on a DTM at 1m resolution. My current area is 3.39 km² but my final area will be 450 km².
The r.sun wiki say that pre-computing horizons as well as lat/lon increase the model, but the opposite happen on my computer (GRASS 7.0.1RC2, Windows7 64 bits [although r.sun run in 32 bits mode], 4 CPU, 8 threads)
Here is an example:
r.sun elevation=MNEcomplet@ShadowProject day=88 time=7 incidout=incidoutD88T07 --overwrite npartitions=2 distance_step=1
==> 38 sec
r.sun elevation=MNEcomplet@ShadowProject horizon_basename=horizon horizon_step=30 day=88 time=7 incidout=incidoutD88T07 --overwrite npartitions=2 distance_step=1.0 lat=MNEcomplet.lat long=MNEcomplet.lon
==> between 56 sec and 1min7s
npartitions are different on the 2 examples (I have no choice), but this parameter has not a big impact on the computing time.
Does anyone have an idea why it has this behavior?
Testing on Grass 6.4, using horizons allows me to decrease computation time from 42-50s to 32s.
Another question is: Is there a possibility to avoid the computation of the sun angles for each cell ?
Providing a single value for the whole area would be ok for me, and I can compute it by myself