Forecast in the Database

100 views
Skip to first unread message

P C

unread,
Apr 21, 2021, 12:47:41 PM4/21/21
to weewx-user

Hello,

The Vantage Pro has a Forecast variable that I wanted to add in the database. To my surprise, the location is there, with a "null" as values. My question is simple, how to feed it?

Well to you,
Blaise

storm...@gmail.com

unread,
Apr 21, 2021, 1:45:41 PM4/21/21
to weewx-user

P C

unread,
Apr 21, 2021, 3:08:54 PM4/21/21
to weewx-user

Thank you, but that's not exactly what I'm looking for. I wish store the number of the rule so that it can be evaluated 6 hours later. In the end, I would have a percentage of reliable on the total of all the rules and on almost each in particular.
So there is an unused "forecast" column in the database.
Is it possible somewhere to parameterize this?
Thank you !

Tom Keffer

unread,
Apr 21, 2021, 5:41:22 PM4/21/21
to weewx-user
The weewx_extended schema includes an observation type 'forecast'. However, you want 'forecastRule'. To add 'forecastRule' (using WeeWX V4.5):

wee_database --add-column=forecastRule



--
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/5cf594ae-efe5-49d4-9f1b-7f0f7a2d4bdbn%40googlegroups.com.

gjr80

unread,
Apr 21, 2021, 5:51:46 PM4/21/21
to weewx-user
If your aim is to store the Davis forecastIcon value in your database for use in reports etc then you need to do one of two things. Either add a forecastIcon field/column to your database schema and WeeWX will automatically save forecastIcon to database. Or, if you are using the wview_extended schema and the forecast field/column is not being used, you can re-map the forecastIcon value to forecast by adding a line to [StdCalibrate] [[Corrections]] as follows (untested):

[StdCalibrate] 
    [[Corrections]] 
        forecast = forecastIcon

WeeWX will then automatically save the forecastIcon value in the forecast field/column in the database.

You probably should also tell WeeWX how to extract the forecast icon value from the accumulators as well. The default action is to average the values, this could give an incorrect result if there are multiple different values in an archive period, in this case the best action would be to extract the last value. To do this you need to add the following to the end of your weewx.conf(untested):

[Accumulator]
    [[forecast]]
        extractor = last

Of course you will need to restart WeeWX.

Gary

gjr80

unread,
Apr 21, 2021, 5:52:48 PM4/21/21
to weewx-user
Or just do what Tom says :)

Gary

P C

unread,
Apr 22, 2021, 4:34:02 AM4/22/21
to weewx-user
Merci Tom,

Parfait !!
2021.04.22 10.280001 PC-POLLUX.png
Reply all
Reply to author
Forward
0 new messages