Pressure value

50 views
Skip to first unread message

Leonard Pheobus

unread,
Jan 3, 2023, 6:25:57 PM1/3/23
to weewx-user
I am having problems with my barometer

my debug;

Jan  3 18:23:08 www weewx[102306] WARNING weewx.qc: 2023-01-03 18:23:08 EST (1672788188) LOOP value 'pressure' 1009.8739561416005 outside limits (28.053488125, 32.48298625)

my stdQC;

[StdQC]

    [[MinMax]]
        barometer = 950, 1100, mbar
        pressure = 950, 1100, mbar

and of course a restart. Whats up?

Leonard

Greg Troxel

unread,
Jan 3, 2023, 6:35:21 PM1/3/23
to Leonard Pheobus, weewx-user
I
Leonard Pheobus <lphe...@gmail.com> writes:

> Jan 3 18:23:08 www weewx[102306] WARNING weewx.qc: 2023-01-03 18:23:08 EST
> (1672788188) LOOP value 'pressure' 1009.8739561416005 outside limits
> (28.053488125, 32.48298625)

Obviously it is units confusion, inHg vs mbar when really everything
should be in the proper SI unit hPa.

But seriously, you didn't explain your unit system and how you are
injecting pressure. It smells like you are feeding mbar where inHg is
expected.

Leonard Pheobus

unread,
Jan 3, 2023, 6:42:21 PM1/3/23
to weewx-user
my "unit_system =us"
my UNITS
 [[[Units]]]

            [[[[Groups]]]]
                # group_altitude     = meter              # Options are 'foot' or 'meter'
                group_pressure     = mbar               # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
my [StdConvert]
# DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
    target_unit = US    # Options are 'US', 'METRICWX', or 'METRIC'

and my StcQC;
[StdQC]

    [[MinMax]]
        barometer = 950, 1100, mbar
        pressure = 950, 1100, mbar

YES, I am trying to feed in "mbar" s

L

Greg Troxel

unread,
Jan 3, 2023, 6:47:40 PM1/3/23
to Leonard Pheobus, weewx-user
Leonard Pheobus <lphe...@gmail.com> writes:

> my UNITS
> [[[Units]]]
>
> [[[[Groups]]]]
> # group_altitude = meter # Options are
> 'foot' or 'meter'
> group_pressure = mbar # Options are
> 'inHg', 'mmHg', 'mbar', or 'hPa'

That's about display.

> my [StdConvert]
> # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
> target_unit = US # Options are 'US', 'METRICWX', or 'METRIC'
>
> and my StcQC;
> [StdQC]
>
> [[MinMax]]
> barometer = 950, 1100, mbar
> pressure = 950, 1100, mbar

that's ok

> YES, I am trying to feed in "mbar" s

the db is in inHg. You have to inject in that unit I think.

gjr80

unread,
Jan 3, 2023, 7:14:24 PM1/3/23
to weewx-user
Display units/labels and database units are irrelevant when it comes to inserting an observation into loop packets or archive records (or for that matter any packet/record/python dict containing a field usUnits). What you must do is insert observations that reflect the unit system in the packet/record. This is normally done by checking the usUnits field in the packet and converting the incoming observation to the units used for the relevant observation group in the unit system specified by the usUnits field. In some cases it may appear that you can get away with not doing this conversion ie it may just work. However, this is likely just good luck and should something ever change, or should someone else use your code, it may well fail as different drivers emit loop packets/archive records using different unit systems.

As for the OP problem, it is impossible to give any specific advice without knowing the config of your system, ie what driver/station and how are you getting pressures (ie one or more of WeeWX fields altimeter, pressure or barometer) into WeeWX.

Gary
Reply all
Reply to author
Forward
0 new messages