MATLAB: Plotting windrose using Matlab

windrose

Hi , can someone please help me with windrose plotting . I have directions and windspeed as my first and second column, and using wind_rose.m which I got from Matlab fileexchange Thanks S

Best Answer

Shital - there are two options for specifying wind direction using wind_rose from the File Exchange: standard (which is the default) and meteo. Using examples such as
v = 30*rand(10000,1);
d = rand(10000,1);
wind_rose(d,v)
shows the wind at the east, when I expect it to be at the north. Changing the wind directions to
d = 60 + rand(10000,1);
wind_rose(d,v)
shows the wind at roughly 30 degrees from north. This suggests that the author of the code is using a counter-clockwise from east system, where 0 degrees is at east (along the x-axis), ninety degrees is at north, etc.
You are probably expecting a clockwise from north system where 0 degrees is at north, 90 degrees is at east, etc. To get around this you can just subtract your direction vector from ninety degrees like
d = 90 - d;
If you re-use the examples from above, then winds appear correctly relative to north (y-axis).
If you decide to change the direction type from the default of standard to meteo, then this appears more of a meteorological wind direction convention. If the wind direction vector is primarily northern wind directions, then the wind is blowing to the north and so coming from the south. So you using
v = 30*rand(10000,1);
d = rand(10000,1);
wind_rose(d,v,'dtype','meteo')
will show winds in the south of the figure, since they are blowing to the north and so coming from the south. Likewise
d = 60 + rand(10000,1);
wind_rose(d,v,'dtype','meteo')
would show the winds coming from the south-west as they are blowing to 60 degrees from north
Related Question