<div dir="ltr"><div>Hi Ivan, <br></div><div><br></div><div>It does indeed count consecutive days meeting a condition per week. That's what the [-1] means in the t.rast.algebra command, i.e., it is the temporal neighbourhood modifier. If you then want to get the largest weekly consecutive days meeting the condition within a month you can aggregate the "weekly_consecutive" time series with t.rast.aggregate granularity="1 month" method="maximum"</div><div><br></div><div>HTH, <br></div><div>Vero<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue, 18 ago 2022 a las 14:42, Ivan Marchesini (<<a href="mailto:ivan.marchesini@gmail.com">ivan.marchesini@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Markus<br>
<br>
thank you<br>
<br>
Yes I saw that algorithm but, if I'm not wrong, it does not fit with my <br>
needs. The calculation made returns the number of days, in a given <br>
interval (here week), that meets a certain condition. Not sure they are <br>
consecutive. As an example: if negative temperature occur in monday and <br>
thuesday and then in friday, saturday and sunday then the code count 5 <br>
for that week. In my opinion what we need is 3.<br>
<br>
I hope I was enough clear<br>
<br>
In any case it would be good to find a solution for this type of problem <br>
because these type of indexes are  used for climate data analysis (e.g.: <br>
<a href="https://www.ecad.eu/download/millennium/millennium.php" rel="noreferrer" target="_blank">https://www.ecad.eu/download/millennium/millennium.php</a> <br>
<a href="https://www.climdex.org/learn/indices/" rel="noreferrer" target="_blank">https://www.climdex.org/learn/indices/</a> )<br>
<br>
thank you<br>
<br>
Ivan<br>
<br>
<br>
<br>
On 17/08/22 20:04, Markus Neteler wrote:<br>
> Hi Ivan,<br>
><br>
> On Wed, Aug 17, 2022 at 9:07 AM Ivan Marchesini<br>
> <<a href="mailto:ivan.marchesini@gmail.com" target="_blank">ivan.marchesini@gmail.com</a>> wrote:<br>
>> Dear grass user<br>
>><br>
>> I have daily rainfall strds<br>
>><br>
>> I would like to obtain a layer of the largest number of consecutive days<br>
>> where rainfall >1 mm<br>
> May this script code help?<br>
> <a href="https://grasswiki.osgeo.org/wiki/Temporal_data_processing#How_to_count_consecutive_days_that_meet_a_certain_condition" rel="noreferrer" target="_blank">https://grasswiki.osgeo.org/wiki/Temporal_data_processing#How_to_count_consecutive_days_that_meet_a_certain_condition</a>?<br>
><br>
> Markus<br>
><br>
>> Do you have any suggestions on how to calculate this climate index using<br>
>> grass's time modules?<br>
>><br>
>> thank you very much<br>
>><br>
>> Ivan<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote></div>