Page 1 of 2

Count days since the last recorded rainfall

Posted: Sat Jun 18, 2022 9:07 am
by Rodribrif
Hello from Spain, firstly i would like to intruduce myself, my name is Rodrigo, im a wildland firefighter, and weather entusiastic. sorry if this question is a repeat, but I have searched on forum and can not see any relevant informatión.

Im using meteobridge pro(red) connected yo David VP pro2 posting on Twitter som relevant weather data for wildfire prevention and firefighting, i would like to show the number of days since the last recorded rainfall but i cant find the way to get this data.
Any help must be must apreciated
Thanks and best regards from spain

Re: Count days since the last recorded rainfall

Posted: Thu Jun 23, 2022 10:11 am
by admin
Please try variable "[rain0total-nonzerotime:--]". It should report timestamp of last time some rain was depicted.

Wiki also explains available variables: https://meteobridge.com/wiki/index.php/Templates

Re: Count days since the last recorded rainfall

Posted: Fri Jun 24, 2022 6:47 pm
by masgio69
Hi, the tag works, but the return value is the date of the last rain, not the days that it doesn't rain.

Re: Count days since the last recorded rainfall

Posted: Fri Jun 24, 2022 11:22 pm
by Mattk
Include an expression which determines the number of days between the timestamp of the last rain depicted and current timestamp for today

Re: Count days since the last recorded rainfall

Posted: Sat Jun 25, 2022 7:37 pm
by masgio69
How do you do ? I don't know the right tag, thank you so much for your help !!!

Re: Count days since the last recorded rainfall

Posted: Sat Jun 25, 2022 11:42 pm
by Mattk
The following will give you the number of whole and decimal part days from the current time to the time of last rain record. This simply determines the number of seconds between the current epoch (in linux time) to the linux epoch time of last rain record. Divide that by 86400 (# seconds in a day) and you have the number of complete days

{*([epoch]-[rain0total-nonzerotime=epoch])/86400:--*}

By including a 0 (zero) *0} before the end of the expression then the output will be an integer number of whole days rounded

{*([epoch]-[rain0total-nonzerotime=epoch])/86400:--*0}

Re: Count days since the last recorded rainfall

Posted: Sun Jun 26, 2022 6:15 pm
by masgio69
Thank you so much!!!!

Re: Count days since the last recorded rainfall

Posted: Mon Jun 27, 2022 3:39 pm
by masgio69
Hi mattk, with the same principle is it possible to obtain the temperature difference between now and 1 year ago? Thanks a lot for the answer.

Re: Count days since the last recorded rainfall

Posted: Thu Jun 30, 2022 6:59 am
by Mattk
No not really, not using epoch time anyway but you could go back in hours and determine the min, max or avg hourly temp value using the @specifier and compare that to the min60, max60 or avg60 being the now /current temp for the past hour. This method gets a little quirky with leap years but for the purpose just assume 1 year ago is 365 days or 8760 hours in the past. Then something like the following would provide the average delta temperature from the hour 365 days ago to the current hour. Replacing avg with min or max would give the result based on minimum or maximum temp within the hour. If you wanted the resultant sign +/- temp difference to mean something then simply swap the template variables over within the expression

{*[th0temp-avg60]-[th0temp-avg@h8760]*}

Re: Count days since the last recorded rainfall

Posted: Thu Jun 30, 2022 5:46 pm
by masgio69
Thank you very much, as always it works correctly, one problem, the expression returns to me with 2 decimals, is it possible to do only 1?
A thousand thanks.

Re: Count days since the last recorded rainfall

Posted: Fri Jul 01, 2022 1:24 am
by Mattk
No problem {*[th0temp-avg60]-[th0temp-avg@h8760]*1}

Re: Count days since the last recorded rainfall

Posted: Fri Jul 01, 2022 10:56 am
by masgio69
Thank thank thank you so much!!!

Re: Count days since the last recorded rainfall

Posted: Sun Jul 03, 2022 10:42 am
by masgio69
Hi, since you are so kind and competent I ask you another thing, I don't know if it is possible to do it, but I try. In practice I would like to find a tag that indicates the difference in rainfall in one period compared to another, for example the difference in mm from January 1st to today compared to the same period last year.
I thank you in advance.

Re: Count days since the last recorded rainfall

Posted: Wed Jul 06, 2022 11:13 pm
by Mattk
No I can't see a means to go back in time and determine rainfall total over a specific interval. Rainfall total for this year Jan 1 to today is no problem but there is no mechanism to simply determine the rain total from Jan 1 to today's date in 2021?

Re: Count days since the last recorded rainfall

Posted: Thu Jul 07, 2022 9:47 am
by masgio69
Dont worry , thank you so much.