.. image:: https://travis-ci.org/wind-python/windpowerlib.svg?branch=dev
:target: https://travis-ci.org/wind-python/windpowerlib
.. image:: https://coveralls.io/repos/github/wind-python/windpowerlib/badge.svg?branch=dev
:target: https://coveralls.io/github/wind-python/windpowerlib?branch=dev
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.824267.svg
:target: https://doi.org/10.5281/zenodo.824267
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/wind-python/windpowerlib/dev?filepath=example
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/lgtm/grade/python/g/wind-python/windpowerlib.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/wind-python/windpowerlib/context:python
Introduction
=============
The windpowerlib is a library that provides a set of functions and classes to calculate the power output of wind turbines. It was originally part of the
`feedinlib <https://github.com/oemof/feedinlib>`_ (windpower and photovoltaic) but was taken out to build up a community concentrating on wind power models.
For a quick start see the `Examples and basic usage <http://windpowerlib.readthedocs.io/en/stable/getting_started.html#examplereference-label>`_ section.
Documentation
==============
Full documentation can be found at `readthedocs <https://windpowerlib.readthedocs.io/en/stable/>`_.
Use the `project site <http://readthedocs.org/projects/windpowerlib>`_ of readthedocs to choose the version of the documentation.
Go to the `download page <http://readthedocs.org/projects/windpowerlib/downloads/>`_ to download different versions and formats (pdf, html, epub) of the documentation.
Installation
============
If you have a working Python 3 (>= 3.6) environment, use pypi to install the latest windpowerlib version:
::
pip install windpowerlib
The windpowerlib is designed for Python 3 and tested on Python >= 3.5. We highly recommend to use virtual environments.
Please see the `installation page <http://oemof.readthedocs.io/en/stable/installation_and_setup.html>`_ of the oemof documentation for complete instructions on how to install python and a virtual environment on your operating system.
Optional Packages
~~~~~~~~~~~~~~~~~
To see the plots of the windpowerlib example in the `Examples and basic usage <http://windpowerlib.readthedocs.io/en/stable/getting_started.html#examplereference-label>`_ section you should `install the matplotlib package <http://matplotlib.org/users/installing.html>`_.
Matplotlib can be installed using pip:
::
pip install matplotlib
.. _examplereference-label:
Examples and basic usage
=========================
The simplest way to run the example notebooks without installing windpowerlib is to click `here <https://mybinder.org/v2/gh/wind-python/windpowerlib/dev?filepath=example>`_ and open them with Binder.
The basic usage of the windpowerlib is shown in the `ModelChain example <http://windpowerlib.readthedocs.io/en/stable/modelchain_example_notebook.html>`_ that is available as jupyter notebook and python script:
* `ModelChain example (Python script) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/modelchain_example.py>`_
* `ModelChain example (Jupyter notebook) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/modelchain_example.ipynb>`_
To run the example you need example weather that is downloaded automatically and can also be downloaded here:
* `Example weather data file <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/weather.csv>`_
To run the examples locally you have to install the windpowerlib. 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 <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/install.html>`_ and
`how to run <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html>`_ jupyter notebooks. In order to reproduce the figures in a notebook you need to install `matplotlib`.
Further functionalities, like the modelling of wind farms and wind turbine clusters, are shown in the `TurbineClusterModelChain example <http://windpowerlib.readthedocs.io/en/stable/turbine_cluster_modelchain_example_notebook.html>`_. As the ModelChain example it is available as jupyter notebook and as python script. The weather used in this example is the same as in the ModelChain example.
* `TurbineClusterModelChain example (Python script) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/turbine_cluster_modelchain_example.py>`_
* `TurbineClusterModelChain example (Jupyter notebook) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/turbine_cluster_modelchain_example.ipynb>`_
You can also look at the examples in the `Examples section <http://windpowerlib.readthedocs.io/en/stable/examples.html>`_.
Wind turbine data
==================
The windpowerlib provides data of many wind turbines but it is also possible to
use your own turbine data.
Use internal data
~~~~~~~~~~~~~~~~~
The windpowerlib provides `wind turbine data <https://github.com/wind-python/windpowerlib/tree/master/windpowerlib/oedb>`_
(power curves, hub heights, etc.) for a large set of wind turbines. See `Initialize wind turbine` in `Examples section <http://windpowerlib.readthedocs.io/en/stable/examples.html>`_ on how
to use this data in your simulations.
The dataset is hosted and maintained on the `OpenEnergy database <https://openenergy-platform.org/dataedit/>`_ (oedb).
To update your local files with the latest version of the `oedb turbine library <https://openenergy-platform.org/dataedit/view/supply/wind_turbine_library>`_ you can execute the following in your python console:
.. code:: python
from windpowerlib.wind_turbine import load_turbine_data_from_oedb
load_turbine_data_from_oedb()
If you find your turbine in the database it is very easy to use it in the
windpowerlib
.. code:: python
from windpowerlib import WindTurbine
enercon_e126 = {
"turbine_type": "E-126/4200", # turbine type as in register
"hub_height": 135, # in m
}
e126 = WindTurbine(**enercon_e126)
We would like to encourage anyone to contribute to the turbine library by adding turbine data or reporting errors in the data.
See `the OEP <https://github.com/OpenEnergyPlatform/data-preprocessing/issues/28>`_ for more information on how to contribute.
Use your own turbine data
~~~~~~~~~~~~~~~~~~~~~~~~~
It is possible to use your own power curve. However, the most sustainable way
is to send us the data to be included in the windpowerlib and to be available
for all users. This may not be possible in all cases.
Assuming the data files looks like this:
.. code::
wind,power
0.0,0.0
3.0,39000.0
5.0,270000.0
10.0,2250000.0
15.0,4500000.0
25.0,4500000.0
You can use pandas to read the file and pass it to the turbine dictionary. I
you have basic knowledge of pandas it is easy to use any kind of data file.
.. code:: python
import pandas as pd
from windpowerlib import WindTurbine, create_power_curve
my_data = pd.read_csv("path/to/my/data/file.csv")
my_turbine_data = {
"nominal_power": 6e6, # in W
"hub_height": 115, # in m
"power_curve": create_power_curve(
wind_speed=my_data["wind"], power=my_data["power"]
),
}
my_turbine = WindTurbine(**my_turbine_data)
See the `modelchain_example` for more information.
Contributing
==============
We are warmly welcoming all who want to contribute to the windpowerlib. If you are interested in wind models and want to help improving the existing model do not hesitate to contact us via github or email (windpowerlib@rl-institut.de).
Clone: https://github.com/wind-python/windpowerlib and install the cloned repository using pip:
.. code:: bash
pip install -e /path/to/the/repository
As the windpowerlib started with contributors from the `oemof developer group <https://github.com/orgs/oemof/teams/oemof-developer-group>`_ we use the same
`developer rules <http://oemof.readthedocs.io/en/stable/developing_oemof.html>`_.
**How to create a pull request:**
* `Fork <https://help.github.com/articles/fork-a-repo>`_ the windpowerlib repository to your own github account.
* Change, add or remove code.
* Commit your changes.
* Create a `pull request <https://guides.github.com/activities/hello-world/>`_ and describe what you will do and why.
* Wait for approval.
**Generally the following steps are required when changing, adding or removing code:**
* Add new tests if you have written new functions/classes.
* Add/change the documentation (new feature, API changes ...).
* Add a whatsnew entry and your name to Contributors.
* Check if all tests still work by simply executing pytest in your windpowerlib directory:
.. role:: bash(code)
:language: bash
.. code:: bash
pytest
Citing the windpowerlib
========================
We use the zenodo project to get a DOI for each version. `Search zenodo for the right citation of your windpowerlib version <https://zenodo.org/search?page=1&size=20&q=windpowerlib>`_.
License
============
Copyright (c) 2019 oemof developer group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Raw data
{
"_id": null,
"home_page": "http://github.com/wind-python/windpowerlib",
"name": "windpowerlib",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "oemof developer group",
"author_email": "windpowerlib@rl-institut.de",
"download_url": "https://files.pythonhosted.org/packages/7a/56/7d8635d25407d77780a8e2d2998d4d2bbf2f32a0bb10366604eb26aa7add/windpowerlib-0.2.1.tar.gz",
"platform": "",
"description": ".. image:: https://travis-ci.org/wind-python/windpowerlib.svg?branch=dev\n :target: https://travis-ci.org/wind-python/windpowerlib\n.. image:: https://coveralls.io/repos/github/wind-python/windpowerlib/badge.svg?branch=dev\n :target: https://coveralls.io/github/wind-python/windpowerlib?branch=dev\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.824267.svg\n :target: https://doi.org/10.5281/zenodo.824267\n.. image:: https://mybinder.org/badge_logo.svg\n :target: https://mybinder.org/v2/gh/wind-python/windpowerlib/dev?filepath=example\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/lgtm/grade/python/g/wind-python/windpowerlib.svg?logo=lgtm&logoWidth=18\n :target: https://lgtm.com/projects/g/wind-python/windpowerlib/context:python\n\nIntroduction\n=============\n\nThe windpowerlib is a library that provides a set of functions and classes to calculate the power output of wind turbines. It was originally part of the \n`feedinlib <https://github.com/oemof/feedinlib>`_ (windpower and photovoltaic) but was taken out to build up a community concentrating on wind power models.\n\nFor a quick start see the `Examples and basic usage <http://windpowerlib.readthedocs.io/en/stable/getting_started.html#examplereference-label>`_ section.\n\n\nDocumentation\n==============\n\nFull documentation can be found at `readthedocs <https://windpowerlib.readthedocs.io/en/stable/>`_.\n\nUse the `project site <http://readthedocs.org/projects/windpowerlib>`_ of readthedocs to choose the version of the documentation. \nGo to the `download page <http://readthedocs.org/projects/windpowerlib/downloads/>`_ to download different versions and formats (pdf, html, epub) of the documentation.\n\n\nInstallation\n============\n\nIf you have a working Python 3 (>= 3.6) environment, use pypi to install the latest windpowerlib version:\n\n::\n\n pip install windpowerlib\n\nThe windpowerlib is designed for Python 3 and tested on Python >= 3.5. We highly recommend to use virtual environments.\nPlease see the `installation page <http://oemof.readthedocs.io/en/stable/installation_and_setup.html>`_ of the oemof documentation for complete instructions on how to install python and a virtual environment on your operating system.\n\nOptional Packages\n~~~~~~~~~~~~~~~~~\n\nTo see the plots of the windpowerlib example in the `Examples and basic usage <http://windpowerlib.readthedocs.io/en/stable/getting_started.html#examplereference-label>`_ section you should `install the matplotlib package <http://matplotlib.org/users/installing.html>`_.\nMatplotlib can be installed using pip:\n\n::\n\n pip install matplotlib\n\n.. _examplereference-label:\n\nExamples and basic usage\n=========================\n\nThe simplest way to run the example notebooks without installing windpowerlib is to click `here <https://mybinder.org/v2/gh/wind-python/windpowerlib/dev?filepath=example>`_ and open them with Binder.\n\nThe basic usage of the windpowerlib is shown in the `ModelChain example <http://windpowerlib.readthedocs.io/en/stable/modelchain_example_notebook.html>`_ that is available as jupyter notebook and python script:\n\n* `ModelChain example (Python script) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/modelchain_example.py>`_\n* `ModelChain example (Jupyter notebook) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/modelchain_example.ipynb>`_\n\nTo run the example you need example weather that is downloaded automatically and can also be downloaded here:\n\n* `Example weather data file <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/weather.csv>`_\n\nTo run the examples locally you have to install the windpowerlib. To run the notebook you also need to install `notebook` using pip3. To launch jupyter notebook type ``jupyter notebook`` in the terminal.\nThis 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 <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/install.html>`_ and\n`how to run <http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html>`_ jupyter notebooks. In order to reproduce the figures in a notebook you need to install `matplotlib`.\n\nFurther functionalities, like the modelling of wind farms and wind turbine clusters, are shown in the `TurbineClusterModelChain example <http://windpowerlib.readthedocs.io/en/stable/turbine_cluster_modelchain_example_notebook.html>`_. As the ModelChain example it is available as jupyter notebook and as python script. The weather used in this example is the same as in the ModelChain example.\n\n* `TurbineClusterModelChain example (Python script) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/turbine_cluster_modelchain_example.py>`_\n* `TurbineClusterModelChain example (Jupyter notebook) <https://raw.githubusercontent.com/wind-python/windpowerlib/master/example/turbine_cluster_modelchain_example.ipynb>`_\n\nYou can also look at the examples in the `Examples section <http://windpowerlib.readthedocs.io/en/stable/examples.html>`_.\n\nWind turbine data\n==================\n\nThe windpowerlib provides data of many wind turbines but it is also possible to\nuse your own turbine data.\n\nUse internal data\n~~~~~~~~~~~~~~~~~\n\nThe windpowerlib provides `wind turbine data <https://github.com/wind-python/windpowerlib/tree/master/windpowerlib/oedb>`_\n(power curves, hub heights, etc.) for a large set of wind turbines. See `Initialize wind turbine` in `Examples section <http://windpowerlib.readthedocs.io/en/stable/examples.html>`_ on how\nto use this data in your simulations.\n\nThe dataset is hosted and maintained on the `OpenEnergy database <https://openenergy-platform.org/dataedit/>`_ (oedb).\nTo update your local files with the latest version of the `oedb turbine library <https://openenergy-platform.org/dataedit/view/supply/wind_turbine_library>`_ you can execute the following in your python console:\n\n.. code:: python\n\n from windpowerlib.wind_turbine import load_turbine_data_from_oedb\n load_turbine_data_from_oedb()\n\nIf you find your turbine in the database it is very easy to use it in the\nwindpowerlib\n\n.. code:: python\n\n from windpowerlib import WindTurbine\n enercon_e126 = {\n \"turbine_type\": \"E-126/4200\", # turbine type as in register\n \"hub_height\": 135, # in m\n }\n e126 = WindTurbine(**enercon_e126)\n\nWe would like to encourage anyone to contribute to the turbine library by adding turbine data or reporting errors in the data.\nSee `the OEP <https://github.com/OpenEnergyPlatform/data-preprocessing/issues/28>`_ for more information on how to contribute.\n\nUse your own turbine data\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt is possible to use your own power curve. However, the most sustainable way\nis to send us the data to be included in the windpowerlib and to be available\nfor all users. This may not be possible in all cases.\n\nAssuming the data files looks like this:\n\n.. code::\n\n wind,power\n 0.0,0.0\n 3.0,39000.0\n 5.0,270000.0\n 10.0,2250000.0\n 15.0,4500000.0\n 25.0,4500000.0\n\nYou can use pandas to read the file and pass it to the turbine dictionary. I\nyou have basic knowledge of pandas it is easy to use any kind of data file.\n\n.. code:: python\n\n import pandas as pd\n from windpowerlib import WindTurbine, create_power_curve\n my_data = pd.read_csv(\"path/to/my/data/file.csv\")\n\n my_turbine_data = {\n \"nominal_power\": 6e6, # in W\n \"hub_height\": 115, # in m\n \"power_curve\": create_power_curve(\n wind_speed=my_data[\"wind\"], power=my_data[\"power\"]\n ),\n }\n\n my_turbine = WindTurbine(**my_turbine_data)\n\nSee the `modelchain_example` for more information.\n\nContributing\n==============\n\nWe are warmly welcoming all who want to contribute to the windpowerlib. If you are interested in wind models and want to help improving the existing model do not hesitate to contact us via github or email (windpowerlib@rl-institut.de).\n\nClone: https://github.com/wind-python/windpowerlib and install the cloned repository using pip:\n\n.. code:: bash\n\n pip install -e /path/to/the/repository\n\nAs the windpowerlib started with contributors from the `oemof developer group <https://github.com/orgs/oemof/teams/oemof-developer-group>`_ we use the same\n`developer rules <http://oemof.readthedocs.io/en/stable/developing_oemof.html>`_.\n\n**How to create a pull request:**\n\n* `Fork <https://help.github.com/articles/fork-a-repo>`_ the windpowerlib repository to your own github account.\n* Change, add or remove code.\n* Commit your changes.\n* Create a `pull request <https://guides.github.com/activities/hello-world/>`_ and describe what you will do and why.\n* Wait for approval.\n\n**Generally the following steps are required when changing, adding or removing code:**\n\n* Add new tests if you have written new functions/classes.\n* Add/change the documentation (new feature, API changes ...).\n* Add a whatsnew entry and your name to Contributors.\n* Check if all tests still work by simply executing pytest in your windpowerlib directory:\n\n.. role:: bash(code)\n :language: bash\n\n.. code:: bash\n\n pytest\n\nCiting the windpowerlib\n========================\n\nWe use the zenodo project to get a DOI for each version. `Search zenodo for the right citation of your windpowerlib version <https://zenodo.org/search?page=1&size=20&q=windpowerlib>`_.\n\nLicense\n============\n\nCopyright (c) 2019 oemof developer group\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Creating time series of wind power plants.",
"version": "0.2.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b1748fcdad34405dae975ab9b2786fed5f5320b310d0d3413406bb46330e0069",
"md5": "c3d7f0d63a951513187462ca3290d708",
"sha256": "1f0590893a22548f80a2d0e2a6bf87418f29239da8a316f92e4ec7a84860ae14"
},
"downloads": -1,
"filename": "windpowerlib-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c3d7f0d63a951513187462ca3290d708",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 61251,
"upload_time": "2021-03-09T16:27:21",
"upload_time_iso_8601": "2021-03-09T16:27:21.357993Z",
"url": "https://files.pythonhosted.org/packages/b1/74/8fcdad34405dae975ab9b2786fed5f5320b310d0d3413406bb46330e0069/windpowerlib-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7a567d8635d25407d77780a8e2d2998d4d2bbf2f32a0bb10366604eb26aa7add",
"md5": "f9502c47d4ba4d2bc79cedf59fb64e74",
"sha256": "f585da2e0abf3cc371c5e75f275dec6bc984835fb6a7921a00f143d7973feeee"
},
"downloads": -1,
"filename": "windpowerlib-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "f9502c47d4ba4d2bc79cedf59fb64e74",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 55949,
"upload_time": "2021-03-09T16:27:23",
"upload_time_iso_8601": "2021-03-09T16:27:23.206450Z",
"url": "https://files.pythonhosted.org/packages/7a/56/7d8635d25407d77780a8e2d2998d4d2bbf2f32a0bb10366604eb26aa7add/windpowerlib-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-03-09 16:27:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "wind-python",
"github_project": "windpowerlib",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"lcname": "windpowerlib"
}