Analysis period setting , wind rose

Hello everyone:
Unliking a continuously analysis setting
(By setting Begin M/D/H to End M/D/H period)in lady bug.
I’m wondering how to set a fix hours interval within the months period in wind rose analysis. Something like 8:00a.m. to 15:00 p.m. , from maybe January to March period.
That would be clear with a wind profile results from seasonal, work time or sleep time difference.
Thanks in advance

Hi @borui,
Please find a sample attached.
windRose_FixedHours.gh (411.3 KB)

2 Likes

Thank you @devang
I can understand the structure of this period setting sample, another question is on conditionalStatement_ .
What’s the meaning of b==1 ? Is it represented the temperature?(What I got from descriptions)
Could you please tell me about that ?
Lots of thanks !
borui

Sure.
So if you look at the data we’re supplying to the annualHourlyData_ input, it is a list of 0s and 1s. What we’re doing here is following;

  1. We’re making a list of 8760 0s and then replacing the 0s with the 1s for the Hours of the year that we are interested in using to plot the wind rose
  2. This gives us a list of 8760 values.
  3. We add Ladybug_Header because the annualHourlyData_ input expects it.
  4. Now from the whole list of 0s and 1s, we’re only interested in 1s.
  5. Therefore, the conditional statement b==1

Hope that helps.

1 Like

oh, I see !
But is there a difference meaning between b==1 and b=1 ?
Cause when I change into single “=” , the results seems different.
Thanks for your patience.

There’s a major difference. Ladybug is following Python syntax for equality here. So when we say b==1. It means we’re saying if b is equal to 1 select wind speed and direction at that hour

b=1 has entirely different meaning in Python. It means the variable named “b” is assigned the value of 1. This is something totally irrelevant here and therefore, you get a different result.

hope that helps!

1 Like

Now that I could totally figure it out.
I appreciate that you made a clearly answer ! :slight_smile: