[GRASS-dev] Re: [GRASS GIS] #610: r.sun: incidout uses 0 instead of
NULL
GRASS GIS
trac at osgeo.org
Fri May 22 01:24:04 EDT 2009
#610: r.sun: incidout uses 0 instead of NULL
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.5.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords: r.sun
Platform: All | Cpu: All
---------------------+------------------------------------------------------
Comment (by hamish):
test case:
{{{
G65> g.region -d # spearfish: 44:30N 477x634
G65> r.surf.volcano out=gauss method=gaussian kurtosis=1
}}}
just after sunrise on a frosty winter's morn
{{{
G65> r.sun -s elevin="gauss" incidout="day355rad.inci.08hr" \
day=355 time=8.00
}}}
note '''western boundary cells are all NULL''' (!??) and no other:
{{{
G65> r.univar day355rad.inci.08hr
100%
total null and non-null cells: 302418
total null cells: 477
Of the non-null cells:
----------------------
n: 301941
minimum: 0
maximum: 2.85292
range: 2.85292
mean: 2.35481
mean of absolute values: 2.35481
standard deviation: 1.04271
variance: 1.08725
variation coefficient: 44.2802 %
sum: 711013.3009517193
}}}
real data range is 2.7-2.8deg above horizon
note large number of 0.0 cells:
{{{
G65> r.stats day355rad.inci.08hr nsteps=10 -c
100%
0-0.011188 49481
2.752233-2.763421 695
2.763421-2.774609 33611
2.774609-2.785797 29075
2.785797-2.796985 27769
2.796985-2.808173 34948
2.808173-2.819361 42280
2.819361-2.830549 43446
2.830549-2.841737 40635
2.841737-2.852925 1
* 477
}}}
work-around:
{{{
r.null day355rad.inci.08hr setnull=0.0
}}}
then you get nice d.histogram output, etc.
mmetz wrote:
> r.sun2/rsunlib.c#L439
> shouldn't that be
> return UNDEFZ;
> ? A wild guess.
no luck; same result.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/610#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list