Skip to content

How to aggregate GTSdate for records table (Belchertown) #31

Answered by roe-dl
silke-99 asked this question in Q&A
Discussion options

You must be logged in to vote

There are no stupid questions. This one is difficult. I looked at the aggregation types available in WeeWX, but I did not find anything appropriate. So I guess you need a little bit of Cheetah code. Something like this (not tested):

## find the earliest GTSdate
#set $mindaymonth = "12-31"
#set $mingtsdate = None
#for $yy in $alltime.years
#set $dt = $yy.GTSdate.last
#if $dt is not None and $dt.raw is not None
#set $daymonth = $dt.format("%m-%d")
#if $daymonth<$mindaymonth
#set $mindaymonth = $daymonth
#set $mingtsdate = $dt
#end if
#end if
#end for
$mingtsdate

This script involves a loop over all available years. For each year it checks whether GTSdata is available. If so, it formats a s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@silke-99
Comment options

@roe-dl
Comment options

Answer selected by silke-99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants