Converting to Metric

1,061 views
Skip to first unread message

Brian

unread,
Nov 27, 2013, 1:48:37 PM11/27/13
to weewx...@googlegroups.com
I am a new user to weewx.
I live in South Africa and we use metric here. What must I do to convert successfully. (Still running simulation mode)

I have a WMR200 currently running on Cumulus (old Windoze laptop) which I'd like to test run it out on Ubuntu first.
My goal is actually to run it on a Raspberry (B-model).
Any pointers will help.

P.S. My PWS is currently uploading to WU (IGAUTENG88).

syslog:
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Loading station type Simulator (weewx.drivers.simulator)
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: StdConvert target unit is 0x1
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Using config file archive interval of 300
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Record generation will be attempted in 'hardware'
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Using archive database: archive_sqlite
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: stats: stats database up to date.
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Using stats database: stats_sqlite
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Starting up weewx version 2.5.0
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Clock error is -0.01 seconds (positive is fast)
Nov 27 20:35:05 brian-Ubuntu-desktop weewx[12620]: wxengine: Starting main packet loop.
Nov 27 20:40:15 brian-Ubuntu-desktop weewx[12620]: Archive: added archive record 2013-11-27 20:40:00 SAST (1385577600)
Nov 27 20:40:15 brian-Ubuntu-desktop weewx[12620]: cheetahgenerator: generated 1 'SummaryByMonth' files for StandardReport in 0.07 seconds
Nov 27 20:40:15 brian-Ubuntu-desktop weewx[12620]: cheetahgenerator: generated 1 'SummaryByYear' files for StandardReport in 0.18 seconds
Nov 27 20:40:16 brian-Ubuntu-desktop weewx[12620]: cheetahgenerator: generated 12 'ToDate' files for StandardReport in 0.71 seconds
Nov 27 20:40:17 brian-Ubuntu-desktop weewx[12620]: genimages: Generated 22 images for StandardReport in 0.59 seconds

Thomas Keffer

unread,
Nov 27, 2013, 1:57:44 PM11/27/13
to weewx-user
No need to convert anything. Weewx supports metric out of the box. Details are in the User's Guide.

-tk


--
You received this message because you are subscribed to the Google Groups "Weewx user's group" 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/groups/opt_out.

mwall

unread,
Nov 27, 2013, 2:01:49 PM11/27/13
to weewx...@googlegroups.com
On Wednesday, November 27, 2013 1:48:37 PM UTC-5, Brian wrote:
I am a new user to weewx.
I live in South Africa and we use metric here. What must I do to convert successfully. (Still running simulation mode)

hi brian,

welcome to the world of weewx!

