<p dir="ltr">Thanks, Sören!</p>
<p dir="ltr">I anxiously await for that paper :)</p>
<p dir="ltr">Cheers,<br>
Vero</p>
<div class="gmail_quote">El sep 25, 2015 12:31 PM, "Sören Gebbert" <<a href="mailto:soerengebbert@googlemail.com">soerengebbert@googlemail.com</a>> escribió:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi,<br>
Sorry, i am unable to help here, since the algebra is a deep mistery for me as well. I think that after i have finished a paper about it, the algebra will be much better documented.</p>
<p dir="ltr">Ciao<br>
Sören</p>
<div class="gmail_quote">Am 25.09.2015 16:40 schrieb "Veronica Andreo" <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Moritz, </div><div><br></div><div>I eventually solved it like this:</div><div><br></div><div><div>t.rast.aggregate -s input=cla granularity="1 years" method=minimum output=yearly_min basename=yearly_min</div><div>t.rast.aggregate -s input=cla granularity="1 months" method=minimum output=monthly_min basename=monthly_min</div><div><br></div><div><div>YEAR_I=2003 ; YEAR_F=2013</div><div>MONTH_I=1 ;MONTH_F=12</div><div><br></div><div>for YEAR in `seq $YEAR_I $YEAR_F` ; do </div><div>for MONTH in `seq -w $MONTH_I $MONTH_F` ; do </div><div>r.mapcalc expression="month_min_${YEAR}_${MONTH} = if(monthly_min_${YEAR}_${MONTH} == yearly_min_${YEAR}, ${MONTH}, null())" --o<br></div><div>done</div><div>done</div></div><div><br></div></div><div><div>r.series input=`g.list type=raster pattern=*_ag sep=,` output=month_of_min_mode method=mode</div></div><div><br></div><div>Alternatively, </div><div><br></div><div>1. t.rast.aggregate -s input=cla granularity="1 months" method=minimum output=monthly_min basename=monthly_min<br></div><div><br></div><div>2. t.rast.aggregate -s input=monthly_min granularity="1 years" method=min_rast output=yearly_min_index</div><div><br></div><div>3. r.series input=`g.list rast pat=yearly_min_ind* sep=,` method=mode<br></div><div><br></div><div>4. r.reclass with</div><div><br></div><div>0 <span style="white-space:pre-wrap"> </span>= 1<br></div><div>1 <span style="white-space:pre-wrap"> </span>= 2</div><div>2 <span style="white-space:pre-wrap"> </span>= 3</div><div>3 <span style="white-space:pre-wrap"> </span>= 4</div><div>4 <span style="white-space:pre-wrap"> </span>= 5</div><div>5 <span style="white-space:pre-wrap"> </span>= 6</div><div>6 <span style="white-space:pre-wrap"> </span>= 7</div><div>7 <span style="white-space:pre-wrap"> </span>= 8 </div><div>8 <span style="white-space:pre-wrap"> </span>= 9</div><div>9 <span style="white-space:pre-wrap"> </span>= 10</div><div>10 <span style="white-space:pre-wrap"> </span>= 11</div><div>11 <span style="white-space:pre-wrap"> </span>= 12</div><div><br></div><div>Meanwhile, I still think t.rast.algebra should do the job in one command... I just cannot <br></div><div>figure it out (yet) from the manual page: <a href="https://grass.osgeo.org/grass71/manuals/t.rast.algebra.html" target="_blank">https://grass.osgeo.org/grass71/manuals/t.rast.algebra.html</a></div><div><br></div><div>I keep studying it, though</div><div><br></div><div>Thanks a lot!</div><div>Vero</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-24 3:58 GMT-03:00 Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 18/09/15 17:38, Veronica Andreo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Soeren, list<br>
<br>
I need some help with t.rast.algebra. Well, if it is that my problem is<br>
really a t.rast.algebra problem...<br>
<br>
I have 2 strds with different granularities. A is an annual time series<br>
that contains the min annual temperature, B is a monthly time series<br>
containing the min monthly temperature. I want to compare the two of<br>
them, and when a pixel of B equals that of A, I need to get the<br>
start_month(B) but with the temporal resolution of A. So, what I want as<br>
output is a yearly time series containing the month in which the minimum<br>
temperature of each year occurs. Does that make any sense??<br>
<br>
I been studying t.rast.algebra all morning now and trying different kind<br>
of relationships (with no success), and I got lost in the different<br>
relationships and the different ways to express them.<br>
<br>
Can someone point me to the right way of using t.rast.algebra for this<br>
problem?<br>
</blockquote>
<br></span>
No help for t.rast.algebra, but wouldn't looping over the years and applying t.rast.series with method=min_raster get you what you want ?<span><font color="#888888"><br>
<br>
Moritz<br>
</font></span></blockquote></div><br></div>
</blockquote></div>
</blockquote></div>