[GRASS-dev] Re: r.series: threshold/count method?

Markus Neteler neteler at osgeo.org
Wed Sep 2 17:27:09 EDT 2009

On Sun, Aug 30, 2009 at 9:05 PM, Markus Neteler<neteler at osgeo.org> wrote:
> On Fri, Aug 28, 2009 at 10:47 PM, Markus Neteler<neteler at osgeo.org> wrote:
>> Hi,
>> it would be ideal to have a new threshold/count method in r.series.
>> Example: I am calculating growing degree days (accumulated temperatures
>> over one year, [1]) and want to know at which day of year (count) this
>> happens. Input would be 365 growing degree days maps, parameters
>> a threshold value (e.g. 440 for insect moulting) and the result a
>> count value per pixel which corresponds to the map number which
>> I gave as input (which is the day of year DOY in this case).
>> Would that be hard to implement? A bit of rounding/epsilon will be
>> involved to match the requested threshold since the input maps
>> are typically FP maps.
>> I can imagine more use cases: first frost day in autumn (theshold -0.1°C
>> or so), input daily minimum temperature maps and more...
>> Markus
>> [1] http://en.wikipedia.org/wiki/Growing_degree_day
> Attached an attempt for review.
> My problem is how to pass the threshold value into the function

It seems that adding a new parameter would break the internal API.
Hope that I am wrong...


> (currently hardcoded sample value).
> Markus

More information about the grass-dev mailing list