Windrose with weewx

863 views
Skip to first unread message

Ralf Buck

unread,
Aug 7, 2016, 6:13:30 AM8/7/16
to weewx-user
hello

how can i create a windrose like this one:



regard

gjr80

unread,
Aug 7, 2016, 9:11:36 AM8/7/16
to weewx-user
Hi,

I wrote a weewx generator to produce a similar plot as part of the Weewx-WD extension a couple of years back. The output produced is as per the attached file. Most parameters (colours, units, period, observation (windSpeed or windGust)) are customisable via the associated skin.conf. If you wish to use it I am sure you do not want to install the whole Weewx-WD extension, I should be able to package the windrose plot up as its own extension. Give us a day or so and I'll post back here.

Gary

daywindrose.png

Ralf Buck

unread,
Aug 7, 2016, 9:39:37 AM8/7/16
to weewx-user
thx

gjr80

unread,
Aug 8, 2016, 10:36:01 AM8/8/16
to weewx-user
I have packaged up the windrose generator into a weewx extension. It's been tested it under weewx 3.5.0 with simulator and it worked fine, it should work under weewx v3.2.0 and later. The extension can be downloaded here - you want the stackedwindrose-X.Y.Z.tar.gz file not the others. If you are not familiar with installing extensions there are instructions on the main page (readme) of the github repo I linked as well as inside the tar.gz. Key settings you might want to change are units, date-time format and depending on what fonts you have installed you may need to change the fonts and probably background colours etc.

Gary
Message has been deleted

Ralf Buck

unread,
Aug 8, 2016, 2:11:17 PM8/8/16
to weewx-user
i get this here:

pi@raspberrypi:/home/weewx/bin $ ./wee_extension install=stackedwindrose-2.0.0.tar.gz
Traceback (most recent call last):
  File "./wee_extension", line 83, in <module>
    main()
  File "./wee_extension", line 62, in main
    config_path, config_dict = weecfg.read_config(options.config, _args)
  File "/home/weewx/bin/weecfg/__init__.py", line 218, in read_config
    locations=locations, file_name=file_name)
  File "/home/weewx/bin/weecfg/__init__.py", line 193, in find_file
    raise IOError("%s is not a file" % file_path)
IOError: install=stackedwindrose-2.0.0.tar.gz is not a file
pi@raspberrypi:/home/weewx/bin $


stackedwindrose-2.0.0.tar.gz is in /home/weewx/bin

gjr80

unread,
Aug 8, 2016, 6:18:43 PM8/8/16
to weewx-user
Hi,

I know you are in /home/weewx/bin but try using the full path to stackedwindrose-2.0.0.tar.gz:

$ ./wee_extension install=/home/weewx/bin/stackedwindrose-2.0.0.tar.gz

Gary

Ralf Buck

unread,
Aug 9, 2016, 2:07:06 AM8/9/16
to weewx-user
sorry, but will also dont work


pi@raspberrypi:/home/weewx/bin $ ./wee_extension install=/home/weewx/bin/stackedwindrose-2.0.0.tar.gz
Traceback (most recent call last):
  File "./wee_extension", line 83, in <module>
    main()
  File "./wee_extension", line 62, in main
    config_path, config_dict = weecfg.read_config(options.config, _args)
  File "/home/weewx/bin/weecfg/__init__.py", line 219, in read_config
    locations=locations, file_name=file_name)
  File "/home/weewx/bin/weecfg/__init__.py", line 194, in find_file
    raise IOError("%s is not a file" % file_path)
IOError: install=/home/weewx/bin/stackedwindrose-2.0.0.tar.gz is not a file

pi@raspberrypi:/home/weewx/bin $ ls
daemon.py   schemas                       weecfg        weedb       wee_extension  weeutil               weewxd
daemon.pyc  stackedwindrose-2.0.0.tar.gz  wee_config    wee_debug   weeplot        weewx                 wunderfixer
examples    user                          wee_database  wee_device  wee_reports    weewx-3.5.0.egg-info
pi@raspberrypi:/home/weewx/bin $

gjr80

unread,
Aug 9, 2016, 3:43:33 AM8/9/16
to weewx-user
Hmm, seems the the extension installer is having conniptions for some reason. I am confident the extension itself is good, I know of at least one other person who has had no problems installing with wee_extension. I have had it install correctly, but on two occassions (including just now) I have had the same error. Let me look into the error, if I cannot figure it out this evening it might be best for you to do a manual install. If possible it is worthwhile installing extensions with the extension installer - it makes their management much easier.

Gary

Pete Geenhuizen

unread,
Aug 9, 2016, 6:46:12 AM8/9/16
to weewx...@googlegroups.com

I installed it on Centos 6 without any issues.


Pete


On 08/09/16 03:43, gjr80 wrote:
Hmm, seems the the extension installer is having conniptions for some reason. I am confident the extension itself is good, I know of at least one other person who has had no problems installing with wee_extension. I have had it install correctly, but on two occassions (including just now) I have had the same error. Let me look into the error, if I cannot figure it out this evening it might be best for you to do a manual install. If possible it is worthwhile installing extensions with the extension installer - it makes their management much easier.

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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Unencumbered by the thought process.  
 -- Click and Clack the Tappet brothers 

gjr80

unread,
Aug 9, 2016, 8:14:45 AM8/9/16
to weewx-user
Hmm, rather obvious when you sit down and look closely... Try the following:

