kPa should really be added to the pantheon of units. Created issue #596 <https://github.com/weewx/weewx/issues/596>.
This is an easy one if someone wants to do a fork and tackle it. Don't forget to include tests. -tk On Tue, Aug 25, 2020 at 11:59 AM John Kline <[email protected]> wrote: > Look here: > > http://weewx.com/docs/customizing.htm#customizing_units > > I did check the great resource in the sky (Wikipedia), and indeed Canada > is an exception in that they use kPa. It might be reasonable to add kPa to > the weewx.units file itself, but Tom would be the decider on that. > > Humidex might best be done with xtypes as it is derived from temperature > and dew point. I found xtypes less well documented, but I am using xtypes > to derive aqi from pm2.5. It’s fairly straightforward. > > On Aug 25, 2020, at 11:34 AM, Chris Alemany <[email protected]> wrote: > > Yes, thanks for that. I do change the units for some reports, > unfortunately kilopascal does not exist as a selectable unit which is the > crux of the issue, so I was looking at different ways of adding that unit > and possibly Humidex as an available value as well. > > I’m going to take a peak at the aqi extension to see if I can use it as an > example for what I need to do. > > Cheers > Chris > > On Aug 25, 2020, at 11:08 AM, John Kline <[email protected]> wrote: > > You weren’t almost there as you were attempting to change the units stored > in the database. > > Have a look at the following for changing your reports. You don’t have to > change every report as you can set defaults for all reports. > http://weewx.com/docs/customizing.htm#how_to_change_units > > On Aug 25, 2020, at 10:39 AM, Chris Alemany <[email protected]> wrote: > > Hi all, > > Yes, I noticed last night when I was rooting around in all the various > weewx files (I guess I was creating a “fork” as I was modifying the weewx > bin files themselves, _ini_.py, units.py etc to add in the new system) for > mentions of units, that many extensions seemed to make the same 3-way > assumption on units. So perhaps that method is not worth the effort. > > I’m not interested in having the database itself use Canadian Units > (though extending it for Humidex readings would be useful), only that I’d > be able to set the units as simply and widely as I can across all skins and > extensions as I have multiple going at once. Thought I was almost there. :) > > Cheers for the suggestions, > Chris > > On Aug 25, 2020, at 8:54 AM, John Kline <[email protected]> wrote: > > Remember that just because something is stored in the database in units > that are not “Canadian”, that doesn’t mean you are stuck with that unit in > reports or graphs. > > My two cents is that you should be spending your time getting the units > you want to see in the skin(s) you are using. > > On Aug 25, 2020, at 8:03 AM, David VE3STI <[email protected]> wrote: > > I'm not a programmer so I don't have helpful suggestions. But as a > Canadian user, I hope that you figure this out. I use the "metric" option > but think of wind speed in kph, not m/s, for example. I did get the Humidex > added (a long time ago - I forget how I did it other than I know I didn't > do the programming but found that someone else had already figured out and > I just followed the instructions!) > > Just as I type this, Tom's reply popped up.. Guess it won't be easy to add > a new "Canadian option". The instructions for changing individual units is > in the documentation but if you could make a "Canada-specific" set > (cookbook style) that would be really useful for those of us who are > users-but-not-programmers. > > Keep us posted. > > David > > On Monday, August 24, 2020 at 11:37:18 p.m. UTC-4 [email protected] wrote: > >> Hi All, >> >> I'm trying to extend weewx so that there is a 4th option for unit systems >> called "CANMETRICWX" (Canadian Metric). >> >> This would be the same as "METRIC" except rain values are in mm and >> pressure values are in kPa and eventually would also include a "Humidex" >> calculation as well. >> >> I thought I had added everything I needed throughout the file system for >> the addition of the units system but I'm running into the following >> complaint on startup: >> >> "AttributeError: module 'weewx' has no attribute 'CANMETRICWX'" >> >> Not being familiar enough with python, I am stumped as to where I can add >> that attribute. Any help greatly appreciated. >> >> Cheers >> >> Chris >> > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/f52611dc-6ae8-4864-9eda-5d252e9a5404n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/f52611dc-6ae8-4864-9eda-5d252e9a5404n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "weewx-user" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/weewx-user/NO7igS5iBAo/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/0913D44A-2766-4FB6-97B8-FE88BE3488D0%40johnkline.com > <https://groups.google.com/d/msgid/weewx-user/0913D44A-2766-4FB6-97B8-FE88BE3488D0%40johnkline.com?utm_medium=email&utm_source=footer> > . > > > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/CD4DC81D-007D-4F07-8530-CFAADF9D32C4%40gmail.com > <https://groups.google.com/d/msgid/weewx-user/CD4DC81D-007D-4F07-8530-CFAADF9D32C4%40gmail.com?utm_medium=email&utm_source=footer> > . > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "weewx-user" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/weewx-user/NO7igS5iBAo/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/D34F9490-BE38-4A55-8D9E-2CA9E8EEA131%40johnkline.com > <https://groups.google.com/d/msgid/weewx-user/D34F9490-BE38-4A55-8D9E-2CA9E8EEA131%40johnkline.com?utm_medium=email&utm_source=footer> > . > > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/AA0789D1-9F9F-4A1F-B254-8D47A7CD32AF%40gmail.com > <https://groups.google.com/d/msgid/weewx-user/AA0789D1-9F9F-4A1F-B254-8D47A7CD32AF%40gmail.com?utm_medium=email&utm_source=footer> > . > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/FF1A3FEE-D32B-4900-9BC4-2BCF60CFA305%40johnkline.com > <https://groups.google.com/d/msgid/weewx-user/FF1A3FEE-D32B-4900-9BC4-2BCF60CFA305%40johnkline.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDm0azQcWUHXPqow7em1FCSGSqfBTZPpsJnjBxTBBdyKQ%40mail.gmail.com.
