Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title('Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$')
# ================================================================================
print('Importing wind rose data...')
# ================================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit HSDS API.
# Alternatively, load existing file with wind rose information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0,360,5)
ws_list = np.arange(0,26,1)
df = wind_rose.import_from_wind_toolkit_hsds(wf_coordinate[0],
wf_coordinate[1],
ht = 100,
wd = wd_list,
ws = ws_list,
limit_month = None,
st_date = None,
en_date = None)
else:
hor_plane = fi.get_hor_plane(height=fi.floris.farm.turbines[0].hub_height)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title("Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$")
# ================================================================================
print("Importing wind rose data...")
# ================================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit
# HSDS API. Alternatively, load existing file with wind rose information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0, 360, 5)
ws_list = np.arange(0, 26, 1)
df = wind_rose.import_from_wind_toolkit_hsds(
wf_coordinate[0],
wf_coordinate[1],
ht=100,
wd=wd_list,
ws=ws_list,
limit_month=None,
st_date=None,
en_date=None,
)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title("Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$")
# ==========================================================================
print("Importing wind rose data...")
# ==========================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit
# HSDS API. Alternatively, load existing .csv file with wind rose
# information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0, 360, 5)
ws_list = np.arange(0, 26, 1)
df = wind_rose.import_from_wind_toolkit_hsds(
wf_coordinate[0],
wf_coordinate[1],
ht=100,
wd=wd_list,
ws=ws_list,
limit_month=None,
st_date=None,
en_date=None,
)
)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title('Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$')
# ================================================================================
print('Importing wind rose data...')
# ================================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit HSDS API.
# Alternatively, load existing .csv file with wind rose information.
calculate_new_wind_rose = True
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0,360,5)
ws_list = np.arange(0,26,1)
df = wind_rose.import_from_wind_toolkit_hsds(wf_coordinate[0],
wf_coordinate[1],
ht = 100,
wd = wd_list,
ws = ws_list,
limit_month = None,
st_date = None,
en_date = None)
else:
hor_plane = fi.get_hor_plane(height=fi.floris.farm.turbines[0].hub_height)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title("Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$")
# ================================================================================
print("Importing wind rose data...")
# ================================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit
# HSDS API. Alternatively, load existing file with wind rose information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0, 360, 5)
ws_list = np.arange(0, 26, 1)
df = wind_rose.import_from_wind_toolkit_hsds(
wf_coordinate[0],
wf_coordinate[1],
ht=100,
wd=wd_list,
ws=ws_list,
limit_month=None,
st_date=None,
en_date=None,
)
hor_plane = fi.get_hor_plane(height=fi.floris.farm.turbines[0].hub_height)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title("Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$")
# ==============================================================================
print("Importing wind rose data...")
# ==============================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit
# HSDS API. Alternatively, load existing file with wind rose information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0, 360, 5)
ws_list = np.arange(0, 26, 1)
df = wind_rose.import_from_wind_toolkit_hsds(
wf_coordinate[0],
wf_coordinate[1],
ht=100,
wd=wd_list,
ws=ws_list,
limit_month=None,
st_date=None,
en_date=None,
)
)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title('Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$')
# ================================================================================
print('Importing wind rose data...')
# ================================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit HSDS API.
# Alternatively, load existing file with wind rose information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0,360,5)
ws_list = np.arange(0,26,1)
df = wind_rose.import_from_wind_toolkit_hsds(wf_coordinate[0],
wf_coordinate[1],
ht = 100,
wd = wd_list,
ws = ws_list,
limit_month = None,
st_date = None,
en_date = None)
else:
hor_plane = fi.get_hor_plane(height=fi.floris.farm.turbines[0].hub_height)
# Plot and show
fig, ax = plt.subplots()
wfct.visualization.visualize_cut_plane(hor_plane, ax=ax)
ax.set_title("Baseline flow for U = 8 m/s, Wind Direction = 270$^\circ$")
# ==============================================================================
print("Importing wind rose data...")
# ==============================================================================
# Create wind rose object and import wind rose dataframe using WIND Toolkit
# HSDS API.Alternatively, load existing file with wind rose information.
calculate_new_wind_rose = False
wind_rose = rose.WindRose()
if calculate_new_wind_rose:
wd_list = np.arange(0, 360, 5)
ws_list = np.arange(0, 26, 1)
df = wind_rose.import_from_wind_toolkit_hsds(
wf_coordinate[0],
wf_coordinate[1],
ht=100,
wd=wd_list,
ws=ws_list,
limit_month=None,
st_date=None,
en_date=None,
)