[GRASS-dev] Re: [GRASS GIS] #498: r.sun2 out of sync / broken svn
history
GRASS GIS
trac at osgeo.org
Tue Aug 11 05:33:29 EDT 2009
#498: r.sun2 out of sync / broken svn history
---------------------+------------------------------------------------------
Reporter: hamish | Owner: hamish
Type: defect | Status: assigned
Priority: major | Milestone: 6.4.0
Component: Raster | Version: svn-develbranch6
Resolution: | Keywords: r.sun
Platform: Linux | Cpu: x86-32
---------------------+------------------------------------------------------
Comment (by hamish):
> Q1) how small must the horizonstep be to recreate the beam_rad
> output map effectively as good as e.g. seen in the r.sun wiki
> page example?
trials showing differences between no horizon steps; trying to find the
ideal "sweet spot" compromise between time and quality.
note that none are perfect. Standard r.sun with no horizon inputs is
slightly clipped in lower east wing; the 360x 1 degree horizon map has
slightly uneven width between inner east & west bands.
note2 color tables are not constant between maps.
see attached screenshot (rsun_horizons.png)
test script:
{{{
for DEG in 1 15 30 ; do
# can take a while to create all maps
r.horizon elev=gauss horizonstep=$DEG dist=0.7 horizon=horangle$DEG
time r.sun -s elevin=gauss day=$DAY horizon=horangle$DEG \
horizonstep=$DEG beam_rad=rad_test.355.beam.Hz${DEG}deg.try5
done
# r.sun with no horizon seeds
real 3m7.571s
user 3m7.444s
sys 0m0.060s
# r.sun with 360x 1 deg seeds
# sits quite a while at 0% due to loading sheer number of horizon maps!
real 1m20.385s
user 1m18.853s
sys 0m1.272s
# r.sun with 24x 15 deg seeds
real 0m32.185s
user 0m31.774s
sys 0m0.248s
# r.sun with 12x 30 deg seeds
real 0m29.518s
user 0m29.382s
sys 0m0.120s
#
}}}
{{{
plot_stuff()
{
r.colors $MAP -e color=bcyr
d.rast "$MAP"
d.vect gauss_200m_contours color=180:180:180
echo "$1" | d.text color=black
eval `r.univar -g $MAP`
echo "sum: $sum" | d.text color=black at=1,5
d.legend "$MAP" range=1300,1500
}
###
d.mon x2
d.resize w=1024 h=768
d.split.frame 4
#
d.frame uno
MAP=rad_test.355.beam.try5
plot_stuff "Std."
#
d.frame dos
MAP=rad_test.355.beam.Hz1deg.try5
plot_stuff "w/ 1 degree horizon seeds"
#
d.frame tres
MAP=rad_test.355.beam.Hz15deg.try5
plot_stuff "w/ 15 degree horizon seeds"
#
d.frame cuatro
MAP=rad_test.355.beam.Hz30deg.try5
plot_stuff "w/ 30 degree horizon seeds"
###
d.frame full_screen
#d.out.file out=rsun_horizons format=png
}}}
next I will try std and 1deg horizons with a r.sun time step of 3 min
instead of 30 minutes. (sun travels ~1deg of sky in 4min)
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/498#comment:9>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list