Skip to content

Commit 0f29036

Browse files
committed
Merge branch 'dev'
2 parents 529b27f + 0f1f5f7 commit 0f29036

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def read(fname):
55
return open(os.path.join(os.path.dirname(__file__), fname)).read()
66

77
setup(name='windpowerlib',
8-
version='0.1.0',
8+
version='0.1.1dev',
99
description='Creating time series of wind power plants.',
1010
url='http://github.com/wind-python/windpowerlib',
1111
author='oemof developing group',

windpowerlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__copyright__ = "Copyright oemof developer group"
22
__license__ = "GPLv3"
3-
__version__ = '0.1.0'
3+
__version__ = '0.1.1dev'
44

55
from windpowerlib.wind_turbine import WindTurbine
66
from windpowerlib.wind_farm import WindFarm

windpowerlib/wind_turbine.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,17 @@ def get_turbine_data_from_oedb(turbine_type, fetch_curve):
296296
else fetch_curve)
297297
# Select curve and nominal power of turbine type
298298
try:
299-
df = pd.DataFrame(turbine_data.loc[turbine_type][curve])
299+
df = turbine_data.loc[turbine_type]
300300
except KeyError:
301301
raise KeyError("Turbine type '{}' not in database. ".format(
302302
turbine_type) + "Use 'get_turbine_types()' to see a table of " +
303303
"possible wind turbine types.")
304+
if df[curve] is not None:
305+
df = pd.DataFrame(df[curve])
306+
else:
307+
sys.exit("{} of {} not available in ".format(curve, turbine_type) +
308+
"oedb. Use 'get_turbine_types()' to see for which turbine " +
309+
"types power coefficient curves are available.")
304310
nominal_power = turbine_data.loc[turbine_type][
305311
'installed_capacity_kw'] * 1000
306312
df.columns = ['wind_speed', 'value']

0 commit comments

Comments
 (0)