Radiation, maxSolarRad and ET/Evapotranspiration calculation - weewx/Belchertown skin

741 views
Skip to first unread message

Xant

unread,
Jul 29, 2019, 5:07:14 PM7/29/19
to weewx-user

WeeWX Forum

Installed "pyephem", along with required libraries and posted in weewx/pyephem installation instructions. Pyephem seems successful and WeeWX syslog has no errors. Still, can not acquire Radiation, maxSolarRad and ET/Evapotranspiration (or calculations). May someone assist and advice.

Thanks,
Xant

Pat

unread,
Jul 29, 2019, 9:36:07 PM7/29/19
to weewx-user
Xant this seems like a weewx issue and maybe not a Belchertown issue?

Do you have a radiation sensor on your station? pyephem will not tell you radiation, you will need a sensor for this. 

How did you install pyephem? Did you follow one of the weewx guides?

Are there any logs in your syslog? 

What is failing? Where is it failing? What are you expecting to see?

Xant

unread,
Jul 29, 2019, 10:01:51 PM7/29/19
to weewx-user
Pat

Thank you for support and Belchertown skin.

1) What expecting to see?
Starting with the basics, obtain Radiation, maxSolarRad, ET, and ultimately been able to post your (nice) Solar Radiation and UV Index Plot/Graph.

2) Do you have a Radiation sensor on your station?
Puzzles me. My Identifiers as follows:

% PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=wu-client --mode=listen --port=80 --debug

identifiers: {}
raw data: ID=KNYCLIFT14&PASSWORD=XXXXX&softwaretype=myAcuRite&dateutc=now&action=updateraw&realtime=1&rtfreq=35&baromin=30.05&UV=0&humidity=78&tempf=75.1&windspeedmph=3&winddir=291&windgustmph=4&windgustdir=55&dewptf=67.8&dailyrainin=0.06&rainin=0.06
raw packet: {'wind_speed': 3.0, 'barometer': 30.05, 'wind_gust': 4.0, 'dewpoint': 67.8, 'humidity_out': 78.0, 'uv': 0.0, 'rain': None, 'dateTime': 1564448985, 'temperature_out': 75.1, 'wind_dir': 291.0, 'rain_total': 0.06, 'wind_gust_dir': 55.0, 'usUnits': 1}
mapped packet: {'barometer': 30.05, 'dewpoint': 67.8, 'outHumidity': 78.0, 'UV': 0.0, 'rain': None, 'dateTime': 1564448985, 'windDir': 291.0, 'outTemp': 75.1, 'windSpeed': 3.0, 'windGust': 4.0, 'usUnits': 1, 'windGustDir': 55.0}

'UV' can be identified, but not other "light" info.

But, MyAcurite (Acurite pws webserver and data) shows the following"


So, besides UV, not certain if Light Intensity just extrapolated from UV (or not) as can not match Identifier.

From the above, plus location/altitude etc, can weewx calculate Radiation/maxSolarRad to use in Rad/UV Graph?

3) Syslog
There is no errors in SysLog (besides "rainin" from Acurite Identifiers above not been recognized; there are "rainin", "rain", "rain_total"... trying to figure out rainin X rain...).
No error other than plain Rad=NA and ET=NA.

Best, AE


PS: while you here, just to feedback that Belchertown website link to Windy has a problem (no PWS data and msg: There is duplicate station E8484)

Xant

unread,
Jul 30, 2019, 12:08:40 AM7/30/19
to weewx-user

Pat & All

Apologies as I thought Acurite Atlas to be capable of acquiring Radiation data... apparently not.

Although, SolarRad & UV Belchertown skin has 3 variants: Radiation, Theoretical Max Solar Radiation, UV. Lets disregard Radiation and still try [[solarRadGraph]] to plot Theo Max Solar Rad and UV.

For this "test":

Try 1) Commenting
In weewx.conf [[Calculations]], post maxSolarRad = software
In graph.conf [[solarRadGraph]], commented the section of Radiation
--> didn't work, Error

Try 2) Rad zero
In weewx.conf [[Calculations]], post maxSolarRad = software; and in [[[Generic]]] radiation = 0 ("zero')
In graph.conf [[solarRadGraph]], as posted (no commeting on Radiation section)
--> didn't work, Error

root@raspberrypi:~# wee_reports
Using configuration file /etc/weewx/weewx.conf
Generating for all time
Traceback (most recent call last):
  File "/usr/share/weewx/weewx/reportengine.py", line 204, in run
    obj.start()
  File "/usr/share/weewx/weewx/reportengine.py", line 300, in start
    self.run()
  File "/usr/share/weewx/user/belchertown.py", line 1133, in run
    series_data = self._getObservationData(observation_type, minstamp, maxstamp, aggregate_type, aggregate_interval, time_length, xaxis_groupby, xaxis_categories, mirrored_value)
  File "/usr/share/weewx/user/belchertown.py", line 1530, in _getObservationData
    (time_start_vt, time_stop_vt, obs_vt) = self.db_lookup().getSqlVectors(TimeSpan(start_ts, end_ts), obs_lookup, aggregate_type, aggregate_interval)
  File "/usr/share/weewx/weewx/manager.py", line 513, in getSqlVectors
    aggregate_type, aggregate_interval)
  File "/usr/share/weewx/weewx/manager.py", line 790, in _getSqlVectors
    for _rec in _cursor.execute(sql_str, (startstamp, stopstamp)):
  File "/usr/share/weewx/weedb/sqlite.py", line 41, in guarded_fn
    raise weedb.NoColumnError(e)
