Thanks for the quick response! And it actually works :-)))

Two slight corrections are however to be made to work fine :

-1 / You forgot the "$" at timestamp. We must read 
$current(*$*timestamp=$t).windDir 
instead of $current(timestamp=$t).windDir
-2 / The time format must be in raw to work. We must read #set t = 
$month.windSpeed.maxtime*.raw* instead of #set t = $month.windSpeed.maxtime

Aside from that it was a perfect solution !! Thanks again Tom

Le jeudi 3 juin 2021 à 22:41:54 UTC+2, tke...@gmail.com a écrit :

> You could do something like (NOT TESTED):
>
> #set t = $month.windSpeed.maxtime
> <p>The max wind speed this month is $month.windSpeed.max from direction 
> $current(timestamp=$t).windDir at time $t.</p>
>
>
>
> On Thu, Jun 3, 2021 at 8:38 AM Remy Lavabre <remy.l...@gmail.com> wrote:
>
>> Good morning all,
>>
>> To have the maximum wind gust over a period this works very well and also 
>> gives the time and date of this wind gust:
>>
>>         <td class="label">Win Gust Max</td>
>>         #for $archive in $archive_data
>>         <td class="data new_row hilo_$archive[0]"><font color = "DarkRed">
>>           <span title="$archive[1].wind.maxtime">
>>             $archive[1].wind.gustdir.ordinal_compass 
>> ($archive[1].wind.gustdir.format(add_label=False)$unit.label.windDir)
>>             - $archive[1].wind.max.format(add_label=False)</span><br>
>>             <span class="timestamp">$archive[1].wind.maxtime</span>
>>         </td>
>>
>>
>> Over the same period, I get the maximum wind value (not the gust) with 
>> the following formula:
>>
>>           <span title="$archive[1].windSpeed.maxtime">
>>             $archive[1].windSpeed.max.format(add_label=False)</span><br>
>>             <span 
>> class="timestamp">$archive[1].windSpeed.maxtime</span><br>
>>
>> My problem is that I cannot recover the direction of the wind during this 
>> maximum :
>>
>> $archive[1].windDir.ordinal_compass ( $archive[1].windSpeed.max  ) does 
>> not work ! :-(
>>
>> How should I do it?
>> Thank you
>>
>>
>> -- 
>> 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 weewx-user+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/85fa1519-24ba-45a0-bc45-20bf18a9b9ben%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/85fa1519-24ba-45a0-bc45-20bf18a9b9ben%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0474055b-d3d9-4ac2-82f6-a19043dfef47n%40googlegroups.com.

Reply via email to