brightwind-dev/brightwind

[plot_shear_by_sector] Raise an error when at least on inf value is given as input

BiancaMorandi opened this issue · 2 comments

Describe the bug
When running the following code an error is raised if at least one roughness value, given as input to plot_shear_by_sector function, is inf. The error raised is reported in screenshot below.
shear_by_sec_obj = bw.Shear.BySector(data_clnd[wspd_shear_cols], wspd_shear_heights_displaced, data_clnd[wdir_main], calc_method=shear_calc_method, sectors=12)

image

Expected behavior
Error should not be raised and plots should be generated with nan instead of inf values.

Hi @BiancaMorandi,

Could you run that line of code again and screenshot the result now that it is fixed?

The changes look good.

@stephenholleran see screenshot below showing succesfull plot for same roughness values used as input to plot shear by sectors function.
image