Wind Rose Differences

thank you all @charlie.brooker @chris @SaeranVasanthakumar and all the others that chimed in!
We had a bug on our end!
the line:

dir_bins = np.arange(-22.5/2, 370, 22.5)

(Why 370???)

was generating bins with the following labels

dir_labels = (dir_bins[:-1] + dir_bins[1:]) / 2
print(dir_labels)
[  0.   22.5  45.   67.5  90.  112.5 135.  157.5 180.  202.5 225.  247.5
 270.  292.5 315.  337.5]

360 is missing!!!

the problem is solved with:

dir_bins = np.arange(-22.5/2, 360+22.5, 22.5)
dir_labels = (dir_bins[:-1] + dir_bins[1:]) / 2
print(dir_labels)
[  0.   22.5  45.   67.5  90.  112.5 135.  157.5 180.  202.5 225.  247.5
 270.  292.5 315.  337.5 360. ]

and this is the resulting windrose for Riyadh:
CBE_Clima_RIYADH_Heating and Cooling Degree-Days (3)

Thank you for your help! :heart:
We’ll fix it asap in the live version

4 Likes