I merely used uv index as an example. It could be any observation 
(temperature, wind speed, humidity, dewpoint, etc.) So the definition of 
minimum is the lowest value of whatever observation it is looking at.  Yes, 
UV or solar radiation may be 0 by default (unless you're in Alaska during 
the period where the sun never sets) but for temperature or dewpoint or 
wind speed it may not be zero.

What I'm basically wanting to do is be able to write something like 
$daylightHours.outTemp.avg or $daylightHours.UV.avg (similar to 
$day.outTemp.avg or $day.UV.avg except would only calculate the average 
using values for the observation when it is daylight.)

I have written a couple of other custom search "extensions" for weewx like 
last7days and last24hours which gather values for the last week or last 24 
hours but wondering if something like daylightHours as above is even 
possible and/or how it could be done.

And you're example of clouds enters into it. We get a lot of clouds in MI. 
And being able to get the average UV index or solar radiation but not 
factor in all the zero values that were either before dawn or after sundown 
is roughly what I'm looking for.

On Sunday, March 28, 2021 at 2:26:56 AM UTC-4 [email protected] wrote:

> Then sun starts the day deep east with very low radiation, almost zero. 
> During the morning the radiation increases, and during afternoon decreases. 
> In the evening it is almost zero again. So, what exactly is your definition 
> of "min" regarding sun radiation?
>
> The UV index is always zero during morning hours and evening hours. Values 
> above zero start in the late morning, and they occur until late afternoon. 
> In early morning and early evening the sun is too low to get an UV index. 
> So, again, what exactly is your definition of "min" regarding UV index?
>
> You can look at the observation type "maxSolarRad". It is a calculated 
> value, and it shows the maximum solar radiation possible at that time. Be 
> aware, if clouds are involved, the real value can be more than the 
> theoretical value for a short time.
>
> [email protected] schrieb am Samstag, 27. März 2021 um 23:59:58 UTC+1:
>
>> I want to be able to find the min/max/avg value for various weather 
>> observations (uv index for example) but only during the time when the sun 
>> is up. I am struggling to write a custom search item for that and wonder 
>> who could get it started for me or lead me in a good direction.
>>
>> If it is before sunrise for the day, the min/max/avg would all be null or 
>> undefined or none... something like that.
>> If it is after sunrise but before sunset, the min/max/avg would be 
>> calculated from sunrise to current time.
>> If it is after both sunrise and sunset, the min/max/avg would be 
>> calculated for times between the sunrise and sunset times only.
>>
>> Is it possible?
>>
>> Any thoughts or help would be appreciated. I'm not a real adept Python 
>> programmer.
>>
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7faf872c-e94c-4a7f-a118-5e493dbe042an%40googlegroups.com.

Reply via email to