foxes 0.7.3__py3-none-any.whl → 0.7.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of foxes might be problematic. Click here for more details.
- foxes/VERSION +1 -1
- foxes/constants.py +1 -1
- foxes/core/wind_farm.py +1 -1
- foxes/input/windio/__init__.py +1 -0
- foxes/input/windio/get_states.py +82 -13
- foxes/input/windio/read_attributes.py +99 -82
- foxes/input/windio/read_farm.py +12 -12
- foxes/input/windio/read_fields.py +37 -27
- foxes/input/windio/read_outputs.py +125 -0
- foxes/input/windio/runner.py +72 -8
- foxes/input/windio/windio.py +24 -16
- foxes/models/wake_models/wind/bastankhah14.py +1 -1
- foxes/output/__init__.py +1 -0
- foxes/output/slice_data.py +41 -11
- foxes/output/state_turbine_table.py +78 -0
- {foxes-0.7.3.dist-info → foxes-0.7.4.dist-info}/METADATA +1 -1
- {foxes-0.7.3.dist-info → foxes-0.7.4.dist-info}/RECORD +21 -19
- {foxes-0.7.3.dist-info → foxes-0.7.4.dist-info}/WHEEL +1 -1
- {foxes-0.7.3.dist-info → foxes-0.7.4.dist-info}/LICENSE +0 -0
- {foxes-0.7.3.dist-info → foxes-0.7.4.dist-info}/top_level.txt +0 -0
- {foxes-0.7.3.dist-info → foxes-0.7.4.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from xarray import Dataset
|
|
2
|
+
|
|
3
|
+
from foxes.utils import write_nc
|
|
4
|
+
import foxes.constants as FC
|
|
5
|
+
|
|
6
|
+
from .output import Output
|
|
7
|
+
|
|
8
|
+
class StateTurbineTable(Output):
|
|
9
|
+
"""
|
|
10
|
+
Creates tables of state-turbine type data
|
|
11
|
+
|
|
12
|
+
Attributes
|
|
13
|
+
----------
|
|
14
|
+
farm_results: xarray.Dataset
|
|
15
|
+
The farm results
|
|
16
|
+
|
|
17
|
+
:group: output
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
def __init__(self, farm_results):
|
|
21
|
+
"""
|
|
22
|
+
Constructor.
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
farm_results: xarray.Dataset
|
|
27
|
+
The farm results
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
self.farm_results = farm_results
|
|
31
|
+
|
|
32
|
+
def get_dataset(
|
|
33
|
+
self,
|
|
34
|
+
variables,
|
|
35
|
+
name_map={},
|
|
36
|
+
to_file=None,
|
|
37
|
+
**kwargs,
|
|
38
|
+
):
|
|
39
|
+
"""
|
|
40
|
+
Creates a dataset object
|
|
41
|
+
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
variables: list of str
|
|
45
|
+
The output variables
|
|
46
|
+
name_map: dict
|
|
47
|
+
Map from foxes to output names
|
|
48
|
+
to_file: str, optional
|
|
49
|
+
The output file path, if writing is desired
|
|
50
|
+
kwargs: dict, optional
|
|
51
|
+
Additional parameters for write_nc
|
|
52
|
+
|
|
53
|
+
Returns
|
|
54
|
+
-------
|
|
55
|
+
table: xarray.Dataset
|
|
56
|
+
The state-turbine data table
|
|
57
|
+
|
|
58
|
+
"""
|
|
59
|
+
state = name_map.get(FC.STATE, FC.STATE)
|
|
60
|
+
turbine = name_map.get(FC.TURBINE, FC.TURBINE)
|
|
61
|
+
|
|
62
|
+
ds = Dataset(
|
|
63
|
+
coords={
|
|
64
|
+
state: self.farm_results[FC.STATE].to_numpy(),
|
|
65
|
+
turbine: self.farm_results[FC.TURBINE].to_numpy(),
|
|
66
|
+
},
|
|
67
|
+
data_vars={
|
|
68
|
+
name_map.get(v, v): (
|
|
69
|
+
(state, turbine), self.farm_results[v].to_numpy())
|
|
70
|
+
for v in variables
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
if to_file is not None:
|
|
75
|
+
write_nc(ds=ds, fpath=to_file, **kwargs)
|
|
76
|
+
|
|
77
|
+
return ds
|
|
78
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
foxes/VERSION,sha256=
|
|
1
|
+
foxes/VERSION,sha256=eGrr8_ZzyHxfZD5llT_9mzNihLQbKNVMeu7oBvzdjqQ,6
|
|
2
2
|
foxes/__init__.py,sha256=4ptDOBaQC8fAd_ZH5XH7d5pIgx3JXEY9xLcK3Nrs2Ow,718
|
|
3
|
-
foxes/constants.py,sha256=
|
|
3
|
+
foxes/constants.py,sha256=AQepsPOCRnHycNKvFyltcPFa4yUqYtTBOzgp56KKewA,2713
|
|
4
4
|
foxes/variables.py,sha256=I-S25WejH33ffOcVnmN2TDL1pIxWqg0aM1lhIBwZ9NQ,4454
|
|
5
5
|
foxes/algorithms/__init__.py,sha256=uaXU8OYMT3eclcE6a2b8NkozHVXoM1BF5RJA2XR4DUw,260
|
|
6
6
|
foxes/algorithms/downwind/__init__.py,sha256=lyygq5GMc6NAPmH0b0mhGeccWyuC8JTOEMZl-UlmE5M,53
|
|
@@ -44,7 +44,7 @@ foxes/core/vertical_profile.py,sha256=pgjari78N2CHZOWnidQ_7KGsSs4lTFP9isn-w6e1Yr
|
|
|
44
44
|
foxes/core/wake_frame.py,sha256=JbDWjHtZ6nSt-pSSlIsrKea4shwx_7YViZCCl9kNI_0,10239
|
|
45
45
|
foxes/core/wake_model.py,sha256=DjcNbEWPzgxBoW4IN5i9CGfPyuaCaJKYPoiK7ctsfC8,8054
|
|
46
46
|
foxes/core/wake_superposition.py,sha256=_XRgHeIVf_g8MkudwCLAX0DcTBp4Wdy9bDJLRPqkQrM,2811
|
|
47
|
-
foxes/core/wind_farm.py,sha256=
|
|
47
|
+
foxes/core/wind_farm.py,sha256=iYetYGFPaPz9Rh-2bLoeknOCiromXqlicZ4snRtSEIc,1755
|
|
48
48
|
foxes/data/__init__.py,sha256=efVzdUkpjcgmn8nF8eLAr5HCm1Ym7YF3JomY_bXNVts,161
|
|
49
49
|
foxes/data/parse.py,sha256=x71oWLyvVsMJ7XVL9VRQXZbflnTXqBaxyBdoMQdZExs,2947
|
|
50
50
|
foxes/data/static_data.py,sha256=k5ey-hJWMJTjRZnW5gaEj9dayxAClOBdbM14-IpON60,858
|
|
@@ -87,13 +87,14 @@ foxes/input/states/states_table.py,sha256=9dq9sxR5PVjS99WRGJClB_1W8gPZ9UNi-viHKS
|
|
|
87
87
|
foxes/input/states/create/__init__.py,sha256=Ocqzmr9SOefeAvGX5DgawsPXfNdGzWOZ2ssvtqEmtAo,134
|
|
88
88
|
foxes/input/states/create/random_abl_states.py,sha256=45h0a84FmeLZwxbtwtxs5kmoz8_O1_KjsyV-xTc_RoE,3333
|
|
89
89
|
foxes/input/states/create/random_timeseries.py,sha256=gJpaQ4nEXxOjI4hp3xjNcVbCsmZUm-brXUxoqDb63WE,1266
|
|
90
|
-
foxes/input/windio/__init__.py,sha256
|
|
91
|
-
foxes/input/windio/get_states.py,sha256=
|
|
92
|
-
foxes/input/windio/read_attributes.py,sha256=
|
|
93
|
-
foxes/input/windio/read_farm.py,sha256=
|
|
94
|
-
foxes/input/windio/read_fields.py,sha256=
|
|
95
|
-
foxes/input/windio/
|
|
96
|
-
foxes/input/windio/
|
|
90
|
+
foxes/input/windio/__init__.py,sha256=EZ0X07vFPp5t9oQyEOCUECbzCyJUjAsC4gtYIYjhflg,343
|
|
91
|
+
foxes/input/windio/get_states.py,sha256=h88bAbZcLz4B5hjSIXSH5-vaR_CxXgYgSUpArjwIGNU,5956
|
|
92
|
+
foxes/input/windio/read_attributes.py,sha256=nqcPNqi5tsakV43D6Y_FwQguRwrfvxz5_zPiT5L-fa4,12106
|
|
93
|
+
foxes/input/windio/read_farm.py,sha256=5gpTwwRrwkMq2ZmfrqWqCePCKSPVDKhw87Nena3fXhU,5232
|
|
94
|
+
foxes/input/windio/read_fields.py,sha256=nZlw0jFxrxVvt6YIRVaVDp2G5JGcw4Ap9_iVodoW-sA,4584
|
|
95
|
+
foxes/input/windio/read_outputs.py,sha256=rk0OjfeSyzhyju11S3JabeRXEfc3HjDpQ_9FhOrhxNI,4653
|
|
96
|
+
foxes/input/windio/runner.py,sha256=c9T_zJCtfCBt2AZdqa9dOzBUwD7KFB0kC0pz0kco8S4,5157
|
|
97
|
+
foxes/input/windio/windio.py,sha256=R9udgkxQNPjDT4ZbkHM78y3Pw8M2yGnNxHYgPujXaD0,5115
|
|
97
98
|
foxes/models/__init__.py,sha256=8eOGCieghW7ILjpkxMHzp4GN2zFF3xlKPl7Df7sMxoU,434
|
|
98
99
|
foxes/models/model_book.py,sha256=YF6iKJAS7HUxn-QoAWFhwcvMM1o01xHVNrrBXLmQmDE,23509
|
|
99
100
|
foxes/models/axial_induction/__init__.py,sha256=CdYOzu45DWu7xrzpRpFIQ6CGZIMABjjy_lqAszjj9lg,78
|
|
@@ -171,7 +172,7 @@ foxes/models/wake_models/ti/__init__.py,sha256=EOlqFHL2mzcKGFRZqlVYTiqGJqPb6dx7I
|
|
|
171
172
|
foxes/models/wake_models/ti/crespo_hernandez.py,sha256=Vi05vWV7aY02ixcgtAR4YVy5Y43ZaEI60ww8W2zdqu8,8844
|
|
172
173
|
foxes/models/wake_models/ti/iec_ti.py,sha256=L9Yw34_oUGXdvGSVhjJMjmSNh2S1sJsUUKsFxGuGA8Q,6422
|
|
173
174
|
foxes/models/wake_models/wind/__init__.py,sha256=X_QdQ_f3fKCIrZZ9K_CzzsHSl13AyvPRcWdEZ1y9Bk4,223
|
|
174
|
-
foxes/models/wake_models/wind/bastankhah14.py,sha256=
|
|
175
|
+
foxes/models/wake_models/wind/bastankhah14.py,sha256=YTcpYzYpu7Q3t_8AZqCXbbyF02uXKlgH-2gBW18lquk,5174
|
|
175
176
|
foxes/models/wake_models/wind/bastankhah16.py,sha256=XTRLJguNBSjERVCCquFXaxEnTx52lFrB9uPBRd3PLrc,17527
|
|
176
177
|
foxes/models/wake_models/wind/jensen.py,sha256=6L1-thpjC79wy8fXGvTMuzFnoASIu5uPlREZyvcOsHk,4247
|
|
177
178
|
foxes/models/wake_models/wind/turbopark.py,sha256=hqyp3wVoFlBvzdw69d5uhwZM_bHcG5PQfIhptICwJkE,14524
|
|
@@ -211,7 +212,7 @@ foxes/opt/problems/layout/geom_layouts/geom_layout_gridded.py,sha256=7vXKVkPOHj2
|
|
|
211
212
|
foxes/opt/problems/layout/geom_layouts/geom_reggrid.py,sha256=muAquvY_VFNwh-dZ-pJ290X-91a87IW5sQQwUu86PZg,10104
|
|
212
213
|
foxes/opt/problems/layout/geom_layouts/geom_reggrids.py,sha256=uKkmqENXniZFA-XpCYCw6F6CN1TP13ZRSaoO3jt3hGY,14222
|
|
213
214
|
foxes/opt/problems/layout/geom_layouts/objectives.py,sha256=QtEjrnwiNasJlplJmVBJGR_Q3l3KhTGScwOA88o-t28,17834
|
|
214
|
-
foxes/output/__init__.py,sha256=
|
|
215
|
+
foxes/output/__init__.py,sha256=7JSbLw8oEI3f-aFDCQ11ygNLm9b--6va1vMBeCftlx8,675
|
|
215
216
|
foxes/output/animation.py,sha256=zljekg6k2DjqVaBw0OamB4i3eopi6g2j0a12B9hx7VQ,2637
|
|
216
217
|
foxes/output/calc_points.py,sha256=QRZuZ6joHbhkEYDBX87QgEWwMMYbohAK3ZFuVwErK3Q,4497
|
|
217
218
|
foxes/output/farm_layout.py,sha256=PGQUIhza5BrGDIPU69O7hm91tjKJLFQq7N8rmXeVXAY,10981
|
|
@@ -223,8 +224,9 @@ foxes/output/results_writer.py,sha256=H8UptENDq2THwbRRe41I_d9OAdc4osnWER4QSTvrAQ
|
|
|
223
224
|
foxes/output/rose_plot.py,sha256=t4sO9FCV6BJvTLv3vudsBajaSQblOaS6INS5GltCkT0,11090
|
|
224
225
|
foxes/output/rotor_point_plots.py,sha256=R44fcseBC5g8YsuR4irRrvYN8Nj94_lpJgpsBst2kjE,3165
|
|
225
226
|
foxes/output/round.py,sha256=s8YcXciCtaMY14SnG3ebYccyjQ2IEln256SwN9oJnPI,351
|
|
226
|
-
foxes/output/slice_data.py,sha256=
|
|
227
|
+
foxes/output/slice_data.py,sha256=9BIwsJZl69rSLuxI60Sv0fGcPFP71tpMemE8BNXdoIs,32224
|
|
227
228
|
foxes/output/state_turbine_map.py,sha256=mH5pJdw0LORftJ_gHxiuOM6aRosRJ3nWqeYab4QAdxg,2421
|
|
229
|
+
foxes/output/state_turbine_table.py,sha256=XcS8CYRLUAxyXPaBrhTv2HEj8ykMnrBzCxSYPWIhLQM,1836
|
|
228
230
|
foxes/output/turbine_type_curves.py,sha256=oZm9YGLLL-makFZDFucCkjXoqF2bkhFj9yJRqWM1Xk8,5526
|
|
229
231
|
foxes/output/flow_plots_2d/__init__.py,sha256=2d4RyQYPOYr-HiBCbp1swSPG4Nf3NGezTr5LmvtkGA4,121
|
|
230
232
|
foxes/output/flow_plots_2d/flow_plots.py,sha256=RYdYZui11IlJE5Mm_R3dtkkQDC0XbAz2JyOT1U25PAA,28209
|
|
@@ -264,9 +266,9 @@ foxes/utils/geom2d/half_plane.py,sha256=kzZD6pkZxZ03MK9WAboWzXb5Ws5dWLQY9GIahD4D
|
|
|
264
266
|
foxes/utils/geom2d/polygon.py,sha256=8ASfy7No_-Pt_xDSeNsDtLEkCjBWsNZK8nIxDQtqeOE,5534
|
|
265
267
|
foxes/utils/runners/__init__.py,sha256=-WL4ZmdgNYldkqhCV6dR-aXCumBrH-Ea-V1shsRhsbs,55
|
|
266
268
|
foxes/utils/runners/runners.py,sha256=Sc06qsCzPduMyxbywgf6G3uHRioDs1qWRSc6GZbLFAY,6932
|
|
267
|
-
foxes-0.7.
|
|
268
|
-
foxes-0.7.
|
|
269
|
-
foxes-0.7.
|
|
270
|
-
foxes-0.7.
|
|
271
|
-
foxes-0.7.
|
|
272
|
-
foxes-0.7.
|
|
269
|
+
foxes-0.7.4.dist-info/LICENSE,sha256=bBCH6mYTPzSepk2s2UUZ3II_ZYXrn1bnSqB85-aZHxU,1071
|
|
270
|
+
foxes-0.7.4.dist-info/METADATA,sha256=OUTUO-pDvjsWmLSt1vZONQXdmlQJjkdzJHklY_2WUzc,9566
|
|
271
|
+
foxes-0.7.4.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
|
|
272
|
+
foxes-0.7.4.dist-info/top_level.txt,sha256=B4spGR6JHsVHz7CEXsa68xsjYalAA70nBwHa1gfyRHc,6
|
|
273
|
+
foxes-0.7.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
274
|
+
foxes-0.7.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|