I'm a bit lost on windrun right now and could use guidance. This is on weewx 3.9.2
My $year.windrun.maxsum is reporting 22617.05 miles which seems just a little high. To the point where I thought this was a Belchertown skin issue <https://github.com/poblabs/weewx-belchertown/issues/194#issuecomment-541374600>. I don't think it is because Belchertown isn't calculating windrun, just using the Cheetah tag to display it. The calculation of windrun <https://github.com/weewx/weewx/blob/master/bin/weewx/wxservices.py#L384> seems simple. windSpeed * interval / 60.0 if windSpeed is not None. Exporting my database to a new MySQL database, I run this query to reset all my windrun values in the archive table: UPDATE weewx.archive SET windrun = (windSpeed * `interval` / 60.0) where windSpeed > 0; Then I dropped daily summaries and rebuilt. After doing that my $year.windrun.maxsum is 9986.7. So there's an improvement here, but still very high. According to this, my highest sum windrun is on 1452038400 (Wednesday, January 6, 2016 12:00:00 AM) MariaDB [weewx]> SELECT * FROM `archive_day_windrun` ORDER BY `sum` DESC LIMIT 1; +------------+------+------------+---------------+------------+------------------+-------+------------------+---------+ | dateTime | min | mintime | max | maxtime | sum | count | wsum | sumtime | +------------+------+------------+---------------+------------+------------------+-------+------------------+---------+ | 1452038400 | 0 | 1452056460 | 32.6649722222 | 1452038460 | 9986.70872221597 | 1418 | 599202.523332966 | 85080 | +------------+------+------------+---------------+------------+------------------+-------+------------------+---------+ 1 row in set (0.00 sec) To get this day range, it's 1452038400 to 1452142799 (Wednesday, January 6, 2016 11:59:59 PM GMT-05:00) So this query below takes that time range and figures out the average wind speed, and the average windspeed across 24 hours as suggested here <https://github.com/poblabs/weewx-belchertown/issues/194#issuecomment-542479902> . MariaDB [weewx]> select avg(windSpeed) as avg_windspeed, (avg(windSpeed)*24) as thisDayWindRun from archive where dateTime >= 1452038400 and dateTime <= 1452142799; +---------------------+-------------------+ | avg_windspeed | thisDayWindRun | +---------------------+-------------------+ | 0.09232844574780066 | 2.215882697947216 | +---------------------+-------------------+ 1 row in set (0.00 sec) If windrun is a scalar sum <https://github.com/weewx/weewx/issues/250#issuecomment-344936685>, then I'm pretty sure I just add all the windspeed together to get the daily windrun? This show's it's 157.42 MariaDB [weewx]> select sum(windspeed) from archive where dateTime >= 1452038400 and dateTime <= 1452142799; +--------------------+ | sum(windspeed) | +--------------------+ | 157.42000000000013 | +--------------------+ 1 row in set (0.00 sec) Here's the same day's wind speed record: MariaDB [weewx]> SELECT * FROM `archive_day_windSpeed` where dateTime = 1452038400; +------------+------+------------+------+------------+--------+-------+--------+---------+ | dateTime | min | mintime | max | maxtime | sum | count | wsum | sumtime | +------------+------+------------+------+------------+--------+-------+--------+---------+ | 1452038400 | 0 | 1452038460 | 3.5 | 1452098700 | 157.37 | 1419 | 9442.2 | 85140 | +------------+------+------------+------+------------+--------+-------+--------+---------+ 1 row in set (0.00 sec) So I'm lost on where 9,986.7 is coming from? -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/484df625-fb4c-474c-a665-3bbea34f5bcc%40googlegroups.com.
