Page 3 of 3

Re: Add rain totals for month to dayfile or monthly data file

Posted: Wed 11 Sep 2024 6:30 am
by broadstairs
mcrossley wrote: Tue 10 Sep 2024 10:18 pm MX already has a web tag for annual rainfall #AnnualRainfall, which you can optionally specify the year. e.g. <#AnnualRainfall y=2023>

Would a new web tag for monthly rainfall where you can optionally supply the year and month, solve this problem? Something like. <#MonthRainfall y=2023 m=3>, the default being the current months total so far.

Yes that gets what I am looking for and would be very much appreciated.

Stuart

Re: Add rain totals for month to dayfile or monthly data file

Posted: Wed 11 Sep 2024 7:09 am
by rogerthn
I do not know how you get the 99.9% or if you have mawk installed but the line below does return rain in September 2024 so far and the number of days.

Code: Select all

grep "/09/24," CumulusMX/data/dayfile.txt | mawk -F',' '{ sum += $15 } END{ print sum, NR }'
33.7 9