./wee_extension --install=stackedwindrose-2.0.0.tar.gz

Note the previously missing -- before install. My apologies for the confusion.

Gary

Ralf Buck

unread,
Aug 9, 2016, 8:42:26 AM8/9/16
to weewx-user
thx. thats works :-)

Ralf Buck

unread,
Aug 9, 2016, 8:58:46 AM8/9/16
to weewx-user
need i a special skin?

i found this in your config:
skin = StackedWindRose

i ve no skin or folder named StackedWindRose

gjr80

unread,
Aug 9, 2016, 9:21:36 AM8/9/16
to weewx-user
In terms of files and folders the extension installer should have done 4 things:
  1. created the file imageStackedWindRose.py in the existing folder /home/weewx/bin/user
  2. created the new folder /home/weewx/skins/StackedWindRose
  3. created the file skin.conf in the folder /home/weewx/skins/StackedWindRose
  4. modified weewx.conf by adding a [[StackedWindRose]] stanza under [StdReport]

Did the extension installer not do this?


Gary

Message has been deleted

Jan Commandeur

unread,
Aug 10, 2016, 3:27:37 PM8/10/16
to weewx-user
it works

ubuntu 14.04 i386
weewx 3.4.0
debian installatie

Jan C.

Op dinsdag 9 augustus 2016 15:21:36 UTC+2 schreef gjr80:

Allan

unread,
Aug 14, 2016, 1:40:04 PM8/14/16
to weewx...@googlegroups.com
Den 08-08-2016 kl. 16:36 skrev gjr80:
> I have packaged up the windrose generator into a weewx extension.

I just installed it her on a Centos 7 sytem.
While it installs ok, it generates this error, when trying to create the
plot:
Aug 14 19:36:26 mail2 weewx[17660]: **** No module named Image
Aug 14 19:36:26 mail2 weewx[17660]: **** Traceback (most recent
call last):
Aug 14 19:36:26 mail2 weewx[17660]: **** File
"/usr/share/weewx/weewx/reportengine.py", line 125, in run
Aug 14 19:36:26 mail2 weewx[17660]: **** obj =
weeutil.weeutil._get_object(generator)(self.config_dict,
Aug 14 19:36:26 mail2 weewx[17660]: **** File
"/usr/share/weewx/weeutil/weeutil.py", line 1015, in _get_object
Aug 14 19:36:26 mail2 weewx[17660]: **** mod =
__import__(module)
Aug 14 19:36:26 mail2 weewx[17660]: **** File
"/usr/share/weewx/user/imageStackedWindRose.py", line 56, in <module>
Aug 14 19:36:26 mail2 weewx[17660]: **** import Image
Aug 14 19:36:26 mail2 weewx[17660]: **** ImportError: No module
named Image
Aug 14 19:36:26 mail2 weewx[17660]: **** Generator ignored...

Do I need to install something, to find this 'Image' module (and maybe
potentially ImageDraw too ) ?

Allan.

Radar

unread,
Aug 14, 2016, 5:23:30 PM8/14/16
to weewx-user
hi
on fedora 19 i have to change the import Image, import ImageDraw and import ImageFont to

from PIL import Image
from PIL import ImageDraw
from PIL Import ImageFont

gjr80

unread,
Aug 15, 2016, 6:01:35 AM8/15/16
to weewx-user
Have changed the Image* imports to try PIL first and failing that the standard imports from python-imaging (as is the case in the weewx plot engine). If the user has not installed PIL or python-imaging an error will be thrown. Have committed changes to the source file, updated extension package will have to wait till I am back later this week. There should be no need to import ImageFont from PIL, the get_font_handle import should take care of that.

Gary

Allan

unread,
Aug 15, 2016, 3:36:11 PM8/15/16
to weewx...@googlegroups.com
Den 14-08-2016 kl. 23:23 skrev Radar:
> hi
> on fedora 19 i have to change the import Image, import ImageDraw and
> import ImageFont to
>
> from PIL import Image
> from PIL import ImageDraw
> from PIL Import ImageFont
>

Great !

The 3'rd line didn't work here, but the first 2 fixed the problem.

Thx Radar.

Allan.

gjr80

unread,
Aug 17, 2016, 1:26:29 AM8/17/16
to weewx-user
v2.0.2 extension package now published. This fixes the PIL import issue.

Gary
Message has been deleted

Ralf B

unread,
Jun 22, 2019, 9:11:10 AM6/22/19
to weewx-user
[[day_images]]

# Period (in seconds) over which wind rose is constructed. 86400 will

# use wind samples from past 24 hours, 43200 uses 12 hours of samples

# etc

period
= 2592000 # == 24 hour
how can i create a monthly plot or a plot from the last month?

and a question about the sample config. i see here
period = 2592000 # == 24 hour

2592000 is the period of a month and not a period from a month, correct?

regard
 
 

gjr80

unread,
Jun 22, 2019, 10:07:03 AM6/22/19
to weewx-user
Hi,

The windrose generator only supports plots over the last x seconds. So you can plot the last hour, last 24 hours or last 30 days. You simply set the period config option to the period you want to cover in seconds. Unfortunately the windrose generator does not support plotting the previous month.

You are correct, 2592000 is a typo, it is in fact 30 days not 24 hours.

Gary
Reply all
Reply to author
Forward
0 new messages