Roughness Rose plots#
[3]:
wk.plot.roughness_rose(rou_rose)
[4]:
wk.plot.roughness_rose(rou_rose, gap=True)
[5]:
wk.plot.roughness_rose(rou_rose, style="bar")
[6]:
wk.plot.roughness_rose(rou_rose, style="bar", gap=True)
Wind rose plots#
[7]:
wk.plot.wind_rose(bwc_from_ts, "IEC_I")
[8]:
wk.plot.wind_rose(bwc_from_wwc, [0, 5, 10, 15, 30], style="radar")
[9]:
wk.plot.wind_rose(bwc_from_wwc, "IEC_I", cmap="inferno", gap=True)
[10]:
wk.plot.wind_rose(wwc_pt, "IEC_I", cmap="inferno", gap=True) # works for a wwc as input
[11]:
# bwc is missing some attributes so raises a validation error
try:
wk.plot.wind_rose(bwc)
except PlottingAttrsError as e:
print(e)
The plot can't be displayed as the following attributes are not defined for 'sector' :
1. Missing attribute value: 'long_name'
2. Missing attribute value: 'units'
Please, define a value for the empty attributes.
Weibull distributions and histograms#
[13]:
wk.plot.histogram(bwc_from_ts, style="faceted", color="green", weibull=True)
[14]:
wk.plot.histogram(
bwc_from_ts, style="faceted", color="green", weibull=True, share_xaxes=False
)
[15]:
wk.plot.histogram(bwc_from_ts, style="list", gap=True)[10]
[16]:
# weibull argument displays or not weib. distrib.
wk.plot.histogram(bwc_from_wwc.isel(sector=[0, 3]), style="list", weibull=False)[1]
[17]:
# Emergent distribution
wk.plot.histogram(bwc_from_ts, emergent_distribution=True)
[18]:
wk.plot.histogram_lines(bwc_from_ts)
[19]:
# bwc is missing attributes
try:
wk.plot.histogram_lines(bwc)
except PlottingAttrsError as e:
print(e)
The plot can't be displayed as the following attributes are not defined for 'sector' :
1. Missing attribute value: 'long_name'
2. Missing attribute value: 'units'
Please, define a value for the empty attributes.
[20]:
# input must be valid bwc, wwc is not accepted
try:
wk.plot.histogram(wwc_pt, style="faceted", weibull=None)
except wk.WindkitValidationError as e:
print(e)
validate found 2 errors
1. Missing variable: wsfreq
2. Missing dimension: wsbin
Operational curves#
[22]:
wk.plot.single_curve(
wtg_test.power_output, style="faceted", color="dodgerblue", x_axis_range=[1, 29.5]
)
[23]:
wk.plot.power_ct_curves(wtg_test, mark_rated=0.5, x_axis_range=[3, 28], title=True)
[24]:
wk.plot.power_ct_curves(
wtg_test.sel(mode="Standard"),
mark_rated=0.95,
share_yaxes=True,
x_axis_range=[1, 28],
title=True,
)
[25]:
# Don't share the y-axis, which changes the view of the power curves for this artificial case
wk.plot.power_ct_curves(wtg_test, mark_rated=True, share_yaxes=False, title=True)
Vertical profile#
[29]:
vp = xr.open_dataset("data/plots/vertical_profile.nc")
vp["height"].attrs = {"long_name": "Height above the ground", "units": "m"}
[30]:
wk.plot.vertical_profile(vp.isel(time=0).wind_speed, vp.isel(time=1).wind_speed)
[31]:
wk.plot.vertical_profile(da_meas=vp.isel(time=1).wind_direction)
[32]:
wk.plot.vertical_profile(da_pred=vp.isel(time=1).wind_direction)
Map Plots#
Raster map#
[33]:
plot_dat = site_effects_squeezed["site_elev"]
wk.plot.raster_plot(plot_dat)
[33]:
<Figure size 640x480 with 2 Axes>
[34]:
wk.plot.raster_plot(landcover)
[34]:
<Figure size 640x480 with 2 Axes>
[35]:
plot_dat = site_effects_squeezed["site_elev"]
wk.plot.raster_plot(plot_dat, color_scale_limits=[0, 200])
[35]:
<Figure size 640x480 with 2 Axes>
[37]:
plot_dat = site_effects_squeezed["z0meso"].sel(sector=270)
raster_map = wk.plot.raster_plot(plot_dat, pts=points.isel(point=slice(0, 10, 2)))