Hello, Jared
Unfortunately, StdQC can only reject values that are outside of a [min,
max] range.
However, this would not be a very hard service to write. Something like
(NOT TESTED):
import time
from weewx.engine import StdService
class MyQC(StdService):
"""Check for time and temperature out of bounds """
def __init__(self, engine, config_dict):
super(MyQC, self).__init__(engine, config_dict)
self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
def new_archive_record(self, event):
"""Check for a high temperature at night"""
# Make sure there
if 'outTemp' in event.record and event.record['outTemp'] is not
None:
time_tuple = time.localtime(event.record['dateTime'])
hour = time_tuple.tm_hour
# This assumes US Customary units. You probably want to check
the unit system first!!
if (hour < 5 or hour > 20) and event.record['outTemp'] > 100:
event.record['outTemp'] = None
This example uses a pretty stupid time / temperature check. You'd probably
want to substitute something more sophisticated.
-tk
On Sun, Jun 23, 2019 at 2:00 PM Jared Marquis <[email protected]>
wrote:
> I've noticed a few issues with the occasional bad temperature/dew point
> measurement. Specifically, this week, my high temperature is: 101.0°F at
> 01:42:00 AM (Monday). While unusual, not impossible. That said, it
> happened overnight, and was surrounded by temperatures in the 50s. This is
> obviously an errant reading.
>
> I am currently recording information every 5min. How can I look at a time
> series of, say 5-10 temperature readings, to remove or flag suspect data?
> Also, I'd like to be able to restrict tendencies to do the same (e.g.,
> +/-25* change in 5min is suspect and needs to examined with time series
> when more data comes in).
>
> Is there any flag variable in the observation objects or would this need
> to be added? Is it possible to examine other times with a qc function?
>
> Thanks!
>
> --
> 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/b9af5ef9-66e7-41a6-8892-60f580f80b72%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/b9af5ef9-66e7-41a6-8892-60f580f80b72%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAPq0zEAL%2ByjthF%2BrMco4Z%3DA%2Bv39B6m0Fta-6uS422LsobRvNqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.