Corrections for barometric pressure from TWI station

173 views
Skip to first unread message

pannetron

unread,
Jan 7, 2023, 4:25:28 PM1/7/23
to weewx-user
Newbie here, coming from wview, and using a Texas Weather Instruments station.  I've adjusted my console to display -- and report via its serial port -- an "altimeter" version of my barometric pressure so I can most easily compare my readings with other stations.  Using the default weewx configuration, it must assume the reported pressure is gauge pressure since the calculated altimeter reading is up over 41"!  At my home's altitude of 8258', my gauge pressure is around 22.15".  It seems that I have two options for configuring weewx to see my correct barometric pressure.  One is to set the 
[StdWXCalculate] like this:
   
    [[Calculations]]
        
        pressure = software
        altimeter = hardware
        barometer = software
       
My other option to let weewx assume the pressure my station reports is gauge pressure and apply a correction offset of approximately -8".  Which option is the preferred method?

One final question.  Since my barometric pressure sensor is indoors in the console, should the temperature used for corrections be indoor or outdoor temperature?

Thanks, Russ.

Jeff A. D.

unread,
Jan 8, 2023, 12:38:45 AM1/8/23
to weewx-user
Did you get expected altimeter readings with wview?  I don't know about TWI, but I know the original Davis VP adjusted barometer that uses temperature correction renders meaningless (to me at least) values at over 7000ft, but then the >41" you're seeing is also meaningless to me.

On my VP console I have an offset added of close to 7" to get a reasonable reading on the console, then I have my weewx config file set up as:

[StdCalibrate]
   
    [[Corrections]]
        # For each type, an arbitrary calibration expression can be given.
        # It should be in the units defined in the StdConvert section.
        # Example:
        foo = foo + 0.2
        barometer = 1.298 * barometer - 8.918558
        altimeter = barometer
        pressure = barometer * 0.766377

The idea being that the station pressure, and also each change in pressure, is approx. .298 less than SLP.  If my math is correct your pressure would need to be adjusted closer to .35.  Assuming you don't use an offset you could just set "barometer = 1.35 * barometer", or if you do use an offset of 8" it would be something like "barometer = 1.35 * barometer - 10.90" or "barometer = 1.35 * (barometer - 8)".

Maybe someone else can give a better solution or correct my calculations, but at least I seem to get more reasonable readings.

vince

unread,
Jan 8, 2023, 1:27:17 AM1/8/23
to weewx-user
Be sure to read https://github.com/weewx/weewx/wiki/Barometer,-pressure,-and-altimeter

Perhaps not a help, but Weatherflow has the calculations they use documented

