Skip to content

Commit

Permalink
Convert loads module to xarray (#279)
Browse files Browse the repository at this point in the history
* loads/general

* loads/extreme conversion to xarray

* test and bugfix for loads/general/bin_statistics

* fix bug in bin_statistics where std=0

* correct bin_statistics test data

* update bin_statistics test

* fix dimension name in mler_wave_amp_normalize

* formatting fixes

* update return types, add optional dimension argument

* add Series and DataArray to type check for mler_coefficients

* update argument and docstring for time_dimension

* update dimension variables to time_dimension

* rename time_dimension to frequency_dimension where required
  • Loading branch information
akeeste authored Jan 2, 2024
1 parent 4eeb598 commit d2437e6
Show file tree
Hide file tree
Showing 4 changed files with 346 additions and 248 deletions.
324 changes: 162 additions & 162 deletions examples/data/loads/loads_data_dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -763,24 +763,24 @@
"yawoffset": 0.36065239549512096
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
},
{
"ActivePower": NaN,
Expand Down Expand Up @@ -823,24 +823,24 @@
"yawoffset": NaN
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
},
{
"ActivePower": NaN,
Expand All @@ -863,24 +863,24 @@
"yawoffset": NaN
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
}
],
"bin_means": [
Expand Down Expand Up @@ -1647,24 +1647,24 @@
"yawoffset": 0.32465542650598184
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
},
{
"ActivePower": NaN,
Expand Down Expand Up @@ -1707,24 +1707,24 @@
"yawoffset": NaN
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
},
{
"ActivePower": NaN,
Expand All @@ -1747,24 +1747,24 @@
"yawoffset": NaN
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
}
],
"bin_mins": [
Expand Down Expand Up @@ -2531,24 +2531,24 @@
"yawoffset": 11.605683455992253
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
},
{
"ActivePower": NaN,
Expand Down Expand Up @@ -2591,24 +2591,24 @@
"yawoffset": NaN
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
},
{
"ActivePower": NaN,
Expand All @@ -2631,24 +2631,24 @@
"yawoffset": NaN
},
{
"ActivePower": NaN,
"BL1_EdgeMom": NaN,
"BL1_FlapMom": NaN,
"BL3_EdgeMom": NaN,
"BL3_FlapMom": NaN,
"LSSDW_My": NaN,
"LSSDW_Mz": NaN,
"LSSDW_Tq": NaN,
"TB_ForeAft": NaN,
"TB_SideSide": NaN,
"TTTq": NaN,
"TT_ForeAft": NaN,
"TT_SideSide": NaN,
"WD_ModActive": NaN,
"WD_Nacelle": NaN,
"WD_NacelleMod": NaN,
"uWind_80m": NaN,
"yawoffset": NaN
"ActivePower": 0.0,
"BL1_EdgeMom": 0.0,
"BL1_FlapMom": 0.0,
"BL3_EdgeMom": 0.0,
"BL3_FlapMom": 0.0,
"LSSDW_My": 0.0,
"LSSDW_Mz": 0.0,
"LSSDW_Tq": 0.0,
"TB_ForeAft": 0.0,
"TB_SideSide": 0.0,
"TTTq": 0.0,
"TT_ForeAft": 0.0,
"TT_SideSide": 0.0,
"WD_ModActive": 0.0,
"WD_Nacelle": 0.0,
"WD_NacelleMod": 0.0,
"uWind_80m": 0.0,
"yawoffset": 0.0
}
],
"loads": [
Expand Down
Loading

0 comments on commit d2437e6

Please sign in to comment.