On Thursday, 18 January 2018 11:39:28 UTC+10, Joe Percival wrote: > > It is measured and archived in mm. The usUnits in each record is METRIC.
This will be part of the problem. None of the default unit groups use mm in the METRIC unit system (group_rain uses cm as does group_length). The METRICWX unit system uses mm for group_rain. So your conversion is doomed from the start (it will be out (at least) by a factor of 10). To use the unit conversion capabilities you need to: 1. Tell weeWX what group each field in your archive belongs to. This is done automatically for all of the fields in the weeWX default schema, if you add your own fields (in whatever database) you need to tell weeWX what unit group each new field belongs to. This is commonly done by putting something like the following in bin/user/extensions.py: import weewx.units weewx.units.obs_group_dict["snow_depth"] = "group_rain" one line per field. Refer to Assigning a unit group <http://weewx.com/docs/customizing.htm#Assigning_a_unit_group> in the Customization Guide. 2. Your data stored in the field must agree with the units sytem in use eg for METRIC all fields using group_temperature must be in C, all group_rain fields must be in cm. If you have a service or some other mechanism placing the data in your database it may need to be changed to provide values in the right units, it really depends on the service/mechanism. If you assign field snow_depth to group_rain as shown above, you can set the units to be used when plotting snow_depth by changing the group_rain setting under [Units] [[Groups]] in skin.conf. Note that this will affect the units used for all group_rain fields. In terms of plots, it's a case of all or nothing; if you set group_rain = cm then rain plots will be in cm as will snow_depth plots, you can't have rain in cm and snow_depth in inches. 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.