Yes, archive_day_rain holds the calendar day rain in the local time.

The key dateTime in the main archive (table "archive") is in UTC.

-tk

On Thu, Aug 30, 2018 at 1:40 PM Valley <[email protected]> wrote:

> Indeed I am using METRIC, and interval of 300 (5 minutes). I was not aware
> of that the stored unit is cm! Then I get very close to 25.8 but still not
> exactly the same!
> Unfortunately I have no idea how Netatmo calculates daily rainfall, it
> justs reports it. Of course I could use Netamo's API to retrieve the values
> from the Netatmo server (it is impossible to gain access to the local
> receiver, everything has to go via the Netatmo server). However I thought
> reading the weewx database was a quicker way for me than digging into
> Netatmo's coding examples. Netatmo has an example, returning all modules
> data from the last 30 days, and among other things I get:
>
> 27 August:
>
> sum_rain: 25.8 mm
>
> So, if I look at table archive_day_rain, field "sum" has a unit of cm.
> What about the "unit" of date and time, are we talking UTC or local time?
> If I look at the record that has the value closest to 25.8 (25.654) the
> dateTime is 1535320800 which corresponds to 2018-08-27 00:00:00, so I guess
> the date and time are in local values?
>
> When it comes to "daily" rain we have another complicating factor: In
> official reporting "daily" is NOT the calendar day (00-24). To be more
> precise: Officially, the total amount of rain of the 27th of Aug should
> actually have been measured starting 27th of Aug at 08:00, and ending on
> the 28th (!) of Aug 08:00. This is for Sweden (DST, in winter it is 07:00
> instead).
>
> This led me to query "archive" with "select 10*sum(rain) as rain_mm from
> archive where (dateTime >= UNIX_TIMESTAMP('2018-08-27 08:00:00')) and
> (dateTime <= UNIX_TIMESTAMP('2018-08-28 08:00:00')). Result  25.86 which
> indeed is closer to Netatmo's own value of 25.8!
> Querying "archive" with the calendar day "select 10*sum(rain) as rain_mm
> from archive where (dateTime >= UNIX_TIMESTAMP('2018-08-27 00:00:00')) and
> (dateTime <= UNIX_TIMESTAMP('2018-08-27 23:59:59')) results in the same
> value as archive_day_rain, namely 25,65.
>
> This means that table "archive_day_rain" is a calendar day? For all other
> parameters (pressure, wind etc) this is the same as in official reporting
> but in my opinion "archive_day_rain should be calculated between DAY
> 06:00:00 (UTC) and DAY+1 06:00:00 (UTC).
>
> /Valley
>
>
> On Thursday, August 30, 2018 at 2:42:36 AM UTC+2, Thomas Keffer wrote:
>>
>> First of all, I suspect you are using a database with a unit system of
>> METRIC, which measures in centimeters (not millimeters).
>>
>> As for the difference between 25.654 and 25.8, there can be several
>> explanations. Here's one example: say you are using a 5 minute archive
>> interval. For WeeWX, the first archive interval of the day is timestamped
>> 0005. It measures the rain that fell between 0000 and 0005. However, many
>> weather services include the measurement timestamped 0000.
>>
>> To get any more specific, we would need more information, such as exactly
>> what unit system you are using, and how the Netatmo app is calculating
>> daily rainfall.
>>
>> -tk
>>
>>
>> On Wed, Aug 29, 2018 at 2:23 PM Valley <[email protected]> wrote:
>>
>>> I use weewx with a Netatmo rain gauge. It works well but I cannot figure
>>> out how the total amount of daily rain is calculated.
>>>
>>> Since Python is too hard for me to learn, I use php coding to query the
>>> database.
>>>
>>> The other day we got 25.8 mm of rain. A figure reported by my Netatmo
>>> app on the iPhone and on the Netatmo web page. Also very close to what I
>>> could read on an old fashioned measuring glass in the garden. So the figure
>>> 25.8 mm is definitely ok.
>>>
>>> The graph in weewx also shows 25.8 (hard to read exactly, but somewhere
>>> between 25 and 26) (see image). Now: If I look at the
>>> table archive_day_rain for that specific day it says sum=2.5654 (also
>>> wsum=2.5654). How is 2.5654 becoming 25.8? Difference between sum and wsum?
>>>
>>> I also queried the archive table with sum(rain) for all records for that
>>> date. As a result I got 2.5654, the same as in the sum column in table
>>> archive_day_rain.
>>>
>>> So the question is: How is the original data from Netatmo actually
>>> stored, and how is it that the graph shows me the correct amount?
>>>
>>> Very puzzling for me!
>>>
>>> /Valley
>>>
>>> Here is a picture of the graph
>>>
>>> [image: raingraph.png]
>>>
>>> --
>>> 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].
>>> 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].
> 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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to