update barometric pressure statistics in weewx 3.1.0

71 views
Skip to first unread message

Bill Morrow

unread,
Sep 8, 2019, 10:33:29 AM9/8/19
to weewx-user
My production weewx is still 3.1.0. Maybe this issue will be impetus for me to update. But in the short term:

Hurricane Dorian went by us last night and knocked out power. I shut down my weewx host before its UPS died, so missed readings as the eye went by about 20 km away. We have power back now, and I would like to add the new record low barometer reading to the database. I inserted the readings I took off my phone's sensors:

insert archive (dateTime, inTemp, inHumidity, barometer)
select 1567895340, 32.0 + 1.8* 20.7, 49.9, 955.56 * 0.029529983071445;

insert into archive (dateTime, usUnits, interval, inTemp, inHumidity, barometer)
select 1567897380, 1, 5, 32.0 + 1.8* 21.9, 44.8, 957.40 * 0.029529983071445;

insert into archive (dateTime, usUnits, interval, inTemp, inHumidity, barometer)
select 1567905540, 1, 5, 32.0 + 1.8* 24.0, 31.2, 972.07 * 0.029529983071445;

and would now like to get that reading of 955.56 hPa recognized as a new record low.

In the wiki in a page discussing cleaning up data, Tom says you can drop the daily summaries and they  "will be rebuilt the next time weewx starts.

Is this done in my ancient version? I'll give it a try,
1) stop weewx
2) in sqllite3
    drop table archive_day_barometer;
    drop table archive_day_pressure;
3) restart weewxd. The log says:
Sep  8 11:28:19 seal weewx[7671]: engine: Starting backfill of daily summaries
Sep  8 11:28:19 seal weewx[7671]: engine: Daily summaries up to date.

My statistics are still presented, but I don't see that record low.

Feel free to tell me to upgrade. :)

P.S. Not a lot of damage here, unlike the poor folks in the Bahamas, Many are still without power, but that's about the worst of it.






gjr80

unread,
Sep 8, 2019, 10:56:27 AM9/8/19
to weewx-user
Dropping the daily summaries is generally taken to mean using one of the WeeWX utilities to drop the daily summaries rather than using SQL directly. The current utility used to manage the database is wee_database; however, in v3.1.0 the utility is wee_config_database. Try running wee_config_database with the —drop-daily action (using —help will display the list of available actions).

You can also use wee_config_database to rebuild the daily summaries using the -backfill-daily action.

Gary

Bill Morrow

unread,
Sep 8, 2019, 8:42:49 PM9/8/19
to weewx-user
Thanks for tip, Gary. I ran wee_config_database —drop-daily and saw this evidence in the log on weewxd startup:

Sep  8 21:05:39 seal weewx[14232]: engine: Starting backfill of daily summaries
Sep  8 21:12:27 seal weewx[14232]: engine: Processed 1116765 records to backfill 1631 day summaries in 408.15 seconds

but it did not pick up my new drastically lower pressure. Then I realized the statistics are actually on pressure, not the barometer reading. I might be putting the reading from my pressure sensor in the wrong field. Again, in the short term, I fabricated pressure readings by finding a suitable linear adjustment to convert barometer to pressure from nearby readings with both, and updated the archive table where pressure was NULL for the three emergency readings:

update archive set pressure = 0.992657*barometer where dateTime between 1567895340 and 1567905540;

Then dropped the summaries again, and restarted weewxd. The statistics page now shows my new all time low pressure. I wouldn't say science has marched on. That will have to wait for our next hurricane.

Bill Morrow

unread,
Sep 9, 2019, 7:40:58 AM9/9/19
to weewx-user

Guess when the hurricane went through:

Screenshot from 2019-09-09 08-39-03.png

WindnFog

unread,
Sep 11, 2019, 10:08:48 AM9/11/19
to weewx-user
barometer

Looks familiar!  Mine is from the week data.

- Paul VE1DX
Reply all
Reply to author
Forward
0 new messages