to display metric units (or a mix of metric and imperial, if you're into that), modify the skin.  instructions are in the weewx customization guide.

http://weewx.com/docs/customizing.htm

see the "Units" section of "Customizing skins: the Standard skin"

Thomas Keffer

unread,
Nov 27, 2013, 2:03:52 PM11/27/13
to weewx-user
Oops. Matthew is right. Instructions are in the Customizing Guide. 

-tk


--

Andrew Milner

unread,
Nov 27, 2013, 10:50:44 PM11/27/13
to weewx...@googlegroups.com
I'm sure there are more metric users than imperial ... there 'should' IMHO be an easier way to 'go metric' - it 'should' just require switches, preferably all in one place, to make the settings for location, station, database, display, graphing, restful services etc without needing to actually edit the various units in various places where there is a high risk of typos and omissions - or even take the 'default' from the database setting which would/should just leave one setting unit switches for location and station.

mwall

unread,
Nov 27, 2013, 11:15:22 PM11/27/13
to weewx...@googlegroups.com
On Wednesday, November 27, 2013 10:50:44 PM UTC-5, Andrew Milner wrote:
I'm sure there are more metric users than imperial ... there 'should' IMHO be an easier way to 'go metric' - it 'should' just require switches, preferably all in one place, to make the settings for location, station, database, display, graphing, restful services etc without needing to actually edit the various units in various places where there is a high risk of typos and omissions - or even take the 'default' from the database setting which would/should just leave one setting unit switches for location and station.


you can do this already.  for example, here is the weewx.conf snippet that defines the StandardReport using the Standard skin:

[StdReport]
    SKIN_ROOT = skins
    HTML_ROOT = public_html
    [[StandardReport]]
        skin = Standard

and this is the weewx.conf snippet to that overrides to one set of metric units:

[StdReport]
    SKIN_ROOT = skins
    HTML_ROOT = public_html
    [[StandardReport]]
        skin = Standard
        [[[Units]]]                                                           
            [[[[Groups]]]]                                                    
                group_altitude     = meter
                group_degree_day   = degree_C_day
                group_pressure     = mbar
                group_radiation    = watt_per_meter_squared
                group_rain         = mm
                group_rainrate     = mm_per_hour
                group_speed        = meter_per_second
                group_speed2       = meter_per_second2
                group_temperature  = degree_C

i believe that is all of the switches, all in one place.  all without modifying the skin itself.

notice that there is no single definition for 'metric', just as there is no single definition for 'imperial'.  does metric mean mm or cm?  m/s or km/h?

translations, on the other hand, are still quite scattered...

m

Andrew Milner

unread,
Nov 28, 2013, 1:10:08 AM11/28/13
to weewx...@googlegroups.com
No, that is not a switch - those are overrides.
If the database is metric is is highly unlikely that the user will require imperial units unless uploading to a US site.

By a switch I meant something like:

System_is_metric = True (or = False or =1 or =0) within weewx.conf so that although the skins can indeed override and change this setting it should not normally be necessary.

which would result in a default database and a default set of metric units without the user having to see if it should be mb or mbar or meter or meters or foot or feet etc.  User intervention and edits in the skins should only be necessary if a deviation from default is required, but setting metric could be simpler than it is now.

Never mind - not worth arguing over, and I'm not going to lose sleep over it!!!

btw - I am in metric so was aware of the skin edits.  There are standard units for use in metric and imperial systems, apart from possibly wind speeds where there are also knots and m/s used in addition to mph and kph in specialist circumstances eg nautical or aviation but who uses cm for rain measurements - surely the metric unit for rain is mm isn't it?




--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Ido7fHXLqE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Jan Commandeur

unread,
Nov 28, 2013, 2:08:09 AM11/28/13
to weewx...@googlegroups.com
If you use metric, then it is mm, m, km.
cm is old, and no longer used.
measurements in europe are in mm or m or km.

mm x 1000 = m x 1000 = km
thats all

so rain is mm
wind is km or m. ( mostly km )

iso metric standard.


Op donderdag 28 november 2013 05:15:22 UTC+1 schreef mwall:

Andrew Milner

unread,
Nov 28, 2013, 2:23:07 AM11/28/13
to weewx...@googlegroups.com
Thanks for that Jan - they may not have a standard for imperial measurements, but metric is pretty standard!!
Andrew



--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Ido7fHXLqE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Thomas Keffer

unread,
Nov 28, 2013, 7:52:19 AM11/28/13
to weewx-user
Andrew,

I am getting very tired going round and round with you over this. The units in the database are in there for a reason: they tend to be the native units of the common weather stations. They are also an "implementation detail," which should not be of concern to the average user. 

As for display units, they can easily be changed. 

Time to let it go.

-tk



--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Andrew Milner

unread,
Nov 28, 2013, 10:49:03 AM11/28/13
to weewx...@googlegroups.com
Tom

I already said that I wasn't going to argue or lose sleep over it, so no need to be going round and round over it. Stating the current facts as in this post will be my last word on the subject.

Currently the Weewx station map indicates that at least 40% of weewx stations (# of fine offset stations) have native units in metric which FineOffset interpret as C, hPa/mb, mm and m/s.  Davis is, I appreciate, US imperial - and I do not know about the other types of station.  Only 30% of stations appear to be in the US and more than likely will also use US imperial units for display whilst the remaining 70% (the majority) are likely to display in metric.  Most 'showcase' stations outside the US appear to be in metric although the UK stations seem to use mph for wind speed though as the UK continues to cling to some odd elements of imperialism.

I appreciate that weewx was probably originally conceived for Davis stations, but it now would appear to have captured a larger audience from other directions and therefore do not know what now constitutes 'common weather stations'.  China is, I believe, metric so I would suspect that the majority of 'common stations' will, in the future at least, have native metric units .....

End of .....
No more ... I promise

Andrew

dsha...@googlemail.com

unread,
May 10, 2014, 3:06:46 PM5/10/14
to weewx...@googlegroups.com
First I have to say thank you very much for this great linux program which is ready for my raspherry - found nothing else which is like this!

I got it quick started in imperial and changed it to metric which didn't work (my failure) and then got it running in metric.
But I changed again the .config file and had problems. I'm not an Linux erpert, just can follow an instruction.
The database change is a prob for me. I have to accet the comment from the programer but could someone please give an easy tutorial for noobs to change it?
I believe that this change to metric will be the most critical issue in future here in Europe.

Thanks

Thomas Keffer

unread,
May 10, 2014, 5:02:18 PM5/10/14
to weewx-user
The Customizing Guide has an entire section on this: Changing the unit system.

As the documentation stresses over and over, there is no reason to do this unless you have a specialized application.  Follow the advice of the doctor in that old Henny Youngman joke:

Patient: "Doctor, it hurts when I do this." 

Doctor: "Then don't do that!" 

-tk



For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages