LB Wind Profile - Suggestions

1. Is it possible to customize the dir_count for the Wind Profile so that the prevailing direction can match the Wind Rose?

In the image shown below, I have set my Wind Rose dir_count to 16, and the prevailing result points to “WNW”. However, in the Wind Profile, it becomes “W” due to the preset having only 8 directions, I suppose.

2. Could there be an option for the Wind Profile to lay flat (2D) instead of standing vertically, even when the met_wind_dir is input (for report plotting purposes)?

At this point, I collect all the output geometries and manually rotate them and redo the title text in GH.

It would be appreciated if the suggestions above could be taken into account.

WR+WP.gh (35.3 KB)

Yes, you just have to change this line of code inside the LB Wind Profile component:

Just change the 8 to whatever the dir_count is on your wind rose.

Yea, just add this line of code:

met_wd = None

… inside the component somewhere around here:

That should get the the wind profile to to lay flat while still putting the text of the prevailing direction in the header.

Generally speaking, just play around the component source code if you want to customize highly specific things like this.

Hi @chris

Thanks for the help.

For Q1, I’ve changed 8 to 16:

prev_dir = WindRose.prevailing_direction_from_data(met_wind_dir_, 16)[0]

After that the dir_label seem not follow correctly,

so I edited:

# dictionary to map integers to cardinal directions
DIR_TEXT = {
    '0': 'N', '1': 'NNE', '2': 'NE', '3': 'ENE', '4': 'E', '5': 'ESE', '6': 'SE', '7': 'SSE',
    '8': 'S', '9': 'SSW', '10': 'SW', '11': 'WSW', '12': 'W', '13': 'WNW', '14': 'NW', '15': 'NNW',
    'N': 'N', 'NNE': 'NNE', 'NE': 'NE', 'ENE': 'ENE', 'E': 'E', 'ESE': 'ESE', 'SE': 'SE', 'SSE': 'SSE',
    'S': 'S', 'SSW': 'SSW', 'SW': 'SW', 'WSW': 'WSW', 'W': 'W', 'WNW': 'WNW', 'NW': 'NW', 'NNW': 'NNW'
}

DIR_RANGE = {
    'N': (348.75, 11.25), 'NNE': (11.25, 33.75), 'NE': (33.75, 56.25), 'ENE': (56.25, 78.75),
    'E': (78.75, 101.25), 'ESE': (101.25, 123.75), 'SE': (123.75, 146.25), 'SSE': (146.25, 168.75),
    'S': (168.75, 191.25), 'SSW': (191.25, 213.75), 'SW': (213.75, 236.25), 'WSW': (236.25, 258.75),
    'W': (258.75, 281.25), 'WNW': (281.25, 303.75), 'NW': (303.75, 326.25), 'NNW': (326.25, 348.75)
}

And it return the error message as fllow:
Runtime error (AssertionException): Data Collection must include at least one value

Traceback:
  line 1064, in _check_values, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\_datacollectionbase.py"
  line 96, in values, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\_datacollectionbase.py"
  line 93, in __init__, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\datacollection.py"
  line 756, in filter_by_pattern, "C:\Program Files\ladybug_tools\python\Lib\site-packages\ladybug\datacollection.py"
  line 231, in script