[GRASS-dev] Re: [GRASS GIS] #498: r.sun2 out of sync / broken svn
history
GRASS GIS
trac at osgeo.org
Tue Aug 11 04:43:14 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):
Replying to [comment:7 hamish]:
> Q2) am I using aspin= correctly? should that be a map
> created by r.slope.aspect? Using it the processing speeds
> up by 3x, but the results seem a bit weird -- to the south
> of the mound is a depression in the light which while possible
> for reflected light seems that it would be "upstream" &
> incorrect for beam_rad.
>
> defining a slopein= map (from r.slope.aspect result) doesn't
> change the processing time appreciably. I haven't tested for
> its effect on the output map yet.
correction: using aspin=`r.slope.aspect` doesn't speed things up, but
slope+aspect does. Using slopein= causes differences (missing south west
butterfly wing), but slope+aspect makes it really bad.
test script:
{{{
time r.sun -s elevin=gauss day=$DAY beam_rad=rad_test.355.beam.try4
real 3m1.750s
user 3m1.327s
sys 0m0.400s
#
time r.sun -s elevin=gauss day=$DAY beam_rad=rad_test.355.beamA.try4 \
aspin=guass.aspect
real 3m4.432s
user 3m4.092s
sys 0m0.364s
#
time r.sun -s elevin=gauss day=$DAY beam_rad=rad_test.355.beamS.try4 \
slopein=guass.slope
real 3m7.865s
user 3m6.444s
sys 0m0.612s
#
time r.sun -s elevin=gauss day=$DAY beam_rad=rad_test.355.beamAS.try4 \
aspin=guass.aspect slopein=guass.slope
real 1m32.279s
user 1m31.686s
sys 0m0.240s
#
r.contour in=gauss out=gauss_200m_contours step=200
plot_stuff()
{
MAP="rad_test.355.beam${MAPEXT}.try4"
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"
}
###
d.mon x1
d.resize w=640 h=480
d.split.frame 4
#
d.frame uno
MAPEXT=""
plot_stuff "Std."
#
d.frame dos
MAPEXT="A"
plot_stuff "w/Aspect map"
#
d.frame tres
MAPEXT="S"
plot_stuff "w/Slope map"
#
d.frame cuatro
MAPEXT="AS"
plot_stuff "w/Aspect and Slope maps"
###
d.frame full_screen
#d.out.file out=rsun_aspslp format=png
}}}
results in the attached image (rsun_aspslp.png).
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/498#comment:8>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list