From 24be19d738b39647869465d082d05737102c9197 Mon Sep 17 00:00:00 2001 From: Sasan Jacob Rasti Date: Tue, 16 Jan 2024 21:15:25 +0100 Subject: [PATCH 1/3] Fixes #129 (#131) --- windpowerlib/wind_turbine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windpowerlib/wind_turbine.py b/windpowerlib/wind_turbine.py index 1efef69..fd068fa 100644 --- a/windpowerlib/wind_turbine.py +++ b/windpowerlib/wind_turbine.py @@ -78,7 +78,7 @@ class WindTurbine(object): corresponding power curve value in W. Default: None. nominal_power : None or float The nominal output of the wind turbine in W. Default: None. - + Notes ------ Your wind turbine object needs to have a power coefficient or power curve. @@ -170,9 +170,9 @@ def __init__( logging.debug(msg.format(self.turbine_type)) if self.nominal_power is None and turbine_data is not None: - self.nominal_power = float(turbine_data["nominal_power"]) + self.nominal_power = float(turbine_data["nominal_power"].iloc[0]) if self.rotor_diameter is None and turbine_data is not None: - self.rotor_diameter = float(turbine_data["rotor_diameter"]) + self.rotor_diameter = float(turbine_data["rotor_diameter"].iloc[0]) if self.rotor_diameter: if self.hub_height <= 0.5 * self.rotor_diameter: From ec6a63760e0b3c816efa0d2827d9b5f898efbd29 Mon Sep 17 00:00:00 2001 From: Francesco Witte Date: Wed, 31 Jan 2024 00:55:54 +0100 Subject: [PATCH 2/3] Fix a typo in the examplem plots (#126) --- doc/conf.py | 2 +- example/modelchain_example.ipynb | 2 +- example/modelchain_example.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 9c80ec3..9191a78 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -69,7 +69,7 @@ # General information about the project. project = u'windpowerlib' -copyright = u'2016-2021, oemof developer group' +copyright = u'2016-2023, oemof developer group' author = u'oemof developer group' import windpowerlib diff --git a/example/modelchain_example.ipynb b/example/modelchain_example.ipynb index 696301b..eed9126 100644 --- a/example/modelchain_example.ipynb +++ b/example/modelchain_example.ipynb @@ -517,7 +517,7 @@ " x='wind_speed', y='value', style='*',\n", " title='Enercon E126 power coefficient curve')\n", " plt.xlabel('Wind speed in m/s')\n", - " plt.ylabel('Power in W')\n", + " plt.ylabel('Power coefficient $\\mathrm{C}_\\mathrm{P}$')\n", " plt.show()\n", " if e126.power_curve is not None:\n", " e126.power_curve.plot(x='wind_speed', y='value', style='*',\n", diff --git a/example/modelchain_example.py b/example/modelchain_example.py index 5ed87d7..ec88c48 100644 --- a/example/modelchain_example.py +++ b/example/modelchain_example.py @@ -274,7 +274,7 @@ def plot_or_print(my_turbine, e126, my_turbine2): title="Enercon E126 power curve", ) plt.xlabel("Wind speed in m/s") - plt.ylabel("Power in W") + plt.ylabel("Power coefficient $\mathrm{C}_\mathrm{P}$") plt.show() if my_turbine.power_curve is not False: my_turbine.power_curve.plot( From b493bd6ec18f5f6d946ea87c2f1a9fb4e86db88a Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Wed, 31 Jan 2024 01:01:33 +0100 Subject: [PATCH 3/3] add default_turbine_data to pip install package_data (#133) --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cc4216a..e588c93 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,8 @@ def read(fname): packages=["windpowerlib"], package_data={ "windpowerlib": [ - os.path.join("data", "*.csv"), + os.path.join("data", "**.csv"), + os.path.join("data", "default_turbine_data", "*.csv"), os.path.join("oedb", "*.csv"), ] },