<div dir="ltr"><div>Hello Emma, <br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-03 23:47 GMT-03:00 maning sambale <span dir="ltr"><<a href="mailto:emmanuel.sambale@gmail.com" target="_blank">emmanuel.sambale@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear Vero,</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Thanks for the reply.  But t.rast.aggregate does not do what I intend<br>
to do.  My rainrate is from a span of 20 days.<br>
t.rast.aggregate produces (as expected) two rasters, one for each of<br>
the 10day accumulation.  What I want for example is like a moving sum,<br>
where for each day, it calculates the sum for the past 10 days.<br>
<div class=""><div class="h5"><br></div></div></blockquote><div><br></div><div>Oh, I see... then, t.rast.accumulate is what you need. The default method "mean" does the sum.</div><div><br></div><div>Maybe, something like this (please re-check the cycle and granularity parameters, i didn't test)</div><div><br></div><div>t.rast.accumulate input=3hr_rainrate output=10day_acum_precip base=10day_acc_prec start="2001-01-01" end="2001-01-20" cycle="10 days" granularity="1 days" method=mean</div><div><br></div><div>Hope it helps now :)</div><div><br></div><div>Cheers, </div><div>Vero </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">
On Thu, Dec 4, 2014 at 4:31 AM, Veronica Andreo <<a href="mailto:veroandreo@gmail.com">veroandreo@gmail.com</a>> wrote:<br>
> Hi Emmanuel,<br>
><br>
>> 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>
>> \<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" target="_blank">https://dl.dropboxusercontent.com/u/2096185/sample_accumulation.png</a><br>
>><br>
>> Thanks!<br>
><br>
> If i understood right, something like<br>
><br>
> t.rast.aggregate input=3hr_rainrate output=10day_rain basename=10day_rain<br>
> granularity='10 days' method=sum<br>
><br>
> should do the what you need.<br>
><br>
> HTH,<br>
><br>
> Vero<br>
<br>
<br>
<br>
</div></div><span class=""><font color="#888888">--<br>
cheers,<br>
maning<br>
------------------------------------------------------<br>
"Freedom is still the most radical idea of all" -N.Branden<br>
wiki: <a href="http://esambale.wikispaces.com/" target="_blank">http://esambale.wikispaces.com/</a><br>
blog: <a href="http://epsg4253.wordpress.com/" target="_blank">http://epsg4253.wordpress.com/</a><br>
------------------------------------------------------<br>
</font></span></blockquote></div><br></div></div>