Skip to content

Commit 5338b44

Browse files
committed
fix merge conflict with develop
2 parents 3a4108a + 1d4074e commit 5338b44

10 files changed

+397
-497
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ junit-xml-report.xml
2727

2828
examples/operational_AEP_analysis/data/*.csv
2929
examples/turbine_analysis/data/*.csv
30-
examples/cleansed
30+
examples/data/cleansed
3131

3232
examples/data/kelmarsh/
3333
examples/data/penmanshiel/

examples/02c_augmented_plant_aep_analysis.ipynb

Lines changed: 84 additions & 102 deletions
Large diffs are not rendered by default.

examples/03_turbine_ideal_energy.ipynb

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,23 @@
3737
"cell_type": "code",
3838
"execution_count": 2,
3939
"metadata": {},
40-
"outputs": [],
40+
"outputs": [
41+
{
42+
"name": "stderr",
43+
"output_type": "stream",
44+
"text": [
45+
"WARNING:py.warnings:/Users/rhammond/GitHub_Public/OpenOA/openoa/utils/plot.py:1514: DeprecationWarning: invalid escape sequence '\\c'\n",
46+
" label=f\"Max. Power Vane Angle = {round(curve_fit_params_ws[:,i,1].mean(),1)}$^\\circ$\", # noqa: W605\n",
47+
"\n",
48+
"WARNING:py.warnings:/Users/rhammond/GitHub_Public/OpenOA/openoa/analysis/electrical_losses.py:374: DeprecationWarning: invalid escape sequence '\\m'\n",
49+
" label=f\"Electrical Losses\\n$\\mu$={mean:.2%}, $\\sigma$={std:.2%}\", # noqa: W605\n",
50+
"\n",
51+
"WARNING:py.warnings:/Users/rhammond/GitHub_Public/OpenOA/openoa/analysis/electrical_losses.py:374: DeprecationWarning: invalid escape sequence '\\s'\n",
52+
" label=f\"Electrical Losses\\n$\\mu$={mean:.2%}, $\\sigma$={std:.2%}\", # noqa: W605\n",
53+
"\n"
54+
]
55+
}
56+
],
4157
"source": [
4258
"# Import required packages\n",
4359
"import numpy as np\n",
@@ -231,7 +247,9 @@
231247
"\n",
232248
"Next we create a TIE object which will contain the analysis to be performed. The method has the ability to calculate uncertainty in the TIE metric through a Monte Carlo sampling of filtering thresholds, power data, and reanalysis product choices. For now, we turn this option off and run the method a single time.\n",
233249
"\n",
234-
"**NOTE**: The inputs `wind_bin_threshold`, `max_power_filter`, and `correction_threshold` all default to UQ inputs, and so inputs must be provided to these parameters when running a single case (`UQ=False`)."
250+
"```{note}\n",
251+
"The inputs `wind_bin_threshold`, `max_power_filter`, and `correction_threshold` all default to UQ inputs, and so inputs must be provided to these parameters when running a single case (`UQ=False`).\n",
252+
"```"
235253
]
236254
},
237255
{
@@ -276,7 +294,7 @@
276294
"name": "stderr",
277295
"output_type": "stream",
278296
"text": [
279-
"100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:03<00:00, 1.61s/it]\n"
297+
"100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:02<00:00, 1.22s/it]\n"
280298
]
281299
}
282300
],
@@ -450,11 +468,14 @@
450468
"\n",
451469
"Now we will create a TIE object for calculating TIE and quantifying the uncertainty in our estimate. The method estimates uncertainty in the TIE metric through a Monte Carlo sampling of filtering thresholds, power data, and reanalysis product choices.\n",
452470
"\n",
453-
"Note that we set the number of Monte Carlo simulations to only 100 in this example because of the relatively high computational effort required to perform a single iteration. In practice, a larger number of simulations is recommended (the default value is 2000).\n",
471+
"Note that we set the number of Monte Carlo simulations to only 75 in this example because of the relatively high computational effort required to perform a single iteration. In practice, a larger number of simulations is recommended (the default value is 2000).\n",
454472
"\n",
455473
"With uncertainty quantification enabled (UQ=True), we can specify the assumed uncertainty of the SCADA power data (0.5% by default) and ranges of two key filtering thresholds from which the Monte Carlo simulations will sample. Specifically, these thresholds are applied to the bin_filter() function in the toolkits.filtering class of OpenOA.\n",
456474
"\n",
457-
"Note that the following parameters are the default values."
475+
"```{note}\n",
476+
"1. The following parameters are the default values, except `num_sim`, which has been reduced to optimize runtime in the examples.\n",
477+
"2. `num_sim` is recommended to be significantly higher so that results will converge (the default value is 2000).\n",
478+
"```"
458479
]
459480
},
460481
{
@@ -466,7 +487,7 @@
466487
"ta=TurbineLongTermGrossEnergy(\n",
467488
" project,\n",
468489
" UQ=True, # enable uncertainty quantification\n",
469-
" num_sim=100, # number of Monte Carlo simulations to perform\n",
490+
" num_sim=75, # number of Monte Carlo simulations to perform\n",
470491
" wind_bin_threshold=(1, 3), # Data outside of a range of +-1 to +-3 standard deviations from the median for each power bin are discarded\n",
471492
" max_power_filter=(0.8, 0.9), # The bin filter will be applied up to fractions of turbine capacity from 80% to 90%\n",
472493
" uncertainty_scada=0.005, # Assumed uncertainty of SCADA power data (0.5%)\n",
@@ -499,7 +520,7 @@
499520
"name": "stderr",
500521
"output_type": "stream",
501522
"text": [
502-
"100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 100/100 [02:57<00:00, 1.78s/it]\n"
523+
"100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 75/75 [02:05<00:00, 1.68s/it]\n"
503524
]
504525
}
505526
],
@@ -524,7 +545,7 @@
524545
{
525546
"data": {
526547
"text/plain": [
527-
"13574203.044895409"
548+
"13544928.004463477"
528549
]
529550
},
530551
"execution_count": 13,
@@ -544,7 +565,7 @@
544565
{
545566
"data": {
546567
"text/plain": [
547-
"533395.2405247269"
568+
"147320.39759589723"
548569
]
549570
},
550571
"execution_count": 14,
@@ -565,8 +586,8 @@
565586
"name": "stdout",
566587
"output_type": "stream",
567588
"text": [
568-
"Mean long-term turbine ideal energy is 13.6 GWh/year\n",
569-
"Uncertainty in long-term turbine ideal energy is 0.5 GWh/year, or 3.9% percent\n"
589+
"Mean long-term turbine ideal energy is 13.5 GWh/year\n",
590+
"Uncertainty in long-term turbine ideal energy is 0.1 GWh/year, or 1.1% percent\n"
570591
]
571592
}
572593
],
@@ -582,7 +603,6 @@
582603
"cell_type": "markdown",
583604
"metadata": {},
584605
"source": [
585-
"\n",
586606
"As expected, the mean long-term TIE is close to the earlier estimate without uncertainty quantification. A relatively low uncertainty has been estimated for the TIE calculations. This is a result of the relatively close agreement between the two reanalysis products and the clean power curves plotted earlier."
587607
]
588608
},

0 commit comments

Comments
 (0)