Roughness Rose plots
[3]:
wk.plot.roughness_rose(rou_rose)
Data type cannot be displayed: application/vnd.plotly.v1+json
[4]:
wk.plot.roughness_rose(rou_rose, gap=True)
Data type cannot be displayed: application/vnd.plotly.v1+json
[5]:
wk.plot.roughness_rose(rou_rose, style="bar")
Data type cannot be displayed: application/vnd.plotly.v1+json
[6]:
wk.plot.roughness_rose(rou_rose, style="bar", gap=True)
Data type cannot be displayed: application/vnd.plotly.v1+json
Wind rose plots
[7]:
wk.plot.wind_rose(bwc_from_ts, "IEC_I")
Data type cannot be displayed: application/vnd.plotly.v1+json
[8]:
wk.plot.wind_rose(bwc_from_wwc, [0, 5, 10, 15, 30], style = "radar")
Data type cannot be displayed: application/vnd.plotly.v1+json
[9]:
wk.plot.wind_rose(bwc_from_wwc, "IEC_I", cmap="inferno", gap=True)
Data type cannot be displayed: application/vnd.plotly.v1+json
[10]:
wk.plot.wind_rose(wwc_pt, "IEC_I", cmap="inferno", gap=True) #works for a wwc as input
Data type cannot be displayed: application/vnd.plotly.v1+json
[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)
Data type cannot be displayed: application/vnd.plotly.v1+json
[14]:
wk.plot.histogram(bwc_from_ts, style="faceted", color = "green", weibull = True, share_xaxes=False)
Data type cannot be displayed: application/vnd.plotly.v1+json
[15]:
wk.plot.histogram(bwc_from_ts, style="list", gap = True)[10]
Data type cannot be displayed: application/vnd.plotly.v1+json
[16]:
#weibull argument displays or not weib. distrib.
wk.plot.histogram(bwc_from_wwc.isel(sector=[0,3]), style="list", weibull = False)[1]
Data type cannot be displayed: application/vnd.plotly.v1+json
[17]:
# Emergent distribution
wk.plot.histogram(bwc_from_ts, emergent_distribution=True)
Data type cannot be displayed: application/vnd.plotly.v1+json
[18]:
wk.plot.histogram_lines(bwc_from_ts)
Data type cannot be displayed: application/vnd.plotly.v1+json
[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._errors.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])
Data type cannot be displayed: application/vnd.plotly.v1+json
[23]:
wk.plot.power_ct_curves(wtg_test, mark_rated = 0.5, x_axis_range= [3,28], title = True)
Data type cannot be displayed: application/vnd.plotly.v1+json
[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)
Data type cannot be displayed: application/vnd.plotly.v1+json
[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)
Data type cannot be displayed: application/vnd.plotly.v1+json
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)
Data type cannot be displayed: application/vnd.plotly.v1+json
[31]:
wk.plot.vertical_profile(da_meas=vp.isel(time=1).wind_direction)
Data type cannot be displayed: application/vnd.plotly.v1+json
[32]:
wk.plot.vertical_profile(da_pred=vp.isel(time=1).wind_direction)
Data type cannot be displayed: application/vnd.plotly.v1+json
Map Plots
Raster map
[33]:
plot_dat = site_effects_squeezed["site_elev"]
wk.plot.raster_plot(plot_dat);

[34]:
wk.plot.raster_plot(landcover)

[34]:
<matplotlib.collections.QuadMesh at 0x72305d1482d0>
[35]:
plot_dat = site_effects_squeezed["site_elev"]
wk.plot.raster_plot(plot_dat, color_scale_limits=[0, 200]);

[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))
)
