foxes 1.1.1__tar.gz → 1.2.1__tar.gz

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.

Files changed (343) hide show
  1. {foxes-1.1.1 → foxes-1.2.1}/MANIFEST.in +0 -1
  2. {foxes-1.1.1/foxes.egg-info → foxes-1.2.1}/PKG-INFO +2 -2
  3. {foxes-1.1.1 → foxes-1.2.1}/README.md +1 -0
  4. {foxes-1.1.1 → foxes-1.2.1}/docs/source/conf.py +3 -1
  5. {foxes-1.1.1 → foxes-1.2.1}/examples/abl_states/run.py +5 -5
  6. {foxes-1.1.1 → foxes-1.2.1}/examples/dyn_wakes/run.py +2 -2
  7. {foxes-1.1.1 → foxes-1.2.1}/examples/induction/run.py +5 -5
  8. {foxes-1.1.1 → foxes-1.2.1}/examples/random_timeseries/run.py +13 -13
  9. {foxes-1.1.1 → foxes-1.2.1}/examples/scan_row/run.py +12 -7
  10. {foxes-1.1.1 → foxes-1.2.1}/examples/sector_management/run.py +11 -7
  11. {foxes-1.1.1 → foxes-1.2.1}/examples/single_state/run.py +5 -5
  12. {foxes-1.1.1 → foxes-1.2.1}/examples/tab_file/run.py +1 -1
  13. {foxes-1.1.1 → foxes-1.2.1}/examples/timelines/run.py +1 -1
  14. {foxes-1.1.1 → foxes-1.2.1}/examples/timeseries/run.py +5 -5
  15. {foxes-1.1.1 → foxes-1.2.1}/examples/timeseries_slurm/run.py +5 -5
  16. {foxes-1.1.1 → foxes-1.2.1}/examples/wind_rose/run.py +1 -1
  17. {foxes-1.1.1 → foxes-1.2.1}/examples/yawed_wake/run.py +5 -5
  18. foxes-1.2.1/foxes/__init__.py +37 -0
  19. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/downwind.py +21 -6
  20. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/init_farm_data.py +5 -2
  21. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/point_wakes_calc.py +0 -1
  22. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/iterative/iterative.py +1 -1
  23. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/sequential/sequential.py +5 -4
  24. foxes-1.2.1/foxes/config/__init__.py +1 -0
  25. foxes-1.2.1/foxes/config/config.py +134 -0
  26. {foxes-1.1.1 → foxes-1.2.1}/foxes/constants.py +15 -6
  27. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/algorithm.py +46 -30
  28. foxes-1.2.1/foxes/core/axial_induction_model.py +48 -0
  29. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/data.py +2 -1
  30. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/engine.py +43 -49
  31. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/farm_controller.py +22 -3
  32. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/farm_data_model.py +6 -2
  33. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/ground_model.py +19 -0
  34. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/model.py +2 -1
  35. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/partial_wakes_model.py +9 -21
  36. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/point_data_model.py +22 -2
  37. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/rotor_model.py +9 -21
  38. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/states.py +2 -17
  39. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/turbine_model.py +2 -18
  40. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/turbine_type.py +2 -18
  41. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/vertical_profile.py +8 -20
  42. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/wake_frame.py +9 -25
  43. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/wake_model.py +24 -20
  44. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/wake_superposition.py +19 -0
  45. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/__init__.py +1 -1
  46. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/static_data.py +0 -7
  47. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/dask.py +4 -3
  48. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/__init__.py +1 -1
  49. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/from_csv.py +3 -1
  50. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/from_file.py +10 -10
  51. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/from_json.py +4 -3
  52. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/grid.py +3 -3
  53. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/__init__.py +1 -1
  54. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/create/random_abl_states.py +5 -3
  55. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/field_data_nc.py +36 -15
  56. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/multi_height.py +26 -15
  57. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/one_point_flow.py +6 -5
  58. foxes-1.1.1/foxes/input/states/scan_ws.py → foxes-1.2.1/foxes/input/states/scan.py +42 -52
  59. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/single.py +15 -6
  60. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/slice_data_nc.py +18 -12
  61. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/states_table.py +17 -10
  62. foxes-1.2.1/foxes/input/yaml/__init__.py +3 -0
  63. foxes-1.2.1/foxes/input/yaml/dict.py +381 -0
  64. foxes-1.2.1/foxes/input/yaml/windio/__init__.py +4 -0
  65. {foxes-1.1.1/foxes/input → foxes-1.2.1/foxes/input/yaml}/windio/get_states.py +7 -7
  66. {foxes-1.1.1/foxes/input → foxes-1.2.1/foxes/input/yaml}/windio/read_attributes.py +61 -40
  67. {foxes-1.1.1/foxes/input → foxes-1.2.1/foxes/input/yaml}/windio/read_farm.py +34 -43
  68. {foxes-1.1.1/foxes/input → foxes-1.2.1/foxes/input/yaml}/windio/read_fields.py +11 -10
  69. foxes-1.2.1/foxes/input/yaml/windio/read_outputs.py +147 -0
  70. foxes-1.2.1/foxes/input/yaml/windio/windio.py +269 -0
  71. foxes-1.2.1/foxes/input/yaml/yaml.py +103 -0
  72. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/axiwake.py +7 -6
  73. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/centre.py +3 -2
  74. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/segregated.py +5 -2
  75. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/point_models/set_uniform_data.py +5 -3
  76. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/rotor_models/centre.py +2 -2
  77. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/rotor_models/grid.py +5 -5
  78. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/rotor_models/levels.py +6 -6
  79. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/kTI_model.py +3 -1
  80. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/lookup_table.py +7 -4
  81. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/power_mask.py +14 -8
  82. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/sector_management.py +4 -2
  83. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/set_farm_vars.py +53 -23
  84. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/table_factors.py +8 -7
  85. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/yaw2yawm.py +0 -1
  86. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/yawm2yaw.py +0 -1
  87. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/CpCt_file.py +6 -3
  88. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/CpCt_from_two.py +6 -3
  89. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/PCt_file.py +7 -6
  90. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/PCt_from_two.py +11 -2
  91. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/TBL_file.py +3 -4
  92. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/wsrho2PCt_from_two.py +19 -11
  93. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/wsti2PCt_from_two.py +19 -11
  94. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/dynamic_wakes.py +17 -9
  95. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/farm_order.py +4 -3
  96. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/rotor_wd.py +3 -1
  97. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/seq_dynamic_wakes.py +14 -7
  98. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/streamlines.py +9 -6
  99. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/timelines.py +21 -14
  100. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/yawed_wakes.py +3 -1
  101. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/induction/vortex_sheet.py +0 -1
  102. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/ti/crespo_hernandez.py +2 -1
  103. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/wind/bastankhah14.py +3 -2
  104. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/wind/bastankhah16.py +2 -1
  105. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/wind/turbopark.py +9 -7
  106. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ws_product.py +0 -1
  107. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/__init__.py +2 -1
  108. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/calc_points.py +7 -4
  109. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/farm_layout.py +30 -18
  110. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/farm_results_eval.py +61 -38
  111. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/grids.py +8 -7
  112. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/output.py +9 -20
  113. foxes-1.2.1/foxes/output/plt.py +19 -0
  114. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/results_writer.py +10 -11
  115. foxes-1.2.1/foxes/output/rose_plot.py +617 -0
  116. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/rotor_point_plots.py +7 -3
  117. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/state_turbine_map.py +5 -1
  118. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/state_turbine_table.py +7 -3
  119. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/turbine_type_curves.py +7 -2
  120. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/__init__.py +1 -2
  121. foxes-1.2.1/foxes/utils/dict.py +164 -0
  122. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geopandas_utils.py +3 -2
  123. foxes-1.2.1/foxes/utils/subclasses.py +90 -0
  124. {foxes-1.1.1 → foxes-1.2.1/foxes.egg-info}/PKG-INFO +2 -2
  125. {foxes-1.1.1 → foxes-1.2.1}/foxes.egg-info/SOURCES.txt +15 -15
  126. foxes-1.2.1/foxes.egg-info/entry_points.txt +3 -0
  127. {foxes-1.1.1 → foxes-1.2.1}/foxes.egg-info/requires.txt +0 -1
  128. {foxes-1.1.1 → foxes-1.2.1}/pyproject.toml +5 -2
  129. foxes-1.2.1/tests/0_consistency/iterative/test_iterative.py +90 -0
  130. foxes-1.2.1/tests/0_consistency/partial_wakes/test_partial_wakes.py +87 -0
  131. foxes-1.2.1/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +106 -0
  132. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/abl_states/test_abl_states.py +41 -41
  133. foxes-1.2.1/tests/1_verification/flappy_0_6/partial_top_hat/test_partial_top_hat.py +82 -0
  134. foxes-1.2.1/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +98 -0
  135. foxes-1.2.1/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +100 -0
  136. foxes-1.2.1/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +126 -0
  137. foxes-1.2.1/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +126 -0
  138. foxes-1.2.1/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +100 -0
  139. foxes-1.2.1/tests/1_verification/flappy_0_6_2/grid_rotors/test_grid_rotors.py +128 -0
  140. foxes-1.2.1/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +119 -0
  141. foxes-1.2.1/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +103 -0
  142. foxes-1.1.1/examples/windio/run.py +0 -29
  143. foxes-1.1.1/foxes/__init__.py +0 -26
  144. foxes-1.1.1/foxes/core/axial_induction_model.py +0 -30
  145. foxes-1.1.1/foxes/data/states/windio_timeseries_5000.nc +0 -0
  146. foxes-1.1.1/foxes/data/windio/DTU_10MW_turbine.yaml +0 -10
  147. foxes-1.1.1/foxes/data/windio/__init__.py +0 -0
  148. foxes-1.1.1/foxes/data/windio/windio_5turbines_timeseries.yaml +0 -79
  149. foxes-1.1.1/foxes/input/windio/__init__.py +0 -11
  150. foxes-1.1.1/foxes/input/windio/read_outputs.py +0 -172
  151. foxes-1.1.1/foxes/input/windio/runner.py +0 -183
  152. foxes-1.1.1/foxes/input/windio/windio.py +0 -193
  153. foxes-1.1.1/foxes/output/rose_plot.py +0 -393
  154. foxes-1.1.1/foxes/utils/dict.py +0 -60
  155. foxes-1.1.1/foxes/utils/subclasses.py +0 -21
  156. foxes-1.1.1/foxes/utils/windrose_plot.py +0 -152
  157. foxes-1.1.1/tests/0_consistency/iterative/test_iterative.py +0 -92
  158. foxes-1.1.1/tests/0_consistency/partial_wakes/test_partial_wakes.py +0 -90
  159. foxes-1.1.1/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +0 -103
  160. foxes-1.1.1/tests/1_verification/flappy_0_6/partial_top_hat/test_partial_top_hat.py +0 -82
  161. foxes-1.1.1/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +0 -93
  162. foxes-1.1.1/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +0 -96
  163. foxes-1.1.1/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +0 -122
  164. foxes-1.1.1/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +0 -122
  165. foxes-1.1.1/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +0 -93
  166. foxes-1.1.1/tests/1_verification/flappy_0_6_2/grid_rotors/test_grid_rotors.py +0 -130
  167. foxes-1.1.1/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +0 -116
  168. foxes-1.1.1/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +0 -99
  169. {foxes-1.1.1 → foxes-1.2.1}/LICENSE +0 -0
  170. {foxes-1.1.1 → foxes-1.2.1}/Logo_FOXES.svg +0 -0
  171. {foxes-1.1.1 → foxes-1.2.1}/examples/compare_rotors_pwakes/run.py +0 -0
  172. {foxes-1.1.1 → foxes-1.2.1}/examples/compare_wakes/run.py +0 -0
  173. {foxes-1.1.1 → foxes-1.2.1}/examples/field_data_nc/run.py +0 -0
  174. {foxes-1.1.1 → foxes-1.2.1}/examples/multi_height/run.py +0 -0
  175. {foxes-1.1.1 → foxes-1.2.1}/examples/power_mask/run.py +0 -0
  176. {foxes-1.1.1 → foxes-1.2.1}/examples/sequential/run.py +0 -0
  177. {foxes-1.1.1 → foxes-1.2.1}/examples/states_lookup_table/run.py +0 -0
  178. {foxes-1.1.1 → foxes-1.2.1}/examples/streamline_wakes/run.py +0 -0
  179. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/__init__.py +0 -0
  180. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/__init__.py +0 -0
  181. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/__init__.py +0 -0
  182. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/farm_wakes_calc.py +0 -0
  183. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/reorder_farm_output.py +0 -0
  184. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/set_amb_farm_results.py +0 -0
  185. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/downwind/models/set_amb_point_results.py +0 -0
  186. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/iterative/__init__.py +0 -0
  187. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/iterative/models/__init__.py +0 -0
  188. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/iterative/models/convergence.py +0 -0
  189. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/iterative/models/farm_wakes_calc.py +0 -0
  190. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/iterative/models/urelax.py +0 -0
  191. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/sequential/__init__.py +0 -0
  192. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/sequential/models/__init__.py +0 -0
  193. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/sequential/models/plugin.py +0 -0
  194. {foxes-1.1.1 → foxes-1.2.1}/foxes/algorithms/sequential/models/seq_state.py +0 -0
  195. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/__init__.py +0 -0
  196. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/data_calc_model.py +0 -0
  197. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/farm_model.py +0 -0
  198. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/turbine.py +0 -0
  199. {foxes-1.1.1 → foxes-1.2.1}/foxes/core/wind_farm.py +0 -0
  200. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/farms/__init__.py +0 -0
  201. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/farms/test_farm_67.csv +0 -0
  202. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/parse.py +0 -0
  203. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/power_ct_curves/DTU-10MW-D178d3-H119.csv +0 -0
  204. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/power_ct_curves/IEA-15MW-D240-H150.csv +0 -0
  205. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/power_ct_curves/IWT-7d5MW-D164-H100.csv +0 -0
  206. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/power_ct_curves/NREL-5MW-D126-H90.csv +0 -0
  207. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/power_ct_curves/__init__.py +0 -0
  208. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/WRF-Timeseries-3000.nc +0 -0
  209. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/WRF-Timeseries-4464.csv.gz +0 -0
  210. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/__init__.py +0 -0
  211. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/abl_states_6000.csv.gz +0 -0
  212. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/timeseries_100.csv.gz +0 -0
  213. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/timeseries_3000.csv.gz +0 -0
  214. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/timeseries_8000.csv.gz +0 -0
  215. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/wind_rose_bremen.csv +0 -0
  216. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/wind_rotation.nc +0 -0
  217. {foxes-1.1.1 → foxes-1.2.1}/foxes/data/states/winds100.tab +0 -0
  218. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/__init__.py +0 -0
  219. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/default.py +0 -0
  220. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/futures.py +0 -0
  221. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/mpi.py +0 -0
  222. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/multiprocess.py +0 -0
  223. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/numpy.py +0 -0
  224. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/pool.py +0 -0
  225. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/ray.py +0 -0
  226. {foxes-1.1.1 → foxes-1.2.1}/foxes/engines/single.py +1 -1
  227. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/__init__.py +0 -0
  228. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/from_df.py +0 -0
  229. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/from_random.py +0 -0
  230. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/ring.py +0 -0
  231. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/farm_layout/row.py +0 -0
  232. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/create/__init__.py +0 -0
  233. {foxes-1.1.1 → foxes-1.2.1}/foxes/input/states/create/random_timeseries.py +0 -0
  234. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/__init__.py +0 -0
  235. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/axial_induction/__init__.py +0 -0
  236. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/axial_induction/betz.py +0 -0
  237. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/axial_induction/madsen.py +0 -0
  238. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/farm_controllers/__init__.py +0 -0
  239. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/farm_controllers/basic.py +0 -0
  240. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/farm_models/__init__.py +0 -0
  241. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/farm_models/turbine2farm.py +0 -0
  242. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/ground_models/__init__.py +0 -0
  243. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/ground_models/no_ground.py +0 -0
  244. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/ground_models/wake_mirror.py +0 -0
  245. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/model_book.py +0 -0
  246. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/__init__.py +0 -0
  247. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/grid.py +0 -0
  248. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/rotor_points.py +0 -0
  249. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/partial_wakes/top_hat.py +0 -0
  250. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/point_models/__init__.py +0 -0
  251. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/point_models/tke2ti.py +0 -0
  252. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/point_models/wake_deltas.py +0 -0
  253. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/rotor_models/__init__.py +0 -0
  254. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/__init__.py +0 -0
  255. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/calculator.py +0 -0
  256. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/rotor_centre_calc.py +0 -0
  257. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_models/thrust2ct.py +0 -0
  258. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/__init__.py +0 -0
  259. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/lookup.py +0 -0
  260. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/turbine_types/null_type.py +0 -0
  261. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/__init__.py +0 -0
  262. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/abl_log_neutral_ws.py +1 -1
  263. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/abl_log_stable_ws.py +1 -1
  264. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/abl_log_unstable_ws.py +1 -1
  265. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/abl_log_ws.py +1 -1
  266. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/data_profile.py +0 -0
  267. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/sheared_ws.py +0 -0
  268. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/vertical_profiles/uniform.py +0 -0
  269. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_frames/__init__.py +0 -0
  270. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/__init__.py +0 -0
  271. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/axisymmetric.py +0 -0
  272. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/dist_sliced.py +0 -0
  273. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/gaussian.py +0 -0
  274. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/induction/__init__.py +0 -0
  275. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/induction/rankine_half_body.py +0 -0
  276. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/induction/rathmann.py +0 -0
  277. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/induction/self_similar.py +0 -0
  278. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/induction/self_similar2020.py +0 -0
  279. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/ti/__init__.py +0 -0
  280. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/ti/iec_ti.py +0 -0
  281. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/top_hat.py +0 -0
  282. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/wind/__init__.py +0 -0
  283. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_models/wind/jensen.py +0 -0
  284. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/__init__.py +0 -0
  285. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ti_linear.py +0 -0
  286. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ti_max.py +0 -0
  287. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ti_pow.py +0 -0
  288. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ti_quadratic.py +0 -0
  289. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ws_linear.py +0 -0
  290. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ws_max.py +0 -0
  291. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ws_pow.py +0 -0
  292. {foxes-1.1.1 → foxes-1.2.1}/foxes/models/wake_superpositions/ws_quadratic.py +0 -0
  293. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/animation.py +0 -0
  294. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/flow_plots_2d/__init__.py +0 -0
  295. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/flow_plots_2d/flow_plots.py +0 -0
  296. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/flow_plots_2d/get_fig.py +0 -0
  297. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/round.py +0 -0
  298. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/seq_plugins/__init__.py +0 -0
  299. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/seq_plugins/seq_flow_ani_plugin.py +0 -0
  300. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/seq_plugins/seq_wake_debug_plugin.py +0 -0
  301. {foxes-1.1.1 → foxes-1.2.1}/foxes/output/slice_data.py +1 -1
  302. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/abl/__init__.py +0 -0
  303. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/abl/neutral.py +0 -0
  304. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/abl/sheared.py +0 -0
  305. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/abl/stable.py +0 -0
  306. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/abl/unstable.py +0 -0
  307. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/cubic_roots.py +0 -0
  308. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/data_book.py +0 -0
  309. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/dev_utils.py +0 -0
  310. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/exec_python.py +0 -0
  311. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/factory.py +0 -0
  312. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/__init__.py +0 -0
  313. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/area_geometry.py +0 -0
  314. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/circle.py +0 -0
  315. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/example_intersection.py +0 -0
  316. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/example_union.py +0 -0
  317. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/half_plane.py +0 -0
  318. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/geom2d/polygon.py +0 -0
  319. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/load.py +0 -0
  320. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/pandas_helpers.py +0 -0
  321. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/pandas_utils.py +0 -0
  322. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/random_xy.py +0 -0
  323. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/regularize.py +0 -0
  324. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/tab_files.py +0 -0
  325. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/two_circles.py +0 -0
  326. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/wind_dir.py +0 -0
  327. {foxes-1.1.1 → foxes-1.2.1}/foxes/utils/xarray_utils.py +0 -0
  328. {foxes-1.1.1 → foxes-1.2.1}/foxes/variables.py +0 -0
  329. {foxes-1.1.1 → foxes-1.2.1}/foxes.egg-info/dependency_links.txt +0 -0
  330. {foxes-1.1.1 → foxes-1.2.1}/foxes.egg-info/top_level.txt +0 -0
  331. {foxes-1.1.1 → foxes-1.2.1}/setup.cfg +0 -0
  332. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/PCt_files/flappy/run.py +0 -0
  333. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/abl_states/flappy/run.py +0 -0
  334. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/partial_top_hat/flappy/run.py +0 -0
  335. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/flappy/run.py +0 -0
  336. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/flappy/run.py +0 -0
  337. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/flappy/run.py +0 -0
  338. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/flappy/run.py +0 -0
  339. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/flappy/run.py +0 -0
  340. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6_2/grid_rotors/flappy/run.py +0 -0
  341. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/flappy/run.py +0 -0
  342. {foxes-1.1.1 → foxes-1.2.1}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/flappy/run.py +0 -0
  343. {foxes-1.1.1 → foxes-1.2.1}/tests/3_examples/test_examples.py +0 -0
