Wind Direction for Night-Time Ventilation


i’m trying to set up a wind rose analysis in lady bug that shows the wind direction and velocity only for the night of the summer (lets say from 10 pm to 7 am of the next day).

This in order to determine the best orientation of a buildings to maximise the benefits from night cooling ventilation.

can someone help me?

thank yu



Hi Filippo,

You can do the following;

Change the analysis period for Summer as per your climate.


thank you Devang,

I tried the analysis period but looking at the results I saw that doing what you proposed the analised period is from midnght of june first to 8 am of septemper 31st…

what i need is analyse only the wind that blows at night during the summer period…

i don’t want to calculate in the graph the wind blowing during the day when windows will be shut…

someone can help with it?




Devang’s script is getting rid of all hours when the sun is not up (directNormalRadiation = 0.0) so he is showing you a wind rose for the summer night time. If you need a wind rose for a specific analysis period at night, you can always use Julia T’s awesome method here:…

You will probably want to create a list of domains over the whole summer to get all of the hours that you want.



Just being curious, i tried to implement Julia’s method (under Chris’s suggestion), but i get, unfortunately an error with the windRose component.

I managed to select/extract the desired hours data. Plugged them into the windSpeed/Direction and then i get the following error:

Runtime error (IndexOutOfRangeException): index out of range: 2899
line 198, in unpackPatternList, “<string>”
line 568, in main, “<string>”
line 1131, in script

From what i understand i can’t input the data as a selected list. I also understand that the list must be annual.

In short, Devang method is fine, as long as you want the analysis for “dark” hours. But if i want a selected range of hours it fits less.

I can’t see how to implement Julia’s method.

I probably missed something here …



04_WindAnalysis - (472 KB)

Hi Abraham,

I will look into this one.


Hi Abraham,

Your implementation of Julia’s method as per Chris’s suggestion is great. In the attached file, I propose we use the list of HOY you created instead of the typical analysis period. I have made some preliminary modifications to the component to do that. What I have done is a very temporary fix. I believe, we should think about building this capability to take such a list in this WindRose component.

-Devang (465 KB)

Hi Devang,

Thanks for taking this one. Looking forward for the results.

I tried inputting the entwined data and the whole year analysis period, but the results were different than yours. So i decided to wait for your development instead of trying more things.



Abraham and Devang,

I had forgotten that the wind rose does not accept data without a Ladybug header on it (nor do any of the other annualHourlyData components). For these cases, you are right that Julia T’s method will not work. I’ll offer one very hacky script that will work for all of these cases:

I agree that it would be better to integrate this into the components somehow. I could see you hourList input working well, Devang. We’d just need several checks to make it compatible with the other inputs like the analysisPeriod.


Forgot to upload the GH file (441 KB)


Just wanted to summarize the solutions. I’m proposing a new one.

The options are:

Devang’s: Not flexible. Allows only to filter cases where radiation is 0. Doesn’t allow free hours selection.

Chris’s: Flexible. Allows any set of hours. Uses many GH components. The title doesn’t show the real analysis period. Different results from Devang’s.

Abraham’s: Flexible. Allows any set of hours. Similar to Chris’s, but i wrote a small code that cleans the undesired hours. Basically i set a flag for the desired hours of the year. So they can be mapped with the 3D Chart component. Same results as Chris’s.

Don’t know how to fix the title issue. Can be nice to have this solved. If any of you have ideas how to do it, will be great.

Maybe this can serve as a basis for a LB component, maybe the analysisPeriod?


04_WindAnalysis - (501 KB)

Hi Abraham,

Are you referring to the header for flag values? Did you check LB_Create Leader component?


Hi Devang,

I suppose you refer to the LB_CreateHeader? If so, is not that. What i meant is that the title of the WindRose doesn’t fit/correspond to the “real” analysis period intended.


Ok. Windrose component reads analysisPeriod or assigns a default value for that.

I like the way you use annualHourlyData_ input for this.

To move forward on this one, the way I see it, there are two ways;

  1. We implement HOY input for this component similar to what Mostapha has done for Ladybug_SelectSkyMtx. This is ofcourse if you, Chris, and Mostapha agree.

  2. If you and Chris come to an agreement on a method, we could think on how to reflect the same on the analysis period displayed in the Title Text (The text below a windRose).

In any case, I would be happy to get involved.



Hi Devang,

I could not agree :slight_smile:

There ave been many request/questions on the forum regarding how to render only a group of hours (night hours, or otherwise) without taking those in between.

The HOY input can be a good way to implement. I think we can do it, and if it works smoothly i don’t think Mostapha or Chris will oppose.

The title for such cases should say something like “output for user selected hours”, or something similar, since with the HOY input i can give random hours. It will be difficult to write in the title all of those.


Hey gang! Just checking in to see if there has been any progress on integrating this into the Ladybug tools. Also, I assume these methods only work for Velocities and Directions, and I would not be able to add temperature to the scenario and have it be successful. Is that correct? We are trying to figure out the best times of day for natural and night ventilation of our building, but need data during time frames that occur after hours, like from 6:00 pm to 6:00 am. I was wondering if there’s a way to run two data collections, one from 6 pm to 12 pm, then run one from 12 pm to 6 am and somehow combine the data into a coherent single wind rose? I am a very new user and have almost no idea what I’m doing or saying lol :stuck_out_tongue:

Hi @JoshuaC,
You can do the following;

Windrose Fixed (403.8 KB)

In this example I assume its set for the hours of 6 pm to 12 pm? Is that correct?

sorry, i meant 6 pm to 12 am

6 pm to 12 pm it is.