Skip to content

Commit 4496025

Browse files
committed
Merge branch 'turbine_library_for_0.2.0' of github.com:wind-python/windpowerlib into turbine_library_for_0.2.0
2 parents d7434ce + dd01a20 commit 4496025

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

example/turbine_cluster_modelchain_example.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# TurbineClusterModelChain example\n",
88
"\n",
9-
"This example shows you how to calculate the power output of wind farms and wind turbine clusters with the windpowerlib. A cluster can be useful if you want to calculate the feed-in of a region for which you want to use one single weather data point.\n",
9+
"This example shows you how to calculate the power output of wind farms and wind turbine clusters using the windpowerlib. A cluster can be useful if you want to calculate the feed-in of a region for which you want to use one single weather data point.\n",
1010
"\n",
1111
"Functions that are used in the ModelChain example, like the initialization of wind turbines, are imported and used without further explanation."
1212
]
@@ -109,7 +109,7 @@
109109
"cell_type": "markdown",
110110
"metadata": {},
111111
"source": [
112-
"Following a wind farm with a constant efficiency is defined. A wind farm efficiency can also be dependent on the wind speed in which case it needs to be provided as a dataframe with 'wind_speed' and 'efficiency' columns containing wind speeds in m/s and the corresponding dimensionless wind farm efficiency."
112+
"Following, a wind farm with a constant efficiency is defined. A wind farm efficiency can also be dependent on the wind speed in which case it needs to be provided as a dataframe with 'wind_speed' and 'efficiency' columns containing wind speeds in m/s and the corresponding dimensionless wind farm efficiency."
113113
]
114114
},
115115
{
@@ -175,7 +175,7 @@
175175
"\n",
176176
"The TurbineClusterModelChain is a class that provides all necessary steps to calculate the power output of a wind farm or wind turbine cluster. \n",
177177
"\n",
178-
"Like the ModelChain (see [basic example](modelchain_example.ipynb)) you can use the TurbineClusterModelChain with default parameters as shown here for the wind farm or specify custom parameters as done here for the cluster.\n",
178+
"Like the ModelChain (see [basic example](modelchain_example.ipynb)) you can use the TurbineClusterModelChain with default parameters as shown in this example for the wind farm or specify custom parameters as done here for the cluster.\n",
179179
"If you use the 'run_model' method first the aggregated power curve and the mean hub height of the wind farm/cluster is calculated, then inherited functions of the ModelChain are used to calculate the wind speed and density (if necessary) at hub height. After that, depending on the parameters, wake losses are applied and at last the power output is calculated."
180180
]
181181
},
@@ -254,6 +254,7 @@
254254
" 'density_correction': True, # False (default) or True\n",
255255
" 'obstacle_height': 0, # default: 0\n",
256256
" 'hellman_exp': None} # None (default) or None\n",
257+
"\n",
257258
"# initialize TurbineClusterModelChain with own specifications and use\n",
258259
"# run_model method to calculate power output\n",
259260
"mc_example_cluster = TurbineClusterModelChain(\n",

windpowerlib/wind_turbine.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ def get_oedb_turbine_data(turbine_type, fetch_data):
359359
wind speeds in m/s in column 'wind_speed'.
360360
361361
"""
362+
# raise error if no turbine type is provided
363+
if turbine_type is None:
364+
raise ValueError("Please provide wind turbine type to fetch {} from "
365+
"oedb turbine library.".format(fetch_data))
366+
362367
if fetch_data == 'nominal_power':
363368
filename = os.path.join(os.path.dirname(__file__), 'data',
364369
'oedb_turbine_data.csv')

0 commit comments

Comments
 (0)