From 8bd75abc7fd71f1231dccd361a3f2e3919ad7c34 Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 8 Feb 2024 18:09:29 -0800 Subject: [PATCH 01/10] Fix links to data --- doc/getting_started.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/getting_started.rst b/doc/getting_started.rst index 169f336..7a28ba9 100644 --- a/doc/getting_started.rst +++ b/doc/getting_started.rst @@ -69,9 +69,9 @@ The basic usage of the windpowerlib is shown in the ModelChain example that is a To run the example you need the example weather and turbine data used: * :download:`Example weather data file <../example/weather.csv>` - * :download:`Example power curve data file <../example/data/power_curves.csv>` - * :download:`Example power coefficient curve data file <../example/data/power_coefficient_curves.csv>` - * :download:`Example nominal power data file <../example/data/turbine_data.csv>` + * :download:`Example power curve data file <../windpowerlib/data/default_turbine_data/power_curves.csv>` + * :download:`Example power coefficient curve data file <../windpowerlib/data/default_turbine_data/power_coefficient_curves.csv>` + * :download:`Example nominal power data file <../windpowerlib/data/default_turbine_data/turbine_data.csv>` Furthermore, you have to install the windpowerlib and to run the notebook you also need to install `notebook` using pip3. To launch jupyter notebook type ``jupyter notebook`` in the terminal. This will open a browser window. Navigate to the directory containing the notebook to open it. See the jupyter notebook quick start guide for more information on `how to install `_ and From 2aa2c8d45183773021f9798afd7eed8d2d04f087 Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 8 Feb 2024 18:09:38 -0800 Subject: [PATCH 02/10] Update version number --- setup.py | 2 +- windpowerlib/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 83f8cca..a1e5bf4 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ def read(fname): setup( name="windpowerlib", - version="0.2.2dev0", + version="0.2.2", description="Creating time series of wind power plants.", url="http://github.com/wind-python/windpowerlib", author="oemof developer group", diff --git a/windpowerlib/__init__.py b/windpowerlib/__init__.py index f376163..5a39353 100644 --- a/windpowerlib/__init__.py +++ b/windpowerlib/__init__.py @@ -1,6 +1,6 @@ __copyright__ = "Copyright oemof developer group" __license__ = "MIT" -__version__ = "0.2.2dev0" +__version__ = "0.2.2" from .wind_turbine import WindTurbine # noqa: F401 from .data import get_turbine_types # noqa: F401 From be0e7cb087c482e1cdc0f94c816f585e1b4b8b9c Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 8 Feb 2024 18:17:39 -0800 Subject: [PATCH 03/10] Try fixing indentation warnings in sphinx --- windpowerlib/power_output.py | 23 +++++++++++++++-------- windpowerlib/wind_speed.py | 8 ++++---- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/windpowerlib/power_output.py b/windpowerlib/power_output.py index 6c0e1f7..bf3ed0e 100644 --- a/windpowerlib/power_output.py +++ b/windpowerlib/power_output.py @@ -178,6 +178,7 @@ def power_curve_density_correction( Calculates the turbine power output using a density corrected power curve. This function is carried out when the parameter `density_correction` of an instance of the :class:`~.modelchain.ModelChain` class is True. + Parameters ---------- wind_speed : :pandas:`pandas.Series` or numpy.array @@ -190,17 +191,19 @@ def power_curve_density_correction( `power_curve_wind_speeds`. density : :pandas:`pandas.Series` or numpy.array Density of air at hub height in kg/m³. + Returns ------- :pandas:`pandas.Series` or numpy.array Electrical power output of the wind turbine in W. Data type depends on type of `wind_speed`. + Notes ----- The following equation is used for the site specific power curve wind speeds [1]_ [2]_ [3]_: - .. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0} - {\rho_{site}}\right)^{p(v)} + + .. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0}{\rho_{site}}\right)^{p(v)} with: .. math:: p=\begin{cases} \frac{1}{3} & v_{std} \leq 7.5\text{ m/s}\\ @@ -208,7 +211,9 @@ def power_curve_density_correction( \text{ m/s} Date: Thu, 8 Feb 2024 18:22:29 -0800 Subject: [PATCH 04/10] Fix indentation --- windpowerlib/power_output.py | 1 + 1 file changed, 1 insertion(+) diff --git a/windpowerlib/power_output.py b/windpowerlib/power_output.py index bf3ed0e..3b1fe76 100644 --- a/windpowerlib/power_output.py +++ b/windpowerlib/power_output.py @@ -204,6 +204,7 @@ def power_curve_density_correction( speeds [1]_ [2]_ [3]_: .. math:: v_{site}=v_{std}\cdot\left(\frac{\rho_0}{\rho_{site}}\right)^{p(v)} + with: .. math:: p=\begin{cases} \frac{1}{3} & v_{std} \leq 7.5\text{ m/s}\\ From 10f8db4213b0ad1c1ef7013443a64ed626e8977f Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 8 Feb 2024 20:57:44 -0800 Subject: [PATCH 05/10] Fix typo --- windpowerlib/wind_speed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windpowerlib/wind_speed.py b/windpowerlib/wind_speed.py index 25ce8fb..3271829 100644 --- a/windpowerlib/wind_speed.py +++ b/windpowerlib/wind_speed.py @@ -152,7 +152,7 @@ def hellman( For the Hellman exponent :math:`\alpha` many studies use a value of 1/7 for onshore and a value of 1/9 for offshore. The Hellman exponent can also - be calulated by the following equation [2]_ [3]_: + be calculated by the following equation [2]_ [3]_: .. math:: \alpha=\frac{1}{\ln\left(\frac{h_{hub}}{z_0} \right)} From 15adc5aa25dd3d5b1903c10df8175d83c6225143 Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 8 Feb 2024 21:49:59 -0800 Subject: [PATCH 06/10] Fix typo --- windpowerlib/wind_speed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windpowerlib/wind_speed.py b/windpowerlib/wind_speed.py index 3271829..766249c 100644 --- a/windpowerlib/wind_speed.py +++ b/windpowerlib/wind_speed.py @@ -36,7 +36,7 @@ def logarithmic_profile( Roughness length. obstacle_height : float Height of obstacles in the surrounding area of the wind turbine. Set - `obstacle_height` to zero for wide spread obstacles. Default: 0. + `obstacle_height` to zero for widespread obstacles. Default: 0. Returns ------- From a216a4584b0889b33db005c4d3003ed3db11e6fb Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 8 Feb 2024 21:55:15 -0800 Subject: [PATCH 07/10] Fix indentation --- windpowerlib/power_output.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/windpowerlib/power_output.py b/windpowerlib/power_output.py index 3b1fe76..2fc5052 100644 --- a/windpowerlib/power_output.py +++ b/windpowerlib/power_output.py @@ -277,6 +277,7 @@ def _get_power_output( wind_speed, power_curve_wind_speeds, density, power_curve_values ): """Get the power output at each timestep using only numpy to speed up performance + Parameters ---------- wind_speed : :numpy:`numpy.ndarray` @@ -289,10 +290,12 @@ def _get_power_output( power_curve_values : :numpy:`numpy.ndarray` Power curve values corresponding to wind speeds in `power_curve_wind_speeds`. + Returns ------- :numpy:`numpy.array` Electrical power output of the wind turbine in W. + """ # Calculate the power curves for each timestep using vectors # NOTE: power_curves_per_ts.shape = [len(wind_speed), len(density)] From 101ed12084441060d9a1f1735b7e01d559959e60 Mon Sep 17 00:00:00 2001 From: birgits Date: Mon, 19 Feb 2024 18:47:13 -0800 Subject: [PATCH 08/10] Fix sphinx warnings --- windpowerlib/power_output.py | 2 +- windpowerlib/wind_speed.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/windpowerlib/power_output.py b/windpowerlib/power_output.py index 2fc5052..35d6e42 100644 --- a/windpowerlib/power_output.py +++ b/windpowerlib/power_output.py @@ -295,7 +295,7 @@ def _get_power_output( ------- :numpy:`numpy.array` Electrical power output of the wind turbine in W. - + """ # Calculate the power curves for each timestep using vectors # NOTE: power_curves_per_ts.shape = [len(wind_speed), len(density)] diff --git a/windpowerlib/wind_speed.py b/windpowerlib/wind_speed.py index 766249c..1becdac 100644 --- a/windpowerlib/wind_speed.py +++ b/windpowerlib/wind_speed.py @@ -122,14 +122,14 @@ def hellman( Hub height of wind turbine. roughness_length : :pandas:`pandas.Series` or numpy.array or float Roughness length. If given and `hellman_exponent` is None: - `hellman_exponent`=1 / ln(hub_height/roughness_length), - otherwise `hellman_exponent`=1/7. Default: None. + `hellman_exponent` = 1 / ln(hub_height/roughness_length), + otherwise `hellman_exponent` = 1/7. Default: None. hellman_exponent : None or float The Hellman exponent, which combines the increase in wind speed due to stability of atmospheric conditions and surface roughness into one constant. If None and roughness length is given - `hellman_exponent`=1 / ln(hub_height/roughness_length), - otherwise `hellman_exponent`=1/7. Default: None. + `hellman_exponent` = 1 / ln(hub_height/roughness_length), + otherwise `hellman_exponent` = 1/7. Default: None. Returns ------- From b837f8b7af1a401eccd62f7723132c44be37607e Mon Sep 17 00:00:00 2001 From: birgits Date: Mon, 19 Feb 2024 18:47:38 -0800 Subject: [PATCH 09/10] Add sphinx to dev requirements and change to alphabetical order --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index a1e5bf4..08cd24a 100644 --- a/setup.py +++ b/setup.py @@ -28,12 +28,14 @@ def read(fname): install_requires=["pandas", "requests"], extras_require={ "dev": [ - "pytest", "jupyter", - "sphinx_rtd_theme", - "numpy", "matplotlib", + "nbsphinx", + "numpy", + "pytest", "pytest-notebook", + "sphinx >= 1.4", + "sphinx_rtd_theme", ] }, ) From d45c15825f3e26668a82eece56728b345bc8fe6b Mon Sep 17 00:00:00 2001 From: birgits Date: Mon, 19 Feb 2024 18:49:40 -0800 Subject: [PATCH 10/10] Set release date and add contributor --- doc/whatsnew/v0-2-2.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/whatsnew/v0-2-2.rst b/doc/whatsnew/v0-2-2.rst index be840c1..455b4de 100644 --- a/doc/whatsnew/v0-2-2.rst +++ b/doc/whatsnew/v0-2-2.rst @@ -1,4 +1,4 @@ -v0.2.2 () +v0.2.2 (February 20, 2024) ++++++++++++++++++++++++++++++ * Updated the code basis to work for newer versions of python (support for python 3.6 to @@ -8,4 +8,5 @@ v0.2.2 () Contributors ############ - * Birgit Schachler \ No newline at end of file + * Birgit Schachler + * Florian Maurer \ No newline at end of file