Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
bdc95e0
Add new `FlascDataFrame` object to enhance user interface with data (…
misi9170 Sep 4, 2024
ff8e962
Add dataframe conversions to flascdataframe (#211)
paulf81 Sep 11, 2024
ebe1451
Add wind up example using `FlascDataFrame` (#210)
aclerc Sep 12, 2024
fb6ff8d
loosen wind-up dependency
paulf81 Sep 12, 2024
67a0de9
Add examples
paulf81 Sep 17, 2024
9f0fa08
add model fit
paulf81 Sep 17, 2024
1877d34
add tests
paulf81 Sep 17, 2024
9ce5b60
Clean up a little
paulf81 Oct 1, 2024
3d41415
Reorganize
paulf81 Oct 1, 2024
7d61e56
Ignore data holding output files
paulf81 Oct 1, 2024
7c5cf43
Generate farm data
paulf81 Oct 1, 2024
416effc
Add turbine_groupings to cost routing
paulf81 Oct 4, 2024
005a028
Cost function optimization library
paulf81 Oct 4, 2024
9b0a8e8
bugfix
paulf81 Oct 4, 2024
db45287
Can't insist on time
paulf81 Oct 4, 2024
a2ce114
Add optimizations
paulf81 Oct 4, 2024
19d8921
Add a test notebook
paulf81 Oct 4, 2024
4532db4
small update
paulf81 Oct 4, 2024
d2acbb3
Don't copy floris model
paulf81 Oct 8, 2024
d14a177
add optuna
paulf81 Oct 8, 2024
5091d24
reorg and add optuna
paulf81 Oct 8, 2024
de66ad8
Update example
paulf81 Oct 8, 2024
9d79cc9
Merge branch 'develop' into feature/modelfit_2
paulf81 Oct 14, 2024
f7547d8
Merge branch 'develop' into feature/modelfit_2
paulf81 Oct 18, 2024
1e8cdf7
Add optuna dependecy
paulf81 Oct 18, 2024
34167a0
Merge branch 'develop' into feature/modelfit_2
paulf81 Oct 18, 2024
570f661
Merge branch 'develop' into feature/modelfit_2
paulf81 Oct 19, 2024
5dba5ad
Update to parflorismodel
paulf81 Oct 21, 2024
2668f9f
clean up docs
paulf81 Oct 21, 2024
569bf4c
Merge branch 'develop' into feature/modelfit_2
paulf81 Oct 21, 2024
4775168
Merge branch 'develop' into feature/modelfit_2
paulf81 Oct 21, 2024
15fd0d0
Add estimate_ws_with_floris
paulf81 Oct 23, 2024
69d0a7c
Add temp development notebook
paulf81 Oct 23, 2024
def5c82
Add a test
paulf81 Oct 23, 2024
18deef8
update cost function
paulf81 Oct 24, 2024
d9d4344
Merge branch 'ws_est' into feature/modelfit_2
paulf81 Oct 24, 2024
5ce287f
Update cost library
paulf81 Oct 24, 2024
4ae5921
Add timeout to optuna
paulf81 Oct 25, 2024
12299b2
change n_trials default
paulf81 Oct 25, 2024
b35982a
use values for alignment
paulf81 Oct 25, 2024
285d2cd
add turbine_by_turbine
paulf81 Oct 26, 2024
664e5b2
fix function
paulf81 Oct 26, 2024
a28b82b
Add save on df floris
paulf81 Oct 29, 2024
3f0a8e3
add set wd_std function
paulf81 Oct 29, 2024
148b982
add opt with uncertainty
paulf81 Oct 29, 2024
edb0944
bugfix
paulf81 Oct 29, 2024
3d7f489
add expected turbine error
paulf81 Oct 30, 2024
8ea28c9
Add protections against index mismatch
paulf81 Oct 30, 2024
8f0230e
give clearer names to cost functions
paulf81 Nov 1, 2024
6cc8b12
Add initial enqueing
paulf81 Nov 1, 2024
6800b95
Delete unused aggregate opts
paulf81 Nov 4, 2024
0f9c6ae
Merge branch 'develop' into feature/modelfit_2
paulf81 Nov 8, 2024
92e7742
precommit
paulf81 Nov 8, 2024
f13258a
Update hooks
paulf81 Nov 8, 2024
1e6fce9
fix tests
paulf81 Nov 8, 2024
1d84482
Return study object
paulf81 Nov 11, 2024
487ea5d
Merge branch 'develop' into feature/modelfit_2
paulf81 Nov 15, 2024
b56e0a0
ruff format
paulf81 Nov 15, 2024
8d8c4da
Merge branch 'develop' into feature/modelfit_2
paulf81 Jan 17, 2025
f045a4b
Update numpy req
paulf81 Feb 17, 2025
535998e
Point to develop
paulf81 Feb 17, 2025
b714587
fix inf syntax
paulf81 Feb 17, 2025
0be814c
Merge branch 'develop' into feature/modelfit_2
paulf81 Feb 20, 2025
d03d988
Merge branch 'feature/up_numpy' into feature/modelfit_2
paulf81 Feb 20, 2025
c6f5fac
Add abs function
paulf81 Mar 3, 2025
816bebf
Add cost library tests
paulf81 Mar 3, 2025
1604b07
fix tests
paulf81 Mar 3, 2025
95f0466
formatting
paulf81 Mar 3, 2025
b160927
Add future annotations
paulf81 Mar 3, 2025
830a5f6
Merge branch 'develop' into feature/modelfit_2
paulf81 Mar 13, 2025
9c2b680
Clean up example 0
paulf81 Mar 18, 2025
2afaa16
Update example 1
paulf81 Mar 18, 2025
533ea1f
Update example 1
paulf81 Mar 18, 2025
2a07475
Update opt_library
paulf81 Mar 19, 2025
63fd90c
Update optimization example
paulf81 Mar 19, 2025
509c6ee
add gauss turbopark
paulf81 Mar 20, 2025
a84e725
update examples
paulf81 Mar 20, 2025
2cc5a7c
Allow random seed setting; warn, rather than error, if turbine counts…
misi9170 Mar 29, 2025
279973d
Arg doc and name study.
misi9170 Apr 3, 2025
a562fdb
Formatting
misi9170 Apr 3, 2025
cb38b50
add results analysis module
paulf81 Apr 4, 2025
e3fdf09
include great tables
paulf81 Apr 4, 2025
58cec37
Formatting
misi9170 Apr 7, 2025
be6e358
Generalize table
paulf81 Apr 11, 2025
b456bbd
resolve merge
paulf81 Apr 11, 2025
89c1493
Include total farm result table
paulf81 Apr 11, 2025
6cf490e
Remove requirement that pow_000 exists
misi9170 Apr 23, 2025
c091deb
Select cost comparison by pow_xxx cols available in df_scada
misi9170 Apr 23, 2025
46a810e
Fix error introduced in in_flasc_format and update cost_libarary_test…
misi9170 Apr 23, 2025
a111fb4
Formatting
misi9170 Apr 23, 2025
76871ca
Add splitting options
paulf81 Apr 30, 2025
d36f790
Add turbine_subset option
paulf81 Apr 30, 2025
9db5dba
some changes
paulf81 Apr 30, 2025
24c083b
Merge branch 'feature/modelfit_2' of github.com:paulf81/flasc into fe…
paulf81 Apr 30, 2025
54ab31d
Add time back in
paulf81 Apr 30, 2025
b093954
fix conversion
paulf81 May 1, 2025
87bd39b
start on updated examples
paulf81 May 12, 2025
76c0c4e
linting
paulf81 Aug 1, 2025
e80af64
ignore rules
paulf81 Aug 1, 2025
dc21600
remove comments
paulf81 Aug 1, 2025
5d6b776
better docstrings
paulf81 Aug 1, 2025
21f8e50
improve docstrings and add warnings
paulf81 Aug 1, 2025
6780c67
better docstrings
paulf81 Aug 1, 2025
d4556e6
remove mixing gain
paulf81 Aug 1, 2025
97796c8
update tuning notebook
paulf81 Aug 1, 2025
7b23127
update notebook 11
paulf81 Aug 5, 2025
b09a7cd
remove deprecated functions
paulf81 Aug 12, 2025
6310fc6
Create cost objects
misi9170 Aug 13, 2025
3696262
Enhance structure of cost objects
misi9170 Aug 14, 2025
69597bb
wake loss method, not yet tested
misi9170 Aug 14, 2025
83b01cf
Make set_col_by_turbines public
misi9170 Aug 14, 2025
1053524
Format
misi9170 Aug 14, 2025
68b16cf
Update examples for cost classes and update type hints
misi9170 Aug 22, 2025
d99b84b
Remove examples for old floris_tuning package
misi9170 Aug 22, 2025
6bcef2f
Deprecation warning
misi9170 Aug 22, 2025
405bd91
Move function to package as a utility
misi9170 Aug 22, 2025
b1836fb
Consolidate package into previous model_fitting/ module
misi9170 Aug 24, 2025
49494e9
Docstring
misi9170 Aug 24, 2025
b801d9a
Update tests
misi9170 Aug 25, 2025
36171b9
Remove turbine_groupings and add placeholder for sweep optimizer
misi9170 Aug 25, 2025
66dffed
Formatting
misi9170 Aug 25, 2025
8cac096
Add sweep opt method and test
misi9170 Aug 25, 2025
9968133
Single results dictionary returned from optimizers
misi9170 Aug 25, 2025
d46a795
wd_std sweep and test
misi9170 Aug 25, 2025
9d596a9
Future annotations to allow type hinting in python 3.9
misi9170 Aug 25, 2025
c9c2341
Remove large example
paulf81 Sep 15, 2025
7897d79
condense wind-up example
paulf81 Sep 15, 2025
70b41a2
further organize modelfit examples
paulf81 Sep 15, 2025
39be865
clean up smarteole example
paulf81 Sep 15, 2025
bad561c
Update example 2
paulf81 Sep 15, 2025
78b1add
rename model fit folder
paulf81 Sep 15, 2025
ba576b1
add tests of optuna
paulf81 Sep 15, 2025
16c719a
linting
paulf81 Sep 15, 2025
a2ed1e9
update model fit example
paulf81 Sep 15, 2025
6e1d96c
clean up tuning utilities test
paulf81 Sep 15, 2025
27d7b61
update examples
paulf81 Sep 15, 2025
82421a3
add model fit to docs and consolidate docs
paulf81 Sep 15, 2025
14662cb
improve messages and boolean attributes'
misi9170 Sep 24, 2025
62bddc4
Further information on ModelFit inputs, outputs etc
misi9170 Sep 24, 2025
437e34a
ignore all pickles
paulf81 Sep 25, 2025
f0232b7
remove cursor rules from git exclude
paulf81 Sep 25, 2025
17500d4
Just FLASC at head
paulf81 Sep 25, 2025
505258b
update model fit doc
paulf81 Sep 25, 2025
c7f7703
update README
paulf81 Sep 25, 2025
33912d8
remove print out
paulf81 Sep 25, 2025
cd43ab1
remove print out
paulf81 Sep 25, 2025
6416d71
add print
paulf81 Sep 25, 2025
5f7d482
remove turboparkgauss file (unused)
paulf81 Sep 25, 2025
331821a
remove uv.lock
paulf81 Sep 25, 2025
f46606f
Remove ResultsAnalysis
paulf81 Sep 25, 2025
c8efc19
remove print
paulf81 Sep 25, 2025
3dd21d5
change form_flasc_dataframe to private member
paulf81 Sep 25, 2025
c042713
remove repeat label
paulf81 Sep 25, 2025
281224e
Small udpate to deprecation language
misi9170 Sep 25, 2025
1a9fada
Remove un-needed par blocking
paulf81 Sep 25, 2025
37f6273
Add parallel example
paulf81 Sep 25, 2025
47b34db
Merge branch 'feature/modelfit_2' of github.com:paulf81/flasc into pr…
paulf81 Sep 25, 2025
445e622
Chain verbose through
paulf81 Sep 25, 2025
f73137a
Merge branch 'develop' into pr/paulf81/238
paulf81 Sep 25, 2025
9a45153
chain verbose through
paulf81 Sep 25, 2025
4e215b0
Revert unneeded changes in smarteole examples
misi9170 Sep 25, 2025
00d68c2
Reinstate model_tuning_test
misi9170 Sep 25, 2025
dd0db6b
Delete old code
paulf81 Sep 25, 2025
9aae028
Update how TI is handled
paulf81 Sep 25, 2025
3323847
Add note on emgauss defaults
misi9170 Sep 25, 2025
485654a
remove great tables
paulf81 Sep 25, 2025
9187bc7
add cost library tests and fix some bugs in cost function classes
misi9170 Sep 25, 2025
ec9836c
Add option to use non-default wd_sample_points
paulf81 Sep 25, 2025
e3e6fe2
Merge branch 'feature/modelfit_2' of github.com:paulf81/flasc into pr…
paulf81 Sep 25, 2025
62068a2
linting
paulf81 Sep 25, 2025
07ae8ad
linting
paulf81 Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ SMARTEOLE_WakeSteering_ReadMe.xlsx
SMARTEOLE_WakeSteering_Map.pdf
SMARTEOLE-WFC-open-dataset.zip
examples_artificial_data/03_energy_ratio/heterogeneity_layouts.pdf
docs/examples
*.pkl
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
10 changes: 2 additions & 8 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,17 @@ root: index
parts:
- caption: Getting Started
chapters:
- file: overview
- file: introduction
- file: installation
- file: getting_started

- caption: User Reference
chapters:
# - file: data_processing
- file: flasc_data_format
- file: energy_ratio
- file: energy_change
- file: model_fit
- file: licensing

# - caption: Developer Reference
# chapters:
# - file: contributing
# - file: development
# - file: testing
- caption: Examples Data Processing
chapters:
- file: examples/01_raw_data_processing/03_northing_calibration_hoger
Expand Down
30 changes: 0 additions & 30 deletions docs/getting_started.md

This file was deleted.

46 changes: 36 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,48 @@

# FLASC documentation

# FLASC

Welcome to the documentation of the NREL FLASC repository!

```{note}
FLASC v2.3 now requires `numpy` version 2, following the update in FLORIS v4.3. See the [numpy documentation for details](https://numpy.org/doc/stable/numpy_2_0_migration_guide.html).
```

FLASC provides a rich suite of analysis tools for SCADA data filtering &
analysis, wind farm model validation, field experiment design, and field
experiment monitoring. The repository is centrally built around NRELs
in-house [FLORIS](https://github.com/NREL/floris/discussions/)
wake modeling utility.
FLASC provides a comprehensive toolkit for wind farm analysis, combining SCADA data processing with advanced wake modeling capabilities. The repository is intended as a community-driven toolbox, available on its [GitHub Repository](https://github.com/NREL/flasc).

## What is FLASC?

FLASC offers analysis tools for SCADA data filtering & analysis, wind farm model validation, field experiment design, and field experiment monitoring. Built around NREL's [FLORIS](https://github.com/NREL/floris/discussions/) wake modeling utility, FLASC enables researchers and practitioners to:

- **Process and filter SCADA data** with robust outlier detection and quality control
- **Analyze energy production patterns** using energy ratio methodology for wake quantification
- **Calibrate wake models** automatically to match observed turbine performance
- **Evaluate field experiments** with comprehensive uplift analysis tools

## Documentation Structure

This documentation is organized to guide you from basic concepts to advanced applications:

### Getting Started
- **[Introduction](introduction)**: Overview of FLASC capabilities and package structure
- **[Installation](installation)**: Setup instructions and requirements

### Core Concepts
- **[FLASC Data Format](flasc_data_format)**: Understanding FLASC's data structures and conventions
- **[Energy Ratio Analysis](energy_ratio)**: Quantifying wake effects and turbine performance
- **[Energy Change Analysis](energy_change)**: Methods for calculating production changes
- **[Model Fitting](model_fit)**: Automated FLORIS model calibration to SCADA data

### Practical Applications
The documentation includes extensive examples demonstrating real-world applications using both synthetic data (`examples_artificial_data/`) and field experiment data (`examples_smarteole/`). These examples follow a typical FLASC workflow: data processing → analysis → model calibration.

## Key Features

FLASC's modular design supports the complete wind farm analysis workflow:

FLASC also largely relies on the energy ratio to, among other things, quantify wake
losses in synthetic and historical data, to perform turbine northing
calibrations, and for model parameter estimation.
- **Data Processing**: Import, filter, and quality-control SCADA data with specialized tools for wind measurements
- **Wake Analysis**: Quantify wake effects using energy ratios and validate against physics-based models
- **Model Calibration**: Automatically tune FLORIS parameters to match observed performance
- **Experiment Analysis**: Evaluate control strategies and technology impacts with statistical rigor

The FLASC repository is intended as a community driven toolbox, available on
its [GitHub Repository](https://github.com/NREL/flasc).
Expand Down
41 changes: 0 additions & 41 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
<!-- # Installation

FLASC is currently not available as a package on any repository manager.
Instead, it must be installed by the user by cloning the GitHub repository.

To download the source code, use `git clone`. Then, add it to
your Python path with the "local editable install" through `pip`.

```bash
# Download the source code.
git clone https://github.com/NREL/flasc.git

# Install into your Python environment
pip install -e flasc

```

If installing FLASC with the intention to develop, some additional configuration is helpful:


Install FLASC in editable mode with the appropriate developer tools

- ``".[develop]"`` is for the linting and code checking tools
- ``".[docs]"`` is for the documentation building tools. Ideally, developers should also be
contributing to the documentation, and therefore checking that
the documentation builds locally.

```bash
pip install -e ".[develop, docs]"
```
Turn on the linting and code checking tools

```bash
pre-commit install
```

If everything is configured correctly, any changes made to the source
code will be available directly through your local Python. Remember
to re-import the FLASC module when changes are made if you are working
in an interactive environment like Jupyter. -->

# Installation

FLASC is available as a package on PyPI. We strongly recommend installing FLASC
Expand Down
77 changes: 77 additions & 0 deletions docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Introduction to FLASC

FLASC provides a rich suite of analysis tools for SCADA data filtering & analysis, wind farm model validation, field experiment design, and field experiment monitoring. The repository is centrally built around NREL's in-house [FLORIS](https://github.com/nrel/floris) wake modeling utility. FLASC also largely relies on the "energy ratio" to quantify wake losses in synthetic and historical data, perform turbine northing calibrations, and for model parameter estimation.

## Getting Started

The easiest way to get started is to install FLASC and then follow the examples. The recommended approach is:

### 1. Install FLASC
Install the repository following the instructions in [installation](installation).

### 2. Explore Examples
You can generate a demo dataset by following the examples in `examples_smarteole/`. The notebook `02_download_and_format_dataset.ipynb` downloads data from a wake steering experiment conducted in 2019. We encourage users to step through the notebooks in `examples_smarteole/` in order to develop an understanding of FLASC's capabilities using a dataset from a real field experiment.

Additional useful examples can be found in `examples_artificial_data/`, where we intentionally introduce "challenges" for the FLASC tools to solve using artificially-generated data. This provides a good way for users to get to know the FLASC tools in more depth. Again, we recommend stepping through the examples in the subdirectories in their numerical order.

### 3. Workflow Overview
Roughly speaking, the examples in both `examples_smarteole/` and `examples_artificial_data` demonstrate the FLASC modules in the order:
- `flasc.data_processing` - Import and filter SCADA data
- `flasc.analysis` - Energy ratio analysis and uplift calculations
- `flasc.model_fitting` - Calibrate FLORIS models to SCADA data

and use `flasc.utilities` throughout for supporting functions.

## FLASC Package Structure

FLASC consists of multiple modules, each serving specific analysis needs:

### flasc.data_processing
This module contains functions that support importing and processing raw SCADA data files. Data is saved in feather format for optimal balance of storage size and load and write speed.

Functions include filtering data by wind direction, wind speed and/or TI, deriving the ambient conditions from the upstream turbines, all the while dealing with angle wrapping for angular variables. Outliers can be detected and removed at the turbine level. Filtering methods include sensor-stuck type of fault detection and analysis of the turbine wind speed-power curve.

Also included are functions to downsample, upsample and calculate moving averages of a data frame with SCADA and/or FLORIS data. These functions allow the user to specify which columns contain angular variables, and consequently 360 deg wrapping is taken care of. It also allows the user to calculate the min, max, std and median for downsampled data frames. It leverages efficient functions inherent in pandas and polars to maximize performance.

Finally, functions are provided to detect northing bias (caused by miscalibrated yaw encoders) in turbine data.

### flasc.analysis
This module contains classes to calculate and visualize the energy ratio as defined by Fleming et al. (2019). The energy ratio is a very useful quantity in SCADA data analysis and related model validation. It represents the amount of energy produced by a turbine relative to what that turbine would have produced if no wakes were present. See [energy ratio](energy_ratio) for more details. Also included are methods for calculating the total power uplift in a comparative field experiment.

### flasc.model_fitting
This module provides automated calibration of FLORIS wake models to SCADA data through the ModelFit framework. It includes modular cost functions, optimization algorithms, and tools for parameter sensitivity analysis. See [model fitting](model_fit) for comprehensive documentation.

### flasc.utilities
This module contains utilities that support the other modules within FLASC. These utilities help to interface with FLORIS and calculate a large set of floris simulations for different atmospheric conditions, yaw misalignments and/or model parameters. It also includes two functions to precalculate and respectively interpolate from a large set of model solutions to speed up further postprocessing.

Also included are functions to estimate the timeshift between two sources of data, for example, to synchronize measurements from a met mast with measurements from SCADA data. The module also includes a function to estimate the offset between two timeseries of wind direction measurements. This is useful to determine the northing bias of a turbine if you know the correct calibration of at least one other wind turbine. Finally, this module also contains a function to estimate the atmospheric turbulence intensity based on the power measurements of the turbines inside a wind farm.

Additionally, visualization tools can be found in `flasc.visualization` and `flasc.yaw_optimizer_visualization`.

## Literature

See {cite:p}`Doekemeijer2022a` and {cite:p}`Bay2022a` for practical examples of how the flasc repository is used for processing and analyses of historical SCADA data of three offshore wind farms.

```{bibliography}
```

## Citation

If FLASC played a role in your research, please cite it. This software can be cited as:

FLASC. Version 2.0.1 (2024). Available at https://github.com/NREL/flasc.

For LaTeX users:

@misc{flasc2024,
author = {NREL},
title = {FLASC. Version 2.0.1},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/NREL/flasc},
}

## Questions

For technical questions regarding FLASC usage, please post your questions to [GitHub Discussions](https://github.com/NREL/flasc/discussions) on the FLASC repository. Alternatively, email the NREL FLASC team at `[email protected] <mailto:[email protected]>`_ or `[email protected] <mailto:[email protected]>`_.
Loading