Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement HOGER homogenization #240

Merged
merged 31 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/deploy-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- name: Copy examples to docs
working-directory: ${{runner.workspace}}/flasc/
run: |
rsync -av --mkpath examples_artificial_data/01_raw_data_processing/ docs/examples/01_raw_data_processing
rsync -av --mkpath examples_artificial_data/03_energy_ratio/ docs/examples/03_energy_ratio
rsync -av --mkpath examples_artificial_data/floris_input_artificial/ docs/examples/floris_input_artificial
ls docs/examples
Expand Down
6 changes: 4 additions & 2 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ parts:
# - file: contributing
# - file: development
# - file: testing
- caption: Examples Data Processing
chapters:
- file: examples/01_raw_data_processing/03_northing_calibration_hoger

- caption: Examples
- caption: Examples Energy Ratio
chapters:
# - file: flascdataframe
- file: examples/03_energy_ratio/00_demo_energy_ratio_syntax
- file: examples/03_energy_ratio/01_demo_energy_ratio_options

Expand Down

Large diffs are not rendered by default.

86 changes: 44 additions & 42 deletions examples_smarteole/04_northing_calibration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/anaconda3/envs/flasc-reqs/lib/python3.10/site-packages/pandas/core/computation/expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.8.3' currently installed).\n",
" from pandas.core.computation.check import NUMEXPR_INSTALLED\n"
]
}
],
"outputs": [],
"source": [
"import warnings as wn\n",
"from pathlib import Path\n",
Expand All @@ -49,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -61,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -81,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -115,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -148,41 +139,41 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[32m2024-10-16 09:54:11\u001b[0m Matching curves for turbine 000...\n",
"\u001b[32m2024-10-16 09:54:15\u001b[0m T001 T002 T003 T004 T005\n",
"\u001b[32m2024-12-02 11:44:16\u001b[0m Matching curves for turbine 000...\n",
"\u001b[32m2024-12-02 11:44:18\u001b[0m T001 T002 T003 T004 T005\n",
"0 0.0 0.0 0.0 0.0 0.0\n",
"\u001b[32m2024-10-16 09:54:15\u001b[0m Matching curves for turbine 001...\n",
"\u001b[32m2024-10-16 09:54:18\u001b[0m T002 T000 T003 T004 T005\n",
"\u001b[32m2024-12-02 11:44:18\u001b[0m Matching curves for turbine 001...\n",
"\u001b[32m2024-12-02 11:44:18\u001b[0m T002 T000 T003 T004 T005\n",
"0 0.0 -0.0 0.0 0.0 0.0\n",
"\u001b[32m2024-10-16 09:54:18\u001b[0m Matching curves for turbine 002...\n",
"\u001b[32m2024-10-16 09:54:20\u001b[0m T001 T003 T000 T004 T005\n",
"\u001b[32m2024-12-02 11:44:18\u001b[0m Matching curves for turbine 002...\n",
"\u001b[32m2024-12-02 11:44:19\u001b[0m T001 T003 T000 T004 T005\n",
"0 -0.0 0.0 -0.0 0.0 -2.0\n",
"\u001b[32m2024-10-16 09:54:20\u001b[0m Matching curves for turbine 003...\n",
"\u001b[32m2024-10-16 09:54:22\u001b[0m T004 T002 T005 T001 T006\n",
"\u001b[32m2024-12-02 11:44:19\u001b[0m Matching curves for turbine 003...\n",
"\u001b[32m2024-12-02 11:44:20\u001b[0m T004 T002 T005 T001 T006\n",
"0 0.0 -0.0 0.0 -0.0 0.0\n",
"\u001b[32m2024-10-16 09:54:22\u001b[0m Matching curves for turbine 004...\n",
"\u001b[32m2024-10-16 09:54:24\u001b[0m T005 T003 T006 T002 T001\n",
"\u001b[32m2024-12-02 11:44:20\u001b[0m Matching curves for turbine 004...\n",
"\u001b[32m2024-12-02 11:44:20\u001b[0m T005 T003 T006 T002 T001\n",
"0 -2.0 -0.0 -2.0 -0.0 -0.0\n",
"\u001b[32m2024-10-16 09:54:24\u001b[0m Matching curves for turbine 005...\n",
"\u001b[32m2024-10-16 09:54:25\u001b[0m T004 T006 T003 T002 T001\n",
"\u001b[32m2024-12-02 11:44:20\u001b[0m Matching curves for turbine 005...\n",
"\u001b[32m2024-12-02 11:44:20\u001b[0m T004 T006 T003 T002 T001\n",
"0 2.0 0.0 -0.0 2.0 -0.0\n",
"\u001b[32m2024-10-16 09:54:25\u001b[0m Matching curves for turbine 006...\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m T005 T004 T003 T002 T001\n",
"\u001b[32m2024-12-02 11:44:20\u001b[0m Matching curves for turbine 006...\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m T005 T004 T003 T002 T001\n",
"0 -0.0 2.0 -0.0 2.0 0.0\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 000 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 001 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 002 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 003 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 004 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 005 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-10-16 09:54:26\u001b[0m Turbine 006 seems to have no jumps in its WD measurement calibration. [CLEAN]\n"
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 000 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 001 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 002 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 003 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 004 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 005 seems to have no jumps in its WD measurement calibration. [CLEAN]\n",
"\u001b[32m2024-12-02 11:44:21\u001b[0m Turbine 006 seems to have no jumps in its WD measurement calibration. [CLEAN]\n"
]
},
{
Expand Down Expand Up @@ -216,6 +207,19 @@
"Fortunately, the relative wind direction offsets between all turbines are zero. Therefore, we only need to identify a single offset for each turbine to complete the northing calibration."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the event of a detection of a jump in the relative wind direction, FLASC now includes a homeginization function that can be used to correct for this. See the example:\n",
"\n",
"```\n",
"examples_artificial_data/01_raw_data_processing/03_northing_calibration_hoger.ipynb\n",
"```\n",
"\n",
"for example usage. "
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down Expand Up @@ -2199,11 +2203,9 @@
}
],
"metadata": {
"interpreter": {
"hash": "96c53852a1e56d9fbc8381f88ff3256056a2f574c5e86cd3dfe6ce1bc9d68e6a"
},
"kernelspec": {
"display_name": "Python 3.10.4 64-bit ('flasc-reqs': conda)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
Expand All @@ -2216,7 +2218,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.13.0"
},
"toc": {
"base_numbering": 1,
Expand Down
Loading
Loading