You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bw.Shear.Timeseries - Timeseries calculates Shear twice and generates plot based on Average method #341
Timeseries calculates shear as timeseries on lines 86/93. Then on line 103 shear is calculated as average in order to display the average shear plot. This increases the computation time, and displays the same plot that would be obtained with the Shear.Average approach. Perhaps the plot could be made optional?
@BiancaMorandi@stephenholleran are we OK to change this plotting behaviour would anyone be reliant on this as it would be a breaking change. Additionally is the average shear plot the right one to be returning anyway given this is within the time series shear code? Should we completely remove the plot as it could be confusing? I have made it optional in PR #635 but think it should be removed. As it calls the Shear.Average plot from instead the Shear.TimeSeries function which is not representative of what is applied.
@stephenholleran I think a plot at one particular time step would be informative and representative than the average which isn't what this function applies. The user can supply which time step they want to see the profile for
@olivia-bentley there could be hundred thousand timestamps. How would the user know what timestamp to pick? Scrolling through on a plot is a good thing to do but how would it perform with 100,000 timesteps? Any other plot we could come up with?
@olivia-bentley and @stephenholleran can we not plot all timestamps using a density colour plot or color defined based on same stats (e.g. by hour or month or direction or others)? see below few example options of colouring for e.g. wind speed by hour that could be used for the shear by speed
Distribution of α (histogram): shows the spread, how often shear is negative, and the outliers.
Profile envelope: the fitted profiles for the P10, P50 and P90 α values, drawn through the measured means. It's still a profile plot like the current one, but it shows the range of what's actually applied.
I still think a widget to view the timestep by timestep profiles is useful particularly too investigate interesting features like inverse shear LLJ etc.
A further point for the record, although we're planning to remove this plot anyway: the plot created by Shear.TimeSeries calls Shear.Average without passing the user's min_speed, so it always uses the default 3 m/s even when a different min_speed is given. If the plot is kept in any form, it should use the user's min_speed.
@olivia-bentley the second plot definitely looks better than the first one.
Are there 5,000 lines in this plot out of a possible 79,514?
I am confused about comparing the P50 shear profile with where the majority of the shear profiles are. The dense area of profiles is between 5 and 7.5 m/s however the P50 shear profile is way over to the left. I would have expected the P50 profile to be in the middle of the dense area.
What is the alpha of that P50 profile? And what is the alpha when you just use the average shear function?
Seen as we are leaning towards not normalising the shear profiles, how would the below plots you did previously look without the normalising?
@stephenholleran that is probably because colouring by density of the lines is misleading for P50. Density of the lines effectively tells you how distribution changes with wind speed but what it is P50 of is actually shear exponent. A plot where we colour by shear exponent is here:
It also looks deceptive as a shear alpha of 0.5 looks different at surface wind speeds of 2m/s than at 10m/s on a plot like this.
OK, I'm getting really confused about these plots but before I delve deeper it might be worth redoing those other plots I mentioned in my last comment without normalisation. Thanks.
As discussed on #641 (comment), as part of this issue can you also address issue that plot doesn't follow maximise_data. TimeSeries builds its plot via Shear.Average(wspds=...) (shear.py:107) without passing maximise_data. The profile plot therefore uses only timestamps with every height valid, while alpha/roughness use the larger dataset.
27. OK, I'm getting really confused about these plots but before I delve deeper it might be worth redoing those other plots I mentioned in my last comment without normalisation. Thanks.
Activity
olivia-bentley commentedon Sep 28, 2026
@BiancaMorandi @stephenholleran are we OK to change this plotting behaviour would anyone be reliant on this as it would be a breaking change. Additionally is the average shear plot the right one to be returning anyway given this is within the time series shear code? Should we completely remove the plot as it could be confusing? I have made it optional in PR #635 but think it should be removed. As it calls the Shear.Average plot from instead the Shear.TimeSeries function which is not representative of what is applied.
current behaviour
stephenholleran commentedon Sep 29, 2026
Hi,
We can't make any breaking changes. We can make it optional but the default should make it behave the way that it is currently working.
What plot could be returned for informing the user about timeseries shear?
olivia-bentley commentedon Sep 29, 2026
@stephenholleran I think a plot at one particular time step would be informative and representative than the average which isn't what this function applies. The user can supply which time step they want to see the profile for
stephenholleran commentedon Sep 29, 2026
@olivia-bentley there could be hundred thousand timestamps. How would the user know what timestamp to pick? Scrolling through on a plot is a good thing to do but how would it perform with 100,000 timesteps? Any other plot we could come up with?
BiancaMorandi commentedon Sep 29, 2026
@olivia-bentley and @stephenholleran can we not plot all timestamps using a density colour plot or color defined based on same stats (e.g. by hour or month or direction or others)? see below few example options of colouring for e.g. wind speed by hour that could be used for the shear by speed
olivia-bentley commentedon Sep 29, 2026
@BiancaMorandi @stephenholleran Yes I think this could work Bianca, was about to propose:
I still think a widget to view the timestep by timestep profiles is useful particularly too investigate interesting features like inverse shear LLJ etc.
olivia-bentley commentedon Sep 29, 2026
@BiancaMorandi i don't think we should plot by hour of day or month etc. though as we have separate shear functions for those
stephenholleran commentedon Sep 29, 2026
These seem like a good path to go down. Not sure which one would work with a shear plot and all the different curves that could be produced.
Changing what is plotted I don't think is a breaking change, it could be considered just evolving. It doesn't actually break.
olivia-bentley commentedon Sep 29, 2026
some examples possible from the test dataset
olivia-bentley commentedon Sep 29, 2026
A further point for the record, although we're planning to remove this plot anyway: the plot created by
Shear.TimeSeriescallsShear.Averagewithout passing the user'smin_speed, so it always uses the default 3 m/s even when a differentmin_speedis given. If the plot is kept in any form, it should use the user'smin_speed.olivia-bentley commentedon Oct 2, 2026
@BiancaMorandi @stephenholleran
Updated plot:
and without normalising it:
this for the test data. I'll share some for other datasets later
BiancaMorandi commentedon Oct 15, 2026
how plot look like if instead of wind speed you use density color?
olivia-bentley commentedon Oct 19, 2026
Actually that one loses the shape of the profiles, I think the below is better:
stephenholleran commentedon Oct 19, 2026
@olivia-bentley the second plot definitely looks better than the first one.
Are there 5,000 lines in this plot out of a possible 79,514?
I am confused about comparing the P50 shear profile with where the majority of the shear profiles are. The dense area of profiles is between 5 and 7.5 m/s however the P50 shear profile is way over to the left. I would have expected the P50 profile to be in the middle of the dense area.
What is the alpha of that P50 profile? And what is the alpha when you just use the average shear function?
Seen as we are leaning towards not normalising the shear profiles, how would the below plots you did previously look without the normalising?
olivia-bentley commentedon Oct 20, 2026
@stephenholleran that is probably because colouring by density of the lines is misleading for P50. Density of the lines effectively tells you how distribution changes with wind speed but what it is P50 of is actually shear exponent. A plot where we colour by shear exponent is here:
It also looks deceptive as a shear alpha of 0.5 looks different at surface wind speeds of 2m/s than at 10m/s on a plot like this.
Average shear method gives alpha = 0.123
stephenholleran commentedon Oct 21, 2026
OK, I'm getting really confused about these plots but before I delve deeper it might be worth redoing those other plots I mentioned in my last comment without normalisation. Thanks.
BiancaMorandi commentedon Oct 22, 2026
As discussed on #641 (comment), as part of this issue can you also address issue that plot doesn't follow
maximise_data.TimeSeriesbuilds its plot viaShear.Average(wspds=...)(shear.py:107) without passingmaximise_data. The profile plot therefore uses only timestamps with every height valid, while alpha/roughness use the larger dataset.olivia-bentley commentedon Oct 29, 2026