The WeeWX field rain holds the total rainfall that was recorded during the 
corresponding archive period, so it is a per-period value rather than a 
cumulative value. The default WD import config file obtains the WeeWX rain 
field value from the WD log rainlastmin field, as both are per-period 
values it is a simple import. If the rainlastmin field is not available any 
WD cumulative rainfall field can be used; however, as such fields are 
cumulative you need to tell weectl import that the source rain field is 
cumulative. This is done with the cumulative option in the field map.

Whilst a daily cumulative rain field can be used as the rain source, if 
multiple cumulative source fields are available the preferred approach is 
to use the source field with the longest period (eg monthly cumulative rain 
or yearly cumulative rain) to avoid possible issues at the cumulative field 
reset time. For WD I would suggest using (in order of preference)  
yearlyrain, monthlyrain, dailyrain.

 Try editing your WD import config file and change the [[[rain]]] stanza 
under [[FieldMap]] as follows:
        [[[rain]]]
            source_field = yearlyrain
            unit = mm
            cumulative = True

Re-import the data and see how that goes. Note that you will need to delete 
the previously imported data before re-importing.

Gary

On Monday 23 September 2024 at 05:04:38 UTC+10 [email protected] wrote:

> Hi, 
> Due slow death of my old weather station ( Lacrosse WS2-550, monitored and 
> saved for 14 years with Weather Display ) and death of dedicated laptop 
> (very similar age) running Weather Display,  I'm trying to move to new 
> weather station (DYI Based ) and to weewx. 
>
> I made weewx 5.1 working over weekend (connected by MQTTSubscriber/Driver 
> to my weather station), but I have failed with importing of historical 
> data. WD Import in documentation (
> https://weewx.com/docs/5.1/utilities/weectl-import-wd/#mapping-data-to-archive-fields)
>  
> maps log file field *rainlastmin* to weewx field *rain*. Unfortunatelly, 
> this field is 0.0 in my log files and only accumulated *dailyrain* log 
> field is properly populated.  I tried to map field *dailyrain *with units 
> *mm*  and reimport (no errors during import), but it seems that weewx 
> field rain expects really delta in particular minute. I have checked it on 
> 1.1.2024, where 0.3mm rain happened on 19:57.  I checked base records, and 
> between record 1187 and 1425 (last minute of day) is in database stored 
> value 0.03, so import works, but NOAA report ( and archive_day_rain table)  
> shows total rain value for day 7.17. After some investigation, I found that 
> 7.17 is close to (1425-1187)*0.03
> I have changed all units to METRIC ( for me easier to calculate than US 
> units) , generated new database before running import. 
> My main questions/issues :
> Any idea, how to fix import ? 
>
> Is really weewx rain field expected to be *rain delta* from last period 
> (I need to adjust code of my Weather station to provide this form of data)  
> ?
>
> Thanks, Vaclav
>

-- 
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/96cd8466-c330-4021-81ca-4bf89819f204n%40googlegroups.com.

Reply via email to