NoColumnError: no such column: maxSolarRad


Bottom line, if Radiation not available through Acurite Atlas, I would not mind having Theo Max Theo Solar Rad x UV...



Thanks for any suggestions.

Best, AE

Pat

unread,
Jul 30, 2019, 8:12:54 AM7/30/19
to weewx-user
Hi AE,

It's important to know that the screenshot you are sharing is from my station. My station has the UV sensor and the Radiation sensor, so I am able to plot these values.

Your station may differ with the available sensors (looks like you may have UV?)...

The theoretical max solar radiation bell curve comes from weewx and pyephem. Take a look at this very recent post with someone else saying they couldn't get pyephem to work. Maybe their solution will be the same for you. 

Xant

unread,
Jul 30, 2019, 10:47:49 PM7/30/19
to weewx-user

Pat

Thank you for prompt response once again, and apologies if Rad Graph was not clear (as I thought) to be from Belchertown webpage. The intent, is still to reproduce above plot without Radiance date and sensor.

Yes... I originally followed the above posting, and certified that pyephem indeed working and maxSolarRad been calculated, as "published" per the following:



Well, Radiation is N/A, as there is not Acurite sensor for it (as realized). maxSolarRad (TheoMaxRad) "zero" as it is night time, but there was actual calculated 'number data' reporting during day time (not in error or N/A).

Then, tried the following:

    [[chart7]]
        title = TheoRad
        [[[maxSolarRad]]]
            name = TheoMaxRad
            type = area
           
    [[chart8]]
        title = UV
        [[[UV]]]
            yaxis_min = 0
            yaxis_max = 14
            color = "#90ed7d"
            y_label = "UV"
            name = UV Index
            zIndex = 2

But error:

Jul 30 00:00:19 raspberrypi weewx[18712]: reportengine: Caught unrecoverable exception in generator 'user.belchertown.HighchartsJsonGenerator'
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****  no such column: maxSolarRad
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****  Traceback (most recent call last):
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 204, in run
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      obj.start()
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 300, in start
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      self.run()
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/user/belchertown.py", line 1133, in run
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      series_data = self._getObservationData(observation_type, minstamp, maxstamp, aggregate_type, agg$
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/user/belchertown.py", line 1530, in _getObservationData
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      (time_start_vt, time_stop_vt, obs_vt) = self.db_lookup().getSqlVectors(TimeSpan(start_ts, end_ts$
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/weewx/manager.py", line 513, in getSqlVectors
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      aggregate_type, aggregate_interval)
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/weewx/manager.py", line 790, in _getSqlVectors
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      for _rec in _cursor.execute(sql_str, (startstamp, stopstamp)):
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****    File "/usr/share/weewx/weedb/sqlite.py", line 41, in guarded_fn
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****      raise weedb.NoColumnError(e)
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****  NoColumnError: no such column: maxSolarRad
Jul 30 00:00:19 raspberrypi weewx[18712]:         ****  Generator terminated

Please, advice. Must report or expand maxSolarRad? If so, where?

Thanks,
Xant

rich T

unread,
Jul 31, 2019, 7:44:51 AM7/31/19
to weewx-user
Message has been deleted

Xant

unread,
Jul 31, 2019, 4:12:08 PM7/31/19
to weewx-user

Thanks rich T

Thought would be something in that path (which Im not familiar yet).

What Im puzzled with is that 'maxSolarRad' is internally calculated by weewx, and I can print/verify the calculated value in webpage (through Belchertown skin). Therefore, isn't there already in database, without the need to extend?

Hmmm.... maybe not (as I may just realize while typing). Maybe it is immediately available, but not historically recorded in database.

Best,
Xant

Andrew Milner

unread,
Jul 31, 2019, 9:34:41 PM7/31/19
to weewx-user
correct - current will/may provide but for historical must be in database.  Just add the column.

Xant

unread,
Aug 1, 2019, 5:10:21 PM8/1/19
to weewx-user

Works! More work than I thought, but there.

Thank you Andrew for pointing out.

Thanks Developers for software and database update scripts.

Thanks Pat for nice database/extensions walkthrough.

Best,
Xant
Reply all
Reply to author
Forward
0 new messages