Metadata-Version: 2.3
Name: wind-farm-loads
Version: 0.11.0
Summary: Couple load surrogate models with PyWake and Floris.
License: Proprietary
Author: DTU Wind and Energy Systems
Maintainer: Riccardo Riva
Maintainer-email: ricriv@dtu.dk
Requires-Python: >=3.10,<3.13
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: code-style
Provides-Extra: docs
Provides-Extra: floris
Provides-Extra: profiler
Provides-Extra: pywake
Provides-Extra: spyder
Provides-Extra: test
Requires-Dist: PyQt6 (>=6.8.1,<7.0.0) ; extra == "spyder"
Requires-Dist: PyYAML (>=6.0.0,<7.0.0) ; extra == "floris"
Requires-Dist: black (>=25.1.0,<26.0.0) ; extra == "code-style"
Requires-Dist: flake8 (>=7.0.0,<8.0.0) ; extra == "code-style"
Requires-Dist: floris (==4.4.2) ; extra == "floris"
Requires-Dist: isort (>=6.0.0,<7.0.0) ; extra == "code-style"
Requires-Dist: line-profiler (>=4.2.0,<5.0.0) ; extra == "profiler"
Requires-Dist: matplotlib (>=3.10.0,<4.0.0)
Requires-Dist: memory-profiler (>=0.61.0) ; extra == "profiler"
Requires-Dist: numpy (>=1.10.0,<3.0.0)
Requires-Dist: numpydoc (>=1.8.0,<2.0.0) ; extra == "docs"
Requires-Dist: pandas (>=2.0.0,<3.0.0)
Requires-Dist: py_wake (>=2.6.11,<3.0.0) ; extra == "pywake"
Requires-Dist: pydata-sphinx-theme (>=0.16.1,<1.0.0) ; extra == "docs"
Requires-Dist: pytest (>=8.3.0,<9.0.0) ; extra == "test"
Requires-Dist: pytest-cases (>=3.8.6,<4.0.0) ; extra == "test"
Requires-Dist: pytest-cov (>=6.0.0,<7.0.0) ; extra == "test"
Requires-Dist: pytest-xdist (>=3.6.1,<4.0.0) ; extra == "test"
Requires-Dist: scipy (>=1.15.0,<2.0.0)
Requires-Dist: sphinx (>=8.0.0,<9.0.0) ; extra == "docs"
Requires-Dist: spyder-kernels (>=3.0.0,<3.1.0) ; extra == "spyder"
Requires-Dist: surrogates-interface (>=4.2.0,<5.0.0)
Requires-Dist: surrogates-interface[tf] (>=4.2.0,<5.0.0) ; extra == "test"
Requires-Dist: tomli ; python_version < "3.11"
Requires-Dist: xarray (>=2025.0.0,<2026.0.0)
Project-URL: Documentation, https://surrogate-models.pages.windenergy.dtu.dk/wind-farm-loads/
Project-URL: Repository, https://gitlab.windenergy.dtu.dk/surrogate-models/wind-farm-loads
Description-Content-Type: text/markdown

# Wind farm load surrogate

[![pipeline status](https://gitlab.windenergy.dtu.dk/surrogate-models/wind-farm-loads/badges/main/pipeline.svg)](https://gitlab.windenergy.dtu.dk/surrogate-models/wind-farm-loads/-/commits/main)
[![coverage report](https://gitlab.windenergy.dtu.dk/surrogate-models/wind-farm-loads/badges/main/coverage.svg)](https://gitlab.windenergy.dtu.dk/surrogate-models/wind-farm-loads/-/commits/main)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Couple a load surrogate model with PyWake and Floris.

The documentation is available at
https://surrogate-models.pages.windenergy.dtu.dk/wind-farm-loads/

## Installation instructions

The dependencies are managed with [Poetry](https://python-poetry.org/), and some are marked as optional.
To install all dependencies type
```
poetry install --all-extras
```
It is also possible to install only some optional dependencies, with
```
poetry install --extras "<option_1> <option_2>"
```
For example
```
poetry install --extras "pywake spyder"
```

The optional dependencies are listed in the following table

| Name          | Description                                            |
|---------------|--------------------------------------------------------|
| `pywake`      | Add PyWake                                             |
| `floris`      | Add Floris                                             |
| `spyder`      | Enable the use of Spyder with this virtual environment |
| `test`        | Enable testing                                         |
| `code_style`  | Enable code style checking                             |
| `docs`        | Enable building the documentation                      |
| `profiler`    | Enable time and memory profiler                        |

This package relies on [`surrogates-interface`](https://surrogate-models.pages.windenergy.dtu.dk/surrogate-models-interface/) to evaluate the loads. It is the responsibility of the user to select which surrogate model library to install. At the time of writing, the options are:

- `surrogates-interface[tf]` ➡️ TensorFlow
- `surrogates-interface[torch]` ➡️ PyTorch
- `surrogates-interface[smt]` ➡️ SMT

Poetry will write the location of the virtual environment. This is useful to delete it when it's not needed anymore, and also to select the python executable from Spyder.

To use Spyder go to Tools / Preferences / Python interpreter. Select "Use the following Python interpreter" and enter the path to python.exe in the virtual environment. It should look like `%userprofile%\AppData\Local\pypoetry\Cache\virtualenvs\wind-farm-loads-yjbA2zDm-py3.11.11\Scripts\python.exe`.

To run any command there are two options:

- Activate the virtual environment. That is, open a new command prompt, and then enter `%userprofile%\AppData\Local\pypoetry\Cache\virtualenvs\wind-farm-loads-yjbA2zDm-py3.12\Scripts\activate.bat`.
- Always write `poetry run` before anything. For example `poetry run python my_script.py`.

