<p dir="ltr">Hi Emmanuel,</p>
<p dir="ltr">> Hi,<br>
><br>
> I have 3hourly rainrate data for a given region in a GRASS temporal<br>
> database (strds).<br>
><br>
> I want to aggregate the data by summing all raster from the previous<br>
> 10 days to calculate the accumulated rainfall.<br>
> The temporal modules have several tools:<br>
> t.rast.series<br>
> t.rast.accumulate<br>
> t.rast.aggregate<br>
> t.rast.mapcalc<br>
><br>
> >From the manual, the appropriate module seems to be t.rast.accumulate<br>
> but it does not have sum in the method parameters. Currently, I'm<br>
> running several r.series commands for each day like below:<br>
><br>
> r.series input=\<br>
> "`t.rast.list input=3hr_rainrate where=\<br>
> "('${DATE} 00:00:00' >= datetime(start_time, '3 hours')) \<br>
> and ('${DATE} 00:00:00' <= datetime(start_time, '10 days')) " \<br>
> col=name method=comma`" \<br>
> output="test_2014-07-20" method=sum<br>
><br>
> Then, register each layer in another strds:<br>
><br>
> #Create a new STRDS<br>
> t.create output='10day_accumulation' type='strds' temporaltype='absolute' \<br>
> title='10day_accumulation' \<br>
> description="10 day rainfall accumulation"<br>
><br>
><br>
> g.mlist type='rast', pattern='test*', separator=','<br>
><br>
> #Register the r.series output to the strds<br>
> t.register -i type=rast input=10day_accumulation \<br>
> start="2014-07-10 00:00:00" increment="1 days" separator="," \<br>
> maps="`g.mlist type='rast', pattern='test*', separator=','`"<br>
><br>
><br>
> Is there another approach using directly any of the t.rast.* modules.<br>
> For a time-line visualization, here's what I want to do:<br>
> <a href="https://dl.dropboxusercontent.com/u/2096185/sample_accumulation.png">https://dl.dropboxusercontent.com/u/2096185/sample_accumulation.png</a><br>
><br>
> Thanks!</p>
<p dir="ltr">If i understood right, something like</p>
<p dir="ltr">t.rast.aggregate input=3hr_rainrate output=10day_rain basename=10day_rain granularity='10 days' method=sum</p>
<p dir="ltr">should do the what you need.</p>
<p dir="ltr">HTH,</p>
<p dir="ltr">Vero<br>
</p>