A while back I did the sea-level pressure calculation using the WF formula and it did match up with the offset I saw between a Weatherflow station and a VP2 for my low (365') elevation.   There's some code at https://github.com/vinceskahan/weatherflow-calc-checker if you wanted to take a look there for some code to punch some numbers into

(my example - I found the WF gear had a constant offset from the VP2 gear, so it was clear that one station was reporting data corrected to sealevel and one wasn't)


Tom Keffer

unread,
Jan 8, 2023, 6:51:58 AM1/8/23
to weewx...@googlegroups.com
It sounds like the TWI instrument is emitting "altimeter" or "barometer", but the driver is labelling it "pressure" (i.e., gauge pressure). So, weewx feels the need to "correct" it to SLP, resulting in your enormous pressures.

I would recommend filing an issue at the TWI repository. Expect it to take a while. Matthew is swamped.

Or, better yet, do a fork and submit a PR.


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/24d0dfc1-2931-4c53-98e7-38b739954164n%40googlegroups.com.

Russ Panneton

unread,
Jan 8, 2023, 12:45:43 PM1/8/23
to weewx...@googlegroups.com
On Sun, Jan 8, 2023 at 4:51 AM Tom Keffer <tke...@gmail.com> wrote:
It sounds like the TWI instrument is emitting "altimeter" or "barometer", but the driver is labelling it "pressure" (i.e., gauge pressure). So, weewx feels the need to "correct" it to SLP, resulting in your enormous pressures.

I would recommend filing an issue at the TWI repository. Expect it to take a while. Matthew is swamped.

Or, better yet, do a fork and submit a PR.

Cloned weewx-twi, working on a revised driver.  The current driver is populating loop packets with "pressure" while the station reports "altitude"... 

pannetron

unread,
Jan 9, 2023, 10:23:56 AM1/9/23
to weewx-user
Update on a revised twi.py.  Changing the genLoopPacket "tags" from "pressure" to "altimeter"  from values parsed  from the station reports did the trick.  After some previous changes from strings to binary strings, there was a bug with how wind_dir values were parsed so I fixed that, too.  After a few more days of testing, I'll submit a PR.

Tom Keffer

unread,
Jan 9, 2023, 2:55:34 PM1/9/23
to weewx...@googlegroups.com
Sounds good.

Just a reality check: if your instrument emits altimeter pressure, then there must be a way of setting altitude in the instrument. Hope that's true.

--
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.

Russ Panneton

unread,
Jan 9, 2023, 4:44:36 PM1/9/23
to weewx...@googlegroups.com
Good catch.  No, the station has no input for altitude.  And I was wrong about setting the tags in twi.py to "altitude" -- that caused issues with the Belchertown skin I use and the value reported to PWSWeather.  I changed the tags to "barometer" and things work okay now but I'm left unsure what errors that may introduce into calculated station pressure and altitude pressure values.  That's something I can live with.  Seems only a few folks use a TWI station so maybe this is good enough as long as the hack is made known as a caveat? 

I suspect the station displays and reports "gauge pressure."  I manually adjusted the station's barometer calibration for my altitude so the console display is meaningful for comparisons with other stations around me and agrees with my Kestrel 3000.  The values reported to CWOP compare very well with neighboring stations.  Some day I may play with setting the tags in twi.py back to "pressure" and, as others suggested, use a calibration calculation in weewx.conf to get back to true "gauge pressure".  

One of my questions remains unanswered: since the barometric sensor is indoors, should SLP adjustments for temperature use indoor or outdoor temperature?

BTW, Tom, thanks so much for your replies and work on weeWX!!!

Russ

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/pwYg9Ywilfw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDJvgZSYothF5%3D8_6RH63CE0YZuek-GBDdsEL052vuf%3Dg%40mail.gmail.com.

Jeff A. D.

unread,
Jan 9, 2023, 5:21:50 PM1/9/23
to weewx-user
Barometer uses outdoor temperature for correction.  Indoor pressure for all practical purposes is the same as outdoor pressure which is determined by the weather.

But again, if the algorithm is the same as for the original VP, then the barometer corrections depending on temperature at high altitude are pretty meaningless, at least to me.   Maybe you would get better readings using a more consistent indoor reading, but that's not the way it's meant to work and wouldn't give true barometer readings, for whatever they're worth.  Altimeter is far more meaningful in my opinion, and seems to be what stations around here use.

pannetron

unread,
Jan 19, 2023, 2:16:36 PM1/19/23
to weewx-user
I've left my local twi.py reporting what the station reports as "barometer".  I'm pretty sure the station actually reports a calculated "altimeter" from its pressure sensor.  To review, I calibrated my console to display local pressure adjusted to my altitude.  If I let the driver report values as "pressure" weewx reports crazy high calculated values for barometer and altimeter.    When I change the twi.py -- or the simulator -- to report only "altimeter", I get nothing in the barometer and pressure archive records.  My weewx.conf is configure to expect "altimeter" from hardware and both barometer and pressure from software.  Where should I look to see why weewx is not calculating barometer and pressure from altimeter?  I'm fluent in python.  I'd prefer this approach to configuring the twi.py driver to insert the stations readings into "pressure" and then having to put a large negative offset in weewx,conf to "correct" the pressure value.  Does the calculation of barometer and pressure from altimeter require some time span of altimeter values?

pannetron

unread,
Jan 27, 2023, 1:17:40 PM1/27/23
to weewx-user
I've added and committed my proposed changes to twi.py but I can't push my changes in order to create a PR -- I get this error: remote: Permission to matthewwall/weewx-twi.git denied to <...>; fatal: unable to access 'https://github.com/matthewwall/weewx-twi.git/': The requested URL returned error: 403.  Any pointers?

vince

unread,
Jan 27, 2023, 4:39:57 PM1/27/23
to weewx-user
You want to  'fork' that repo in github, make your changes in your fork and commit to your forked repo on github, and then you should be able to do a PR.

Russ Panneton

unread,
Jan 27, 2023, 9:41:51 PM1/27/23
to weewx...@googlegroups.com
Doh, thank you!! 

Reply all
Reply to author
Forward
0 new messages