@@ -5,4 +5,3 @@ include foxes/data/states/*.csv.gz
5
5
  include foxes/data/states/*.nc
6
6
  include foxes/data/states/*.tab
7
7
  include foxes/data/farms/*.csv
8
- include foxes/data/windio/*.yaml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foxes
3
- Version: 1.1.1
3
+ Version: 1.2.1
4
4
  Summary: Farm Optimization and eXtended yield Evaluation Software
5
5
  Author: Jonas Schulte
6
6
  Maintainer: Jonas Schulte
@@ -54,7 +54,6 @@ Requires-Dist: pandas
54
54
  Requires-Dist: xarray
55
55
  Requires-Dist: scipy
56
56
  Requires-Dist: netcdf4
57
- Requires-Dist: windrose
58
57
  Requires-Dist: cycler
59
58
  Requires-Dist: tqdm
60
59
  Requires-Dist: pyyaml
@@ -163,6 +162,7 @@ The supported Python versions are:
163
162
  - `Python 3.10`
164
163
  - `Python 3.11`
165
164
  - `Python 3.12`
165
+ - `Python 3.13`
166
166
 
167
167
  ## Installation
168
168
 
@@ -63,6 +63,7 @@ The supported Python versions are:
63
63
  - `Python 3.10`
64
64
  - `Python 3.11`
65
65
  - `Python 3.12`
66
+ - `Python 3.13`
66
67
 
67
68
  ## Installation
68
69
 
@@ -314,13 +314,15 @@ python_apigen_modules = {
314
314
  "foxes.algorithms.iterative.models": "_foxes/algorithms/iterative/models/",
315
315
  "foxes.algorithms.sequential": "_foxes/algorithms/sequential/",
316
316
  "foxes.algorithms.sequential.models": "_foxes/algorithms/sequential/models/",
317
+ "foxes.config": "_foxes/config/",
317
318
  "foxes.core": "_foxes/core/",
318
319
  "foxes.data": "_foxes/data/",
319
320
  "foxes.engines": "_foxes/engines/",
320
321
  "foxes.input.farm_layout": "_foxes/input/farm_layout/",
321
322
  "foxes.input.states": "_foxes/input/states/",
322
323
  "foxes.input.states.create": "_foxes/input/states/create/",
323
- "foxes.input.windio": "_foxes/input/windio/",
324
+ "foxes.input.yaml": "_foxes/input/yaml/",
325
+ "foxes.input.yaml.windio": "_foxes/input/yaml/windio/",
324
326
  "foxes.output": "_foxes/output/",
325
327
  "foxes.output.flow_plots_2d": "_foxes/output/flow_plots_2d/",
326
328
  "foxes.output.seq_plugins": "_foxes/output/seq_plugins/",
@@ -137,17 +137,17 @@ if __name__ == "__main__":
137
137
  # results by turbine
138
138
  turbine_results = o.reduce_states(
139
139
  {
140
- FV.AMB_P: "mean",
141
- FV.P: "mean",
142
- FV.AMB_CAP: "mean",
143
- FV.CAP: "mean",
144
- FV.EFF: "mean",
140
+ FV.AMB_P: "weights",
141
+ FV.P: "weights",
142
+ FV.AMB_CAP: "weights",
143
+ FV.CAP: "weights",
145
144
  }
146
145
  )
147
146
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
148
147
  algo=algo, annual=True, ambient=True
149
148
  )
150
149
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
150
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
151
151
  print("\nResults by turbine:\n")
152
152
  print(turbine_results)
153
153
 
@@ -99,14 +99,14 @@ if __name__ == "__main__":
99
99
  "-c",
100
100
  "--chunksize_states",
101
101
  help="The chunk size for states",
102
- default=None,
102
+ default=20,
103
103
  type=int,
104
104
  )
105
105
  parser.add_argument(
106
106
  "-C",
107
107
  "--chunksize_points",
108
108
  help="The chunk size for points",
109
- default=5000,
109
+ default=None,
110
110
  type=int,
111
111
  )
112
112
  parser.add_argument(
@@ -130,17 +130,17 @@ if __name__ == "__main__":
130
130
  # results by turbine
131
131
  turbine_results = o.reduce_states(
132
132
  {
133
- FV.AMB_P: "mean",
134
- FV.P: "mean",
135
- FV.AMB_CAP: "mean",
136
- FV.CAP: "mean",
137
- FV.EFF: "mean",
133
+ FV.AMB_P: "weights",
134
+ FV.P: "weights",
135
+ FV.AMB_CAP: "weights",
136
+ FV.CAP: "weights",
138
137
  }
139
138
  )
140
139
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
141
140
  algo=algo, annual=True, ambient=True
142
141
  )
143
142
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
143
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
144
144
  print("\nResults by turbine:\n")
145
145
  print(turbine_results)
146
146
 
@@ -101,21 +101,21 @@ if __name__ == "__main__":
101
101
  ):
102
102
 
103
103
  if not args.nofig:
104
- # fig, axs= plt.subplots(2, 1, figsize=(12,6))
105
- # foxes.output.FarmLayoutOutput(farm).get_figure(ax=axs[0])
104
+ fig = plt.figure(figsize=(14.5, 7))
105
+ ax1 = fig.add_subplot(121)
106
+ ax2 = fig.add_subplot(122, polar=True)
107
+ foxes.output.FarmLayoutOutput(farm).get_figure(fig=fig, ax=ax1)
106
108
 
107
109
  o = foxes.output.StatesRosePlotOutput(states, point=[0.0, 0.0, 100.0])
108
- fig = o.get_figure(
110
+ o.get_figure(
109
111
  16,
110
112
  FV.AMB_WS,
111
113
  [0, 3.5, 6, 10, 15, 20],
112
- figsize=(14.5, 7),
113
- rect=[0.01, 0.05, 0.45, 0.85],
114
+ fig=fig,
115
+ ax=ax2,
116
+ freq_delta=2,
114
117
  )
115
118
 
116
- ax = plt.Axes(fig, rect=[0.3, 0.1, 0.8, 0.8])
117
- fig.add_axes(ax)
118
- foxes.output.FarmLayoutOutput(farm).get_figure(fig=fig, ax=ax)
119
119
  plt.show()
120
120
  plt.close(fig)
121
121
 
@@ -187,17 +187,17 @@ if __name__ == "__main__":
187
187
  # results by turbine
188
188
  turbine_results = o.reduce_states(
189
189
  {
190
- FV.AMB_P: "mean",
191
- FV.P: "mean",
192
- FV.AMB_CAP: "mean",
193
- FV.CAP: "mean",
194
- FV.EFF: "mean",
190
+ FV.AMB_P: "weights",
191
+ FV.P: "weights",
192
+ FV.AMB_CAP: "weights",
193
+ FV.CAP: "weights",
195
194
  }
196
195
  )
197
196
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
198
197
  algo=algo, annual=True, ambient=True
199
198
  )
200
199
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
200
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
201
201
  print("\nResults by turbine:\n")
202
202
  print(turbine_results)
203
203
 
@@ -76,8 +76,13 @@ if __name__ == "__main__":
76
76
  D = ttype.D
77
77
  H = ttype.H
78
78
 
79
- states = foxes.input.states.ScanWS(
80
- ws_list=np.linspace(args.ws0, args.ws1, n_s), wd=270.0, ti=0.08, rho=1.225
79
+ states = foxes.input.states.ScanStates(
80
+ {
81
+ FV.WS: np.linspace(args.ws0, args.ws1, n_s),
82
+ FV.WD: [270],
83
+ FV.TI: [0.08],
84
+ FV.RHO: [1.225],
85
+ }
81
86
  )
82
87
 
83
88
  farm = foxes.WindFarm()
@@ -139,17 +144,17 @@ if __name__ == "__main__":
139
144
  # results by turbine
140
145
  turbine_results = o.reduce_states(
141
146
  {
142
- FV.AMB_P: "mean",
143
- FV.P: "mean",
144
- FV.AMB_CAP: "mean",
145
- FV.CAP: "mean",
146
- FV.EFF: "mean",
147
+ FV.AMB_P: "weights",
148
+ FV.P: "weights",
149
+ FV.AMB_CAP: "weights",
150
+ FV.CAP: "weights",
147
151
  }
148
152
  )
149
153
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
150
154
  algo=algo, annual=True, ambient=True
151
155
  )
152
156
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
157
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
153
158
  print("\nResults by turbine:\n")
154
159
  print(turbine_results)
155
160
 
@@ -138,25 +138,29 @@ if __name__ == "__main__":
138
138
  print(fr)
139
139
 
140
140
  if not args.nofig:
141
+ fig = plt.figure(figsize=(12, 4))
142
+ ax1 = fig.add_subplot(121, polar=True)
143
+ ax2 = fig.add_subplot(122, polar=True)
144
+
141
145
  o = foxes.output.RosePlotOutput(farm_results)
142
- fig = o.get_figure(
146
+ o.get_figure(
143
147
  16,
144
148
  FV.P,
145
- [100, 1000, 2000, 4000, 5001, 7000],
149
+ [0, 100, 1000, 2000, 4000, 5001, 7000],
146
150
  turbine=0,
147
151
  title="Power turbine 0",
148
- figsize=(12, 6),
149
- rect=[0.05, 0.1, 0.4, 0.8],
152
+ fig=fig,
153
+ ax=ax1,
150
154
  )
151
155
 
152
156
  o = foxes.output.RosePlotOutput(farm_results)
153
- fig = o.get_figure(
157
+ o.get_figure(
154
158
  16,
155
159
  FV.P,
156
- [100, 1000, 2000, 4000, 5001, 7000],
160
+ [0, 100, 1000, 2000, 4000, 5001, 7000],
157
161
  turbine=1,
158
162
  title="Power turbine 1",
159
163
  fig=fig,
160
- rect=[0.35, 0.1, 0.8, 0.8],
164
+ ax=ax2,
161
165
  )
162
166
  plt.show()
@@ -155,17 +155,17 @@ if __name__ == "__main__":
155
155
  # results by turbine
156
156
  turbine_results = o.reduce_states(
157
157
  {
158
- FV.AMB_P: "mean",
159
- FV.P: "mean",
160
- FV.AMB_CAP: "mean",
161
- FV.CAP: "mean",
162
- FV.EFF: "mean",
158
+ FV.AMB_P: "weights",
159
+ FV.P: "weights",
160
+ FV.AMB_CAP: "weights",
161
+ FV.CAP: "weights",
163
162
  }
164
163
  )
165
164
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
166
165
  algo=algo, annual=True, ambient=True
167
166
  )
168
167
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
168
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
169
169
  print("\nResults by turbine:\n")
170
170
  print(turbine_results)
171
171
 
@@ -89,7 +89,7 @@ if __name__ == "__main__":
89
89
  ):
90
90
  if not args.nofig:
91
91
  o = foxes.output.StatesRosePlotOutput(states, point=[0.0, 0.0, 100.0])
92
- fig = o.get_figure(12, FV.AMB_WS, [0, 3.5, 6, 10, 15, 20])
92
+ o.get_figure(12, FV.AMB_WS, [0, 3.5, 6, 10, 15, 20])
93
93
  plt.show()
94
94
 
95
95
  farm = foxes.WindFarm()
@@ -92,7 +92,7 @@ if __name__ == "__main__":
92
92
  "-c",
93
93
  "--chunksize_states",
94
94
  help="The chunk size for states",
95
- default=None,
95
+ default=20,
96
96
  type=int,
97
97
  )
98
98
  parser.add_argument(
@@ -160,17 +160,17 @@ if __name__ == "__main__":
160
160
  # results by turbine
161
161
  turbine_results = o.reduce_states(
162
162
  {
163
- FV.AMB_P: "mean",
164
- FV.P: "mean",
165
- FV.AMB_CAP: "mean",
166
- FV.CAP: "mean",
167
- FV.EFF: "mean",
163
+ FV.AMB_P: "weights",
164
+ FV.P: "weights",
165
+ FV.AMB_CAP: "weights",
166
+ FV.CAP: "weights",
168
167
  }
169
168
  )
170
169
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
171
170
  algo=algo, annual=True, ambient=True
172
171
  )
173
172
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
173
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
174
174
  print("\nResults by turbine:\n")
175
175
  print(turbine_results)
176
176
 
@@ -162,17 +162,17 @@ if __name__ == "__main__":
162
162
  # results by turbine
163
163
  turbine_results = o.reduce_states(
164
164
  {
165
- FV.AMB_P: "mean",
166
- FV.P: "mean",
167
- FV.AMB_CAP: "mean",
168
- FV.CAP: "mean",
169
- FV.EFF: "mean",
165
+ FV.AMB_P: "weights",
166
+ FV.P: "weights",
167
+ FV.AMB_CAP: "weights",
168
+ FV.CAP: "weights",
170
169
  }
171
170
  )
172
171
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
173
172
  algo=algo, annual=True, ambient=True
174
173
  )
175
174
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
175
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
176
176
  print("\nResults by turbine:\n")
177
177
  print(turbine_results)
178
178
 
@@ -113,7 +113,7 @@ if __name__ == "__main__":
113
113
 
114
114
  if not args.nofig:
115
115
  o = foxes.output.StatesRosePlotOutput(states, point=[0.0, 0.0, 100.0])
116
- fig = o.get_figure(16, FV.AMB_WS, [0, 3.5, 6, 10, 15, 20])
116
+ o.get_figure(16, FV.AMB_WS, [0, 3.5, 6, 10, 15, 20], add_inf=True)
117
117
  plt.show()
118
118
 
119
119
  time0 = time.time()
@@ -173,17 +173,17 @@ if __name__ == "__main__":
173
173
  # results by turbine
174
174
  turbine_results = o.reduce_states(
175
175
  {
176
- FV.AMB_P: "mean",
177
- FV.P: "mean",
178
- FV.AMB_CAP: "mean",
179
- FV.CAP: "mean",
180
- FV.EFF: "mean",
176
+ FV.AMB_P: "weights",
177
+ FV.P: "weights",
178
+ FV.AMB_CAP: "weights",
179
+ FV.CAP: "weights",
181
180
  }
182
181
  )
183
182
  turbine_results[FV.AMB_YLD] = o.calc_turbine_yield(
184
183
  algo=algo, annual=True, ambient=True
185
184
  )
186
185
  turbine_results[FV.YLD] = o.calc_turbine_yield(algo=algo, annual=True)
186
+ turbine_results[FV.EFF] = turbine_results[FV.P] / turbine_results[FV.AMB_P]
187
187
  print("\nResults by turbine:\n")
188
188
  print(turbine_results)
189
189
 
@@ -0,0 +1,37 @@
1
+ """
2
+ Farm Optimization and eXtended yield Evaluation Software
3
+
4
+ """
5
+
6
+ from .config import config, get_path # noqa: F401
7
+ from .core import Engine, WindFarm, Turbine, get_engine, reset_engine # noqa: F401
8
+ from .models import ModelBook # noqa: F401
9
+ from .data import (
10
+ parse_Pct_file_name,
11
+ parse_Pct_two_files,
12
+ FARM,
13
+ STATES,
14
+ PCTCURVE,
15
+ StaticData,
16
+ ) # noqa: F401
17
+
18
+ from . import algorithms # noqa: F401
19
+ from . import engines # noqa: F401
20
+ from . import models # noqa: F401
21
+ from . import input # noqa: F401
22
+ from . import output # noqa: F401
23
+ from . import utils # noqa: F401
24
+
25
+ import importlib
26
+ from pathlib import Path
27
+
28
+ try:
29
+ tomllib = importlib.import_module("tomllib")
30
+ source_location = Path(__file__).parent
31
+ if (source_location.parent / "pyproject.toml").exists():
32
+ with open(source_location.parent / "pyproject.toml", "rb") as f:
33
+ __version__ = tomllib.load(f)["project"]["version"]
34
+ else:
35
+ __version__ = importlib.metadata.version(__package__ or __name__)
36
+ except ModuleNotFoundError:
37
+ __version__ = importlib.metadata.version(__package__ or __name__)
@@ -1,8 +1,12 @@
1
+ import numpy as np
2
+
1
3
  from foxes.core import Algorithm, FarmDataModelList, get_engine
2
4
  from foxes.core import PointDataModel, PointDataModelList, FarmController
5
+ from foxes.config import config
3
6
  import foxes.models as fm
4
7
  import foxes.variables as FV
5
8
  import foxes.constants as FC
9
+
6
10
  from . import models as mdls
7
11
 
8
12
 
@@ -307,14 +311,24 @@ class Downwind(Algorithm):
307
311
  """
308
312
  return getattr(mdls, name)
309
313
 
310
- def _print_deco(self, func_name, n_points=None):
314
+ def print_deco(self, func_name=None, n_points=None):
311
315
  """
312
316
  Helper function for printing model names
317
+
318
+ Parameters
319
+ ----------
320
+ func_name: str, optional
321
+ Name of the calling function
322
+ n_points: int, optional
323
+ The number of points
324
+
313
325
  """
314
326
  if self.verbosity > 0:
315
- deco = "-" * 50
327
+ deco = "-" * 60
316
328
  print(f"\n{deco}")
317
- print(f" Running {self.name}: {func_name}")
329
+ print(f" Algorithm: {type(self).__name__}")
330
+ if func_name is not None:
331
+ print(f" Running {self.name}: {func_name}")
318
332
  print(deco)
319
333
  print(f" n_states : {self.n_states}")
320
334
  print(f" n_turbines: {self.n_turbines}")
@@ -534,7 +548,7 @@ class Downwind(Algorithm):
534
548
  self.initialize()
535
549
 
536
550
  # welcome:
537
- self._print_deco("calc_farm")
551
+ self.print_deco("calc_farm")
538
552
 
539
553
  # collect models:
540
554
  if outputs == "default":
@@ -570,7 +584,7 @@ class Downwind(Algorithm):
570
584
  farm_results[FC.TNAME] = ((FC.TURBINE,), self.farm.turbine_names)
571
585
  for v in [FV.ORDER, FV.ORDER_SSEL, FV.ORDER_INV]:
572
586
  if v in farm_results:
573
- farm_results[v] = farm_results[v].astype(FC.ITYPE)
587
+ farm_results[v] = farm_results[v].astype(config.dtype_int)
574
588
  del model_data
575
589
 
576
590
  # finalize models:
@@ -742,7 +756,8 @@ class Downwind(Algorithm):
742
756
  )
743
757
 
744
758
  # welcome:
745
- self._print_deco("calc_points", n_points=points.shape[1])
759
+ points = np.asarray(points)
760
+ self.print_deco("calc_points", n_points=points.shape[1])
746
761
 
747
762
  # collect models and initialize:
748
763
  mlist, calc_pars = self._collect_point_models(
@@ -3,6 +3,7 @@ import numpy as np
3
3
  from foxes.core import FarmDataModel, TData
4
4
  import foxes.variables as FV
5
5
  import foxes.constants as FC
6
+ from foxes.config import config
6
7
 
7
8
 
8
9
  class InitFarmData(FarmDataModel):
@@ -75,14 +76,16 @@ class InitFarmData(FarmDataModel):
75
76
  n_turbines = algo.n_turbines
76
77
 
77
78
  # define FV.TXYH as vector [X, Y, H]:
78
- fdata[FV.TXYH] = np.full((n_states, n_turbines, 3), np.nan, dtype=FC.DTYPE)
79
+ fdata[FV.TXYH] = np.full(
80
+ (n_states, n_turbines, 3), np.nan, dtype=config.dtype_double
81
+ )
79
82
  fdata.dims[FV.TXYH] = (FC.STATE, FC.TURBINE, FC.XYH)
80
83
  for i, v in enumerate([FV.X, FV.Y, FV.H]):
81
84
  fdata[v] = fdata[FV.TXYH][..., i]
82
85
  fdata.dims[v] = (FC.STATE, FC.TURBINE)
83
86
 
84
87
  # set X, Y, H, D:
85
- fdata[FV.D] = np.zeros((n_states, n_turbines), dtype=FC.DTYPE)
88
+ fdata[FV.D] = np.zeros((n_states, n_turbines), dtype=config.dtype_double)
86
89
  for ti, t in enumerate(algo.farm.turbines):
87
90
 
88
91
  if len(t.xy.shape) == 1:
@@ -1,5 +1,4 @@
1
1
  from foxes.core import PointDataModel
2
- import foxes.variables as FV
3
2
 
4
3
 
5
4
  class PointWakesCalculation(PointDataModel):
@@ -2,7 +2,7 @@ from foxes.algorithms.downwind.downwind import Downwind
2
2
 
3
3
  from foxes.core import FarmDataModelList
4
4
  from foxes.utils import Dict
5
- import foxes.variables as FV
5
+
6
6
  from . import models as mdls
7
7
 
8
8
 
@@ -2,9 +2,10 @@ import numpy as np
2
2
  from xarray import Dataset
3
3
 
4
4
  from foxes.algorithms import Iterative
5
- import foxes.constants as FC
6
- import foxes.variables as FV
5
+ from foxes.config import config
7
6
  from foxes.core import get_engine
7
+ import foxes.variables as FV
8
+ import foxes.constants as FC
8
9
 
9
10
  from . import models as mdls
10
11
 
@@ -135,7 +136,7 @@ class Sequential(Iterative):
135
136
  if not self.iterating:
136
137
  if not self.initialized:
137
138
  self.initialize()
138
- self._print_deco("calc_farm")
139
+ self.print_deco("calc_farm")
139
140
 
140
141
  self._inds = self.states0.index()
141
142
  self._weights = self.states0.weights(self)
@@ -170,7 +171,7 @@ class Sequential(Iterative):
170
171
  self._farm_results[FC.TNAME] = ((FC.TURBINE,), self.farm.turbine_names)
171
172
  if FV.ORDER in self._farm_results:
172
173
  self._farm_results[FV.ORDER] = self._farm_results[FV.ORDER].astype(
173
- FC.ITYPE
174
+ config.dtype_int
174
175
  )
175
176
  self._farm_results_dwnd = self._farm_results.copy(deep=True)
176
177
 
@@ -0,0 +1 @@
1
+ from .config import Config, config, get_path, get_output_path