Missing histogram bins in LB wind rose

Hi,

I can’t quite figure out if this is a bug or, I’m doing something wrong here. But would love get an extra pair of eyes on this problem

I built a wind rose script, and I started noticing that some colors, that were present on the legend graph, were not present on the wind rose display.

As a new user, I can’t upload files yet, so I uploaded 3 files here:
https://drive.google.com/drive/folders/1JjDMwYGelhZ4b27UeZz9M7G2Q79rmKNW?usp=sharing

  1. The image as it shows up in Rhino (unbaked)
  2. The Grasshopper script in question
  3. The EPW file converted to an excel file (by use of Climate Consultant data export function) for easier counting
    in the GH/LB Script, the EPW is directly imported from the following link:
    https://energyplus-weather.s3.amazonaws.com/europe_wmo_region_6/ISR/ISR_Beer.Sheva.401900_MSI/ISR_Beer.Sheva.401900_MSI.zip

As you can see in the image(1.), the wind rose really only has 3 colors (dark green, yellow, and red)
The legend has 10 bins and therefore 10 colors (ranging from dark green to red)

Just focusing on the East(90°) direction, I count:
12-ish bins of green,
6-ish bins of yellow and
1-ish bins of red.
for a total of 19 bins

in the EPW file, I have 455 hours of due East(90°) wind, so with the 24h bin size I should have 18.9 bins. So that is accurate.

When I look at the breakdown of those 455 hours I’m seeing a nice spread between all the bin values. So I don’t quite see why I’m only getting 3 colors on my wind rose.

Bin Hours
0-2 4
2-4 59
4-6 86
6-8 54
8-10 79
10-12 66
12-14 50
14-16 5
16-18 30
18+ 22

I did notice the EPW file had some outlier data. with one 80 mph value recorded on March 30 (3rd hour) (Row 2119 in the excel, for the diligent detective). So I wonder if that has anything to do with it.

Could it be that there is part of the routine that creates bin sizes based on the min/max of the actual data (speeds 0-80) Then counts according to those bins, rather than the legend bins. And then finally assigns a color based on the legend?

Thanks for your help
Peter

Edit: The LB/GH script has a site dropdown switch at the very top, where you can switch between New York City and Be’er Sheva. If you change to the NYC epw file, more bins do show up. The NYC file has a highest average windspeed of 40 mph. so not as big as a outlier as the 80mph in Be’er Sheva.

@Peter

Yes, this looks like a bug related to how the wind rose handles new min, max, and bin-interval values set by the LegendPar component.

You can see in the image below that when you don’t override the max value (by default calculated at 80.43 mph) we get correct looking bin intervals:

However when we set the 18 mph max value from your example, the bins aren’t corresponding to the legend.

What’s happening is that, rather then recomputing, and resplitting the bin intervals with the new legend segments, the old bin intervals are just recolored according to the average value taken from the old bin mapped to a single bin from the new legend parameter.

@chris I believe a straightforward fix here is to make sure the histogram is reset, and recomputed every time the LegendPar component is connected with new bin-intervals, and min/max values.

Thanks for looking into this so quickly, Saeran!
And for identifying the issue and its likely fix.

We’ve been using Ladybug tools in my class for a couple of years now, and it’s a pleasure to see the suite get better and better every year! keep up the great work

1 Like

Hi @Peter and @SaeranVasanthakumar ,

I just pushed a fix for this:

Now the bin sizes respect the min and the max of the legend parameters so you can make graphics like this even when there’s an anomalously high wind speed value:

You should be able to get the fix with the “LB Versioner” on your end in an hour or so.

I see from the PR, the fix was a lot more complicated then I realized, thanks @chris!

1 Like

Confirmed that after update the issue is resolved.

Thanks for the insanely quick turn around Chris and Saeran

1 Like