New to weewx customizations

112 views
Skip to first unread message

Jacques Desroches

unread,
Jan 25, 2024, 1:28:09 PM1/25/24
to weewx-user
Hi,

I'm new to weewx and I want to adapt my current template to weewx.
My site worked with Cumulus, since 2010... But new station is incompatible.

So, I'm giving a try to weewx, and I'm searching a few info to complete my template;

I've tried to calc max temp - min temp, but result is "raw" (0.7222222222222285)
#set $tempDiff = $day.outTemp.max.raw - $day.outTemp.min.raw

Also, I try to display dominant wind for the day:
$day.windDir at $day.windDir.format("%H:%M")

Finally, is there a way to know how many days with or without rain?

Hope having write to the right place ;-)

Thanks in advance,
Jacques

David Schulz

unread,
Jan 25, 2024, 1:51:11 PM1/25/24
to weewx-user
Hi,

you need something like this.

#from weewx.units import ValueTuple, ValueHelper
#set $temprange=($day.outTemp.max.degree_C.raw - $day.outTemp.min.degree_C.raw)
#set temprange_vh=ValueHelper(ValueTuple($temprange,'degree_C','group_temperature'),formatter=$station.formatter)

$temprange_vh.format("%.1f",add_label=True)

and for the  dominant wind, look in the docs pls.


$day.wind.vecavg The vector average wind speed since midnight. If the wind blows east at 5 m/s for 2 hours, then west at 5 m/s for 2 hours, the vector average wind speed is zero.
$day.wind.vecdir The direction of the vector averaged wind speed. If the wind blows northwest at 5 m/s for two hours, then southwest at 5 m/s for two hours, the vector averaged direction is west.
$day.windDir.avg Not a very useful quantity. This is the strict, arithmetic average of all the compass wind directions. If the wind blows at 350° for two hours then at 10° for two hours, then the scalar average wind direction will be 180° — probably not what you expect, nor want.

vince

unread,
Jan 25, 2024, 2:01:57 PM1/25/24
to weewx-user
My lastrain extension (link) will report the time since the last rain occurred.
Reply all
Reply to author
Forward
0 new messages