Hi, It's a bit complicated but effectively you cannot use wind.xxxx in anything other than $day, $week, $month and $year. This is mentioned in the Customization Guide http://weewx.com/docs/customizing.htm#Wind.
Unfortunately you cannot use $span with wind (well you can but it will normally only work once a day at midnight). The reason is that the vector wind observation is stored in the daily summaries and not the archive. The daily summaries can only be used when the period you are using in your aggregate is some number of whole days (ie it starts and ends on a midnight boundary) OR starts on a midnight boundary and ends with the last archive record OR starts with the first record in the archive and ends on a midnight boundary. If an aggregate uses a period that does not meet these conditions then the daily summaries are not used and weeWX falls back to using the archive. Since the vector wind observation is only available in the daily summaries, a period that does not meet these requirements means the vector wind observation cannot be used. In the case of the $span tag, it uses a period some time (days, hours, seconds) ago and ending on the current report time. So if the time is 8am Wednesday a $span using days=2 would be from 8am Monday to 8am Wednesday. So in this case (assuming the archive has records covering a greater period than 8am Monday to 8am Wednesday) the daily summaries could not be used and hence vector wind is not available. The only time wind will work is at midnight where days=2 would put you on a midnight-midnight boundary and hence the daily summaries would be used and vector wind is available. $week on the other hand uses the midnight boundary at the start of the week as the start of the period and the end of the period is the last record in the archive. So in this case the daily summaries can be used and wind.vecdir works. As it will with $day, $month and $year. Gary -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
