foxes 1.0__tar.gz → 1.1.0.2__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.
- {foxes-1.0/foxes.egg-info → foxes-1.1.0.2}/PKG-INFO +7 -3
- {foxes-1.0 → foxes-1.1.0.2}/README.md +1 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/states_lookup_table/run.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/examples/timeseries/run.py +11 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/downwind.py +18 -13
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/farm_wakes_calc.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/init_farm_data.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/point_wakes_calc.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/reorder_farm_output.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/set_amb_farm_results.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/set_amb_point_results.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/iterative/iterative.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/iterative/models/farm_wakes_calc.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/iterative/models/urelax.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/sequential/models/plugin.py +4 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/sequential/models/seq_state.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/constants.py +5 -5
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/algorithm.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/data_calc_model.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/engine.py +20 -10
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/farm_controller.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/farm_data_model.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/ground_model.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/model.py +122 -108
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/partial_wakes_model.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/point_data_model.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/states.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/turbine_type.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/wake_frame.py +8 -30
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/wake_model.py +3 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/wake_superposition.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/windio/windio_5turbines_timeseries.yaml +9 -15
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/__init__.py +1 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/dask.py +13 -6
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/multiprocess.py +5 -8
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/numpy.py +8 -26
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/pool.py +10 -24
- foxes-1.1.0.2/foxes/engines/ray.py +79 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/single.py +3 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/from_json.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/__init__.py +1 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/field_data_nc.py +4 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/multi_height.py +4 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/scan_ws.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/single.py +1 -1
- foxes-1.1.0.2/foxes/input/states/slice_data_nc.py +681 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/states_table.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/__init__.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/read_attributes.py +8 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/read_fields.py +3 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/read_outputs.py +8 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/windio.py +5 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/farm_models/turbine2farm.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/ground_models/wake_mirror.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/model_book.py +29 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/axiwake.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/top_hat.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/point_models/set_uniform_data.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/point_models/tke2ti.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/point_models/wake_deltas.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/rotor_models/grid.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/calculator.py +4 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/kTI_model.py +22 -6
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/lookup_table.py +3 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/PCt_file.py +5 -5
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/PCt_from_two.py +5 -5
- foxes-1.1.0.2/foxes/models/turbine_types/TBL_file.py +80 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/__init__.py +1 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/lookup.py +5 -5
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/null_type.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/wsrho2PCt_from_two.py +7 -7
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/wsti2PCt_from_two.py +9 -9
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/__init__.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/dynamic_wakes.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/farm_order.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/rotor_wd.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/seq_dynamic_wakes.py +5 -11
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/streamlines.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/timelines.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/yawed_wakes.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/dist_sliced.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/induction/rankine_half_body.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/induction/rathmann.py +76 -22
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/induction/self_similar.py +76 -26
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/induction/vortex_sheet.py +84 -46
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/ti/crespo_hernandez.py +6 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/ti/iec_ti.py +7 -5
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/wind/bastankhah14.py +6 -4
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/wind/bastankhah16.py +9 -9
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/wind/jensen.py +3 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/wind/turbopark.py +14 -11
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ti_linear.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ti_max.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ti_pow.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ti_quadratic.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ws_linear.py +8 -7
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ws_max.py +8 -7
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ws_pow.py +8 -7
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ws_product.py +5 -5
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/ws_quadratic.py +8 -7
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/farm_layout.py +14 -10
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/farm_results_eval.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/grids.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/results_writer.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/rose_plot.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/seq_plugins/seq_flow_ani_plugin.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/seq_plugins/seq_wake_debug_plugin.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/state_turbine_map.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/abl/neutral.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/abl/stable.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/abl/unstable.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/data_book.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/dict.py +23 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/exec_python.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/factory.py +29 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/circle.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/polygon.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geopandas_utils.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/load.py +2 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/pandas_helpers.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/xarray_utils.py +1 -1
- {foxes-1.0 → foxes-1.1.0.2}/foxes/variables.py +3 -3
- {foxes-1.0 → foxes-1.1.0.2/foxes.egg-info}/PKG-INFO +7 -3
- {foxes-1.0 → foxes-1.1.0.2}/foxes.egg-info/SOURCES.txt +4 -2
- {foxes-1.0 → foxes-1.1.0.2}/foxes.egg-info/requires.txt +4 -2
- {foxes-1.0 → foxes-1.1.0.2}/pyproject.toml +6 -3
- foxes-1.0/foxes/utils/geopandas_helpers.py +0 -294
- {foxes-1.0 → foxes-1.1.0.2}/LICENSE +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/Logo_FOXES.svg +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/MANIFEST.in +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/docs/source/conf.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/abl_states/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/compare_rotors_pwakes/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/compare_wakes/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/dyn_wakes/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/field_data_nc/run.py +0 -0
- {foxes-1.0/examples/induction_RHB → foxes-1.1.0.2/examples/induction}/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/multi_height/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/power_mask/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/random_timeseries/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/scan_row/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/sector_management/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/sequential/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/single_state/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/streamline_wakes/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/tab_file/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/timelines/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/timeseries_slurm/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/wind_rose/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/windio/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/examples/yawed_wake/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/downwind/models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/iterative/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/iterative/models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/iterative/models/convergence.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/sequential/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/sequential/models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/algorithms/sequential/sequential.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/axial_induction_model.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/data.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/farm_model.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/rotor_model.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/turbine.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/turbine_model.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/vertical_profile.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/core/wind_farm.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/farms/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/farms/test_farm_67.csv +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/parse.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/power_ct_curves/DTU-10MW-D178d3-H119.csv +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/power_ct_curves/IEA-15MW-D240-H150.csv +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/power_ct_curves/IWT-7d5MW-D164-H100.csv +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/power_ct_curves/NREL-5MW-D126-H90.csv +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/power_ct_curves/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/WRF-Timeseries-3000.nc +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/WRF-Timeseries-4464.csv.gz +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/abl_states_6000.csv.gz +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/timeseries_100.csv.gz +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/timeseries_3000.csv.gz +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/timeseries_8000.csv.gz +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/wind_rose_bremen.csv +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/wind_rotation.nc +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/windio_timeseries_5000.nc +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/states/winds100.tab +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/static_data.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/windio/DTU_10MW_turbine.yaml +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/data/windio/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/default.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/futures.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/engines/mpi.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/from_csv.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/from_df.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/from_file.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/from_random.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/grid.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/ring.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/farm_layout/row.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/create/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/create/random_abl_states.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/create/random_timeseries.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/states/one_point_flow.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/get_states.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/read_farm.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/input/windio/runner.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/axial_induction/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/axial_induction/betz.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/axial_induction/madsen.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/farm_controllers/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/farm_controllers/basic.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/farm_models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/ground_models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/ground_models/no_ground.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/centre.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/grid.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/rotor_points.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/partial_wakes/segregated.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/point_models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/rotor_models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/rotor_models/centre.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/rotor_models/levels.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/power_mask.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/rotor_centre_calc.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/sector_management.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/set_farm_vars.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/table_factors.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/thrust2ct.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/yaw2yawm.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_models/yawm2yaw.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/CpCt_file.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/turbine_types/CpCt_from_two.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/abl_log_neutral_ws.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/abl_log_stable_ws.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/abl_log_unstable_ws.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/abl_log_ws.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/data_profile.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/sheared_ws.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/vertical_profiles/uniform.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_frames/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/axisymmetric.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/gaussian.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/induction/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/induction/self_similar2020.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/ti/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/top_hat.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_models/wind/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/models/wake_superpositions/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/animation.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/calc_points.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/flow_plots_2d/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/flow_plots_2d/flow_plots.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/flow_plots_2d/get_fig.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/output.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/rotor_point_plots.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/round.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/seq_plugins/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/slice_data.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/state_turbine_table.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/output/turbine_type_curves.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/abl/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/abl/sheared.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/cubic_roots.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/dev_utils.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/__init__.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/area_geometry.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/example_intersection.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/example_union.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/geom2d/half_plane.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/pandas_utils.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/random_xy.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/regularize.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/subclasses.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/tab_files.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/two_circles.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/wind_dir.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes/utils/windrose_plot.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes.egg-info/dependency_links.txt +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/foxes.egg-info/top_level.txt +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/setup.cfg +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/0_consistency/iterative/test_iterative.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/0_consistency/partial_wakes/test_partial_wakes.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/PCt_files/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/abl_states/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/abl_states/test_abl_states.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/partial_top_hat/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/partial_top_hat/test_partial_top_hat.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6_2/grid_rotors/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6_2/grid_rotors/test_grid_rotors.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/flappy/run.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +0 -0
- {foxes-1.0 → foxes-1.1.0.2}/tests/3_examples/test_examples.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foxes
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0.2
|
|
4
4
|
Summary: Farm Optimization and eXtended yield Evaluation Software
|
|
5
5
|
Author: Jonas Schulte
|
|
6
6
|
Maintainer: Jonas Schulte
|
|
@@ -41,6 +41,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
41
41
|
Classifier: Programming Language :: Python :: 3.10
|
|
42
42
|
Classifier: Programming Language :: Python :: 3.11
|
|
43
43
|
Classifier: Programming Language :: Python :: 3.12
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
44
45
|
Classifier: License :: OSI Approved :: MIT License
|
|
45
46
|
Classifier: Operating System :: OS Independent
|
|
46
47
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -58,7 +59,7 @@ Requires-Dist: cycler
|
|
|
58
59
|
Requires-Dist: tqdm
|
|
59
60
|
Requires-Dist: pyyaml
|
|
60
61
|
Provides-Extra: io
|
|
61
|
-
Requires-Dist:
|
|
62
|
+
Requires-Dist: windIO>=1.0; extra == "io"
|
|
62
63
|
Provides-Extra: opt
|
|
63
64
|
Requires-Dist: foxes-opt; extra == "opt"
|
|
64
65
|
Provides-Extra: dask
|
|
@@ -73,12 +74,14 @@ Requires-Dist: distributed; extra == "eng"
|
|
|
73
74
|
Requires-Dist: dask-jobqueue; extra == "eng"
|
|
74
75
|
Requires-Dist: setuptools; extra == "eng"
|
|
75
76
|
Requires-Dist: mpi4py; extra == "eng"
|
|
77
|
+
Requires-Dist: ray; extra == "eng"
|
|
76
78
|
Provides-Extra: eng0
|
|
77
79
|
Requires-Dist: multiprocess; extra == "eng0"
|
|
78
80
|
Requires-Dist: dask; extra == "eng0"
|
|
79
81
|
Requires-Dist: distributed; extra == "eng0"
|
|
80
82
|
Requires-Dist: dask-jobqueue; extra == "eng0"
|
|
81
83
|
Requires-Dist: setuptools; extra == "eng0"
|
|
84
|
+
Requires-Dist: ray; extra == "eng0"
|
|
82
85
|
Provides-Extra: test
|
|
83
86
|
Requires-Dist: flake8; extra == "test"
|
|
84
87
|
Requires-Dist: pytest; extra == "test"
|
|
@@ -95,7 +98,7 @@ Requires-Dist: flake8; extra == "dev"
|
|
|
95
98
|
Requires-Dist: pytest; extra == "dev"
|
|
96
99
|
Requires-Dist: jupyter; extra == "dev"
|
|
97
100
|
Requires-Dist: objsize; extra == "dev"
|
|
98
|
-
Requires-Dist: black; extra == "dev"
|
|
101
|
+
Requires-Dist: black[jupyter]; extra == "dev"
|
|
99
102
|
|
|
100
103
|
# Welcome to foxes
|
|
101
104
|
|
|
@@ -113,6 +116,7 @@ The software `foxes` is a modular wind farm simulation and wake modelling toolbo
|
|
|
113
116
|
The fast performance of `foxes` is owed to vectorization and parallelization,
|
|
114
117
|
and it is intended to be used for large wind farms and large timeseries inflow data.
|
|
115
118
|
The parallelization on local or remote clusters is supported, based on
|
|
119
|
+
[mpi4py](https://mpi4py.readthedocs.io/en/stable/) or
|
|
116
120
|
[dask.distributed](https://distributed.dask.org/en/stable/).
|
|
117
121
|
The wind farm
|
|
118
122
|
optimization capabilities invoke the [iwopy](https://github.com/FraunhoferIWES/iwopy) package which
|
|
@@ -14,6 +14,7 @@ The software `foxes` is a modular wind farm simulation and wake modelling toolbo
|
|
|
14
14
|
The fast performance of `foxes` is owed to vectorization and parallelization,
|
|
15
15
|
and it is intended to be used for large wind farms and large timeseries inflow data.
|
|
16
16
|
The parallelization on local or remote clusters is supported, based on
|
|
17
|
+
[mpi4py](https://mpi4py.readthedocs.io/en/stable/) or
|
|
17
18
|
[dask.distributed](https://distributed.dask.org/en/stable/).
|
|
18
19
|
The wind farm
|
|
19
20
|
optimization capabilities invoke the [iwopy](https://github.com/FraunhoferIWES/iwopy) package which
|
|
@@ -51,7 +51,7 @@ if __name__ == "__main__":
|
|
|
51
51
|
parser.add_argument(
|
|
52
52
|
"-m", "--tmodels", help="The turbine models", default=[], nargs="+"
|
|
53
53
|
)
|
|
54
|
-
parser.add_argument("-e", "--engine", help="The engine", default=
|
|
54
|
+
parser.add_argument("-e", "--engine", help="The engine", default="default")
|
|
55
55
|
parser.add_argument(
|
|
56
56
|
"-n", "--n_cpus", help="The number of cpus", default=None, type=int
|
|
57
57
|
)
|
|
@@ -99,6 +99,15 @@ if __name__ == "__main__":
|
|
|
99
99
|
plt.show()
|
|
100
100
|
plt.close(ax.get_figure())
|
|
101
101
|
|
|
102
|
+
engine = foxes.Engine.new(
|
|
103
|
+
args.engine,
|
|
104
|
+
n_procs=args.n_cpus,
|
|
105
|
+
chunk_size_states=args.chunksize_states,
|
|
106
|
+
chunk_size_points=args.chunksize_points,
|
|
107
|
+
verbosity=1,
|
|
108
|
+
)
|
|
109
|
+
engine.initialize()
|
|
110
|
+
|
|
102
111
|
Algo = foxes.algorithms.Iterative if args.iterative else foxes.algorithms.Downwind
|
|
103
112
|
algo = Algo(
|
|
104
113
|
farm,
|
|
@@ -108,10 +117,6 @@ if __name__ == "__main__":
|
|
|
108
117
|
wake_frame=args.frame,
|
|
109
118
|
partial_wakes=args.pwakes,
|
|
110
119
|
mbook=mbook,
|
|
111
|
-
engine=args.engine,
|
|
112
|
-
n_procs=args.n_cpus,
|
|
113
|
-
chunk_size_states=args.chunksize_states,
|
|
114
|
-
chunk_size_points=args.chunksize_points,
|
|
115
120
|
verbosity=1,
|
|
116
121
|
)
|
|
117
122
|
|
|
@@ -177,6 +182,8 @@ if __name__ == "__main__":
|
|
|
177
182
|
print(f"Farm efficiency : {o.calc_farm_efficiency()*100:.2f} %")
|
|
178
183
|
print(f"Annual farm yield : {turbine_results[FV.YLD].sum():.2f} GWh")
|
|
179
184
|
|
|
185
|
+
engine.finalize()
|
|
186
|
+
|
|
180
187
|
if not args.nofig:
|
|
181
188
|
o = foxes.output.StateTurbineMap(farm_results)
|
|
182
189
|
ax = o.plot_map(FV.P, cmap="inferno", figsize=(6, 7))
|
|
@@ -115,15 +115,15 @@ class Downwind(Algorithm):
|
|
|
115
115
|
self.__states = states
|
|
116
116
|
self.n_states = None
|
|
117
117
|
|
|
118
|
-
self.__rotor_model = self.mbook.rotor_models
|
|
118
|
+
self.__rotor_model = self.mbook.rotor_models.get_item(rotor_model)
|
|
119
119
|
self.rotor_model.name = rotor_model
|
|
120
120
|
|
|
121
|
-
self.__wake_frame = self.mbook.wake_frames
|
|
121
|
+
self.__wake_frame = self.mbook.wake_frames.get_item(wake_frame)
|
|
122
122
|
self.wake_frame.name = wake_frame
|
|
123
123
|
|
|
124
124
|
self.__wake_models = {}
|
|
125
125
|
for w in wake_models:
|
|
126
|
-
m = self.mbook.wake_models
|
|
126
|
+
m = self.mbook.wake_models.get_item(w)
|
|
127
127
|
m.name = w
|
|
128
128
|
self.wake_models[w] = m
|
|
129
129
|
|
|
@@ -137,10 +137,12 @@ class Downwind(Algorithm):
|
|
|
137
137
|
try:
|
|
138
138
|
pw = values
|
|
139
139
|
if checkw:
|
|
140
|
-
mbooks
|
|
140
|
+
mbooks.get_item(pw).check_wmodel(
|
|
141
|
+
self.wake_models[w], error=True
|
|
142
|
+
)
|
|
141
143
|
except TypeError:
|
|
142
144
|
pw = deffunc(self.wake_models[w])
|
|
143
|
-
target[w] = mbooks
|
|
145
|
+
target[w] = mbooks.get_item(pw)
|
|
144
146
|
target[w].name = pw
|
|
145
147
|
elif isinstance(values, list):
|
|
146
148
|
for i, w in enumerate(wake_models):
|
|
@@ -149,7 +151,7 @@ class Downwind(Algorithm):
|
|
|
149
151
|
f"Not enough {descr} in list {values}, expecting {len(wake_models)}"
|
|
150
152
|
)
|
|
151
153
|
pw = values[i]
|
|
152
|
-
target[w] = mbooks
|
|
154
|
+
target[w] = mbooks.get_item(pw)
|
|
153
155
|
target[w].name = pw
|
|
154
156
|
else:
|
|
155
157
|
for w in wake_models:
|
|
@@ -157,7 +159,7 @@ class Downwind(Algorithm):
|
|
|
157
159
|
pw = values[w]
|
|
158
160
|
else:
|
|
159
161
|
pw = deffunc(self.wake_models[w])
|
|
160
|
-
target[w] = mbooks
|
|
162
|
+
target[w] = mbooks.get_item(pw)
|
|
161
163
|
target[w].name = pw
|
|
162
164
|
|
|
163
165
|
self.__partial_wakes = {}
|
|
@@ -180,7 +182,7 @@ class Downwind(Algorithm):
|
|
|
180
182
|
checkw=False,
|
|
181
183
|
)
|
|
182
184
|
|
|
183
|
-
self.__farm_controller = self.mbook.farm_controllers
|
|
185
|
+
self.__farm_controller = self.mbook.farm_controllers.get_item(farm_controller)
|
|
184
186
|
self.farm_controller.name = farm_controller
|
|
185
187
|
|
|
186
188
|
@property
|
|
@@ -541,7 +543,7 @@ class Downwind(Algorithm):
|
|
|
541
543
|
|
|
542
544
|
# initialize models:
|
|
543
545
|
if not mlist.initialized:
|
|
544
|
-
mlist.initialize(self, self.verbosity)
|
|
546
|
+
mlist.initialize(self, self.verbosity - 1)
|
|
545
547
|
self._calc_farm_vars(mlist)
|
|
546
548
|
self._print_model_oder(mlist, calc_pars)
|
|
547
549
|
|
|
@@ -574,7 +576,7 @@ class Downwind(Algorithm):
|
|
|
574
576
|
# finalize models:
|
|
575
577
|
if finalize:
|
|
576
578
|
self.print("\n")
|
|
577
|
-
mlist.finalize(self, self.verbosity)
|
|
579
|
+
mlist.finalize(self, self.verbosity - 1)
|
|
578
580
|
self.finalize()
|
|
579
581
|
else:
|
|
580
582
|
self.del_model_data(mlist)
|
|
@@ -678,6 +680,7 @@ class Downwind(Algorithm):
|
|
|
678
680
|
farm_results,
|
|
679
681
|
points,
|
|
680
682
|
point_models=None,
|
|
683
|
+
outputs=None,
|
|
681
684
|
calc_parameters={},
|
|
682
685
|
persist_mdata=True,
|
|
683
686
|
persist_pdata=False,
|
|
@@ -698,6 +701,8 @@ class Downwind(Algorithm):
|
|
|
698
701
|
dimensions (state, turbine)
|
|
699
702
|
points: numpy.ndarray
|
|
700
703
|
The points of interest, shape: (n_states, n_points, 3)
|
|
704
|
+
outputs: list of str, optional
|
|
705
|
+
The output variables, or None for defaults
|
|
701
706
|
point_models: str or foxes.core.PointDataModel
|
|
702
707
|
Additional point models to be executed
|
|
703
708
|
calc_parameters: dict
|
|
@@ -746,7 +751,7 @@ class Downwind(Algorithm):
|
|
|
746
751
|
|
|
747
752
|
# initialize models:
|
|
748
753
|
if not mlist.initialized:
|
|
749
|
-
mlist.initialize(self, self.verbosity)
|
|
754
|
+
mlist.initialize(self, self.verbosity - 1)
|
|
750
755
|
|
|
751
756
|
# subset selections:
|
|
752
757
|
sel = {} if states_sel is None else {FC.STATE: states_sel}
|
|
@@ -780,7 +785,7 @@ class Downwind(Algorithm):
|
|
|
780
785
|
self.print("\nInput point data:\n\n", point_data, "\n")
|
|
781
786
|
|
|
782
787
|
# check vars:
|
|
783
|
-
ovars = mlist.output_point_vars(self)
|
|
788
|
+
ovars = mlist.output_point_vars(self) if outputs is None else outputs
|
|
784
789
|
self.print(f"\nOutput point variables:", ", ".join(ovars))
|
|
785
790
|
|
|
786
791
|
# calculate:
|
|
@@ -800,7 +805,7 @@ class Downwind(Algorithm):
|
|
|
800
805
|
# finalize models:
|
|
801
806
|
if finalize:
|
|
802
807
|
self.print("\n")
|
|
803
|
-
mlist.finalize(self, self.verbosity)
|
|
808
|
+
mlist.finalize(self, self.verbosity - 1)
|
|
804
809
|
self.finalize()
|
|
805
810
|
|
|
806
811
|
if ambient:
|
|
@@ -48,7 +48,7 @@ class ReorderFarmOutput(FarmDataModel):
|
|
|
48
48
|
return self.outputs if self.outputs is not None else algo.farm_vars
|
|
49
49
|
|
|
50
50
|
def calculate(self, algo, mdata, fdata):
|
|
51
|
-
"""
|
|
51
|
+
"""
|
|
52
52
|
The main model calculation.
|
|
53
53
|
|
|
54
54
|
This function is executed on a single chunk of data,
|
|
@@ -331,7 +331,7 @@ class Iterative(Downwind):
|
|
|
331
331
|
self.finalize()
|
|
332
332
|
for m in self._mlist0.models:
|
|
333
333
|
if m not in self.sub_models():
|
|
334
|
-
m.finalize(self, self.verbosity)
|
|
334
|
+
m.finalize(self, self.verbosity - 1)
|
|
335
335
|
del self._mlist0, self._calc_pars0
|
|
336
336
|
|
|
337
337
|
if ret_dwnd_order:
|
|
@@ -10,7 +10,7 @@ class URelax(FarmDataModel):
|
|
|
10
10
|
----------
|
|
11
11
|
urel: dict
|
|
12
12
|
The variables and their under-relaxation
|
|
13
|
-
factors
|
|
13
|
+
factors between 0 and 1
|
|
14
14
|
|
|
15
15
|
:group: algorithms.iterative.models
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@ class URelax(FarmDataModel):
|
|
|
24
24
|
----------
|
|
25
25
|
urel: dict
|
|
26
26
|
The variables and their under-relaxation
|
|
27
|
-
factors
|
|
27
|
+
factors between 0 and 1
|
|
28
28
|
|
|
29
29
|
"""
|
|
30
30
|
super().__init__()
|
|
@@ -49,7 +49,7 @@ class URelax(FarmDataModel):
|
|
|
49
49
|
return list(self.urel.keys())
|
|
50
50
|
|
|
51
51
|
def calculate(self, algo, mdata, fdata):
|
|
52
|
-
"""
|
|
52
|
+
"""
|
|
53
53
|
The main model calculation.
|
|
54
54
|
|
|
55
55
|
This function is executed on a single chunk of data,
|
|
@@ -6,7 +6,7 @@ class SequentialPlugin:
|
|
|
6
6
|
Parameters
|
|
7
7
|
----------
|
|
8
8
|
algo: foxes.algorithms.sequential.Sequential
|
|
9
|
-
The
|
|
9
|
+
The sequential algorithm
|
|
10
10
|
|
|
11
11
|
:group: algorithms.sequential.models
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ class SequentialPlugin:
|
|
|
25
25
|
Parameters
|
|
26
26
|
----------
|
|
27
27
|
algo: foxes.algorithms.sequential.Sequential
|
|
28
|
-
The current
|
|
28
|
+
The current sequential algorithm
|
|
29
29
|
|
|
30
30
|
"""
|
|
31
31
|
self.algo = algo
|
|
@@ -37,7 +37,7 @@ class SequentialPlugin:
|
|
|
37
37
|
Parameters
|
|
38
38
|
----------
|
|
39
39
|
algo: foxes.algorithms.sequential.Sequential
|
|
40
|
-
The latest
|
|
40
|
+
The latest sequential algorithm
|
|
41
41
|
fres: xarray.Dataset
|
|
42
42
|
The latest farm results
|
|
43
43
|
pres: xarray.Dataset, optional
|
|
@@ -53,7 +53,7 @@ class SequentialPlugin:
|
|
|
53
53
|
Parameters
|
|
54
54
|
----------
|
|
55
55
|
algo: foxes.algorithms.sequential.Sequential
|
|
56
|
-
The final
|
|
56
|
+
The final sequential algorithm
|
|
57
57
|
|
|
58
58
|
"""
|
|
59
59
|
self.algo = algo
|
|
@@ -143,7 +143,7 @@ BLOCK_CONVERGENCE = "block_convergence"
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
KAPPA = 0.41
|
|
146
|
-
""" The
|
|
146
|
+
""" The Von Karman constant
|
|
147
147
|
:group: foxes.constants
|
|
148
148
|
"""
|
|
149
149
|
|
|
@@ -154,22 +154,22 @@ W = "W"
|
|
|
154
154
|
"""
|
|
155
155
|
|
|
156
156
|
kW = "kW"
|
|
157
|
-
""" The unit
|
|
157
|
+
""" The unit kilowatt
|
|
158
158
|
:group: foxes.constants
|
|
159
159
|
"""
|
|
160
160
|
|
|
161
161
|
MW = "MW"
|
|
162
|
-
""" The unit
|
|
162
|
+
""" The unit megawatt
|
|
163
163
|
:group: foxes.constants
|
|
164
164
|
"""
|
|
165
165
|
|
|
166
166
|
GW = "GW"
|
|
167
|
-
""" The unit
|
|
167
|
+
""" The unit gigawatt
|
|
168
168
|
:group: foxes.constants
|
|
169
169
|
"""
|
|
170
170
|
|
|
171
171
|
TW = "TW"
|
|
172
|
-
""" The unit
|
|
172
|
+
""" The unit terawatt
|
|
173
173
|
:group: foxes.constants
|
|
174
174
|
"""
|
|
175
175
|
|
|
@@ -179,7 +179,7 @@ class Algorithm(Model):
|
|
|
179
179
|
raise ValueError(
|
|
180
180
|
f"Algorithm '{self.name}': Cannot initialize while running"
|
|
181
181
|
)
|
|
182
|
-
super().initialize(self, self.verbosity)
|
|
182
|
+
super().initialize(self, self.verbosity - 1)
|
|
183
183
|
|
|
184
184
|
def store_model_data(self, model, idata, force=False):
|
|
185
185
|
"""
|
|
@@ -894,7 +894,7 @@ class Algorithm(Model):
|
|
|
894
894
|
"""
|
|
895
895
|
if self.running:
|
|
896
896
|
raise ValueError(f"Algorithm '{self.name}': Cannot finalize while running")
|
|
897
|
-
super().finalize(self, self.verbosity)
|
|
897
|
+
super().finalize(self, self.verbosity - 1)
|
|
898
898
|
if clear_mem:
|
|
899
899
|
self.__idata_mem = Dict()
|
|
900
900
|
# self.reset_chunk_store()
|
|
@@ -5,7 +5,7 @@ from .model import Model
|
|
|
5
5
|
|
|
6
6
|
class DataCalcModel(Model):
|
|
7
7
|
"""
|
|
8
|
-
Abstract base class for models
|
|
8
|
+
Abstract base class for models
|
|
9
9
|
that run calculation on xarray Dataset
|
|
10
10
|
data.
|
|
11
11
|
|
|
@@ -35,7 +35,7 @@ class DataCalcModel(Model):
|
|
|
35
35
|
|
|
36
36
|
@abstractmethod
|
|
37
37
|
def calculate(self, algo, *data, **parameters):
|
|
38
|
-
"""
|
|
38
|
+
"""
|
|
39
39
|
The main model calculation.
|
|
40
40
|
|
|
41
41
|
This function is executed on a single chunk of data,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import os
|
|
1
2
|
import numpy as np
|
|
2
3
|
from abc import ABC, abstractmethod
|
|
3
|
-
from os import cpu_count
|
|
4
4
|
from tqdm import tqdm
|
|
5
5
|
from xarray import Dataset
|
|
6
6
|
|
|
@@ -58,7 +58,10 @@ class Engine(ABC):
|
|
|
58
58
|
"""
|
|
59
59
|
self.chunk_size_states = chunk_size_states
|
|
60
60
|
self.chunk_size_points = chunk_size_points
|
|
61
|
-
|
|
61
|
+
try:
|
|
62
|
+
self.n_procs = n_procs if n_procs is not None else os.process_cpu_count()
|
|
63
|
+
except AttributeError:
|
|
64
|
+
self.n_procs = os.cpu_count()
|
|
62
65
|
self.verbosity = verbosity
|
|
63
66
|
self.__initialized = False
|
|
64
67
|
self.__entered = False
|
|
@@ -257,14 +260,18 @@ class Engine(ABC):
|
|
|
257
260
|
chunk_sizes_targets = [n_targets]
|
|
258
261
|
if n_targets > 1:
|
|
259
262
|
if self.chunk_size_points is None:
|
|
260
|
-
|
|
261
|
-
|
|
263
|
+
if n_chunks_states == 1:
|
|
264
|
+
n_chunks_targets = min(self.n_procs, n_targets)
|
|
265
|
+
chunk_size_targets = max(int(n_targets / self.n_procs), 1)
|
|
266
|
+
else:
|
|
267
|
+
chunk_size_targets = n_targets
|
|
268
|
+
n_chunks_targets = 1
|
|
262
269
|
else:
|
|
263
270
|
chunk_size_targets = min(n_targets, self.chunk_size_points)
|
|
264
271
|
n_chunks_targets = max(int(n_targets / chunk_size_targets), 1)
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
272
|
+
if int(n_targets / n_chunks_targets) > chunk_size_targets:
|
|
273
|
+
n_chunks_targets += 1
|
|
274
|
+
chunk_size_targets = int(n_targets / n_chunks_targets)
|
|
268
275
|
chunk_sizes_targets = np.full(n_chunks_targets, chunk_size_targets)
|
|
269
276
|
extra = n_targets - n_chunks_targets * chunk_size_targets
|
|
270
277
|
if extra > 0:
|
|
@@ -419,7 +426,7 @@ class Engine(ABC):
|
|
|
419
426
|
The final results dataset
|
|
420
427
|
|
|
421
428
|
"""
|
|
422
|
-
self.print("Combining results", level=2)
|
|
429
|
+
self.print(f"{type(self).__name__}: Combining results", level=2)
|
|
423
430
|
pbar = tqdm(total=len(out_vars)) if self.verbosity > 1 else None
|
|
424
431
|
data_vars = {}
|
|
425
432
|
for v in out_vars:
|
|
@@ -502,10 +509,12 @@ class Engine(ABC):
|
|
|
502
509
|
"""
|
|
503
510
|
n_states = model_data.sizes[FC.STATE]
|
|
504
511
|
if point_data is None:
|
|
505
|
-
self.print(
|
|
512
|
+
self.print(
|
|
513
|
+
f"{type(self).__name__}: Calculating {n_states} states for {algo.n_turbines} turbines"
|
|
514
|
+
)
|
|
506
515
|
else:
|
|
507
516
|
self.print(
|
|
508
|
-
f"Calculating data at {point_data.sizes[FC.TARGET]} points for {n_states} states"
|
|
517
|
+
f"{type(self).__name__}: Calculating data at {point_data.sizes[FC.TARGET]} points for {n_states} states"
|
|
509
518
|
)
|
|
510
519
|
if not self.initialized:
|
|
511
520
|
raise ValueError(f"Engine '{type(self).__name__}' not initialized")
|
|
@@ -541,6 +550,7 @@ class Engine(ABC):
|
|
|
541
550
|
local_cluster="LocalClusterEngine",
|
|
542
551
|
slurm_cluster="SlurmClusterEngine",
|
|
543
552
|
mpi="MPIEngine",
|
|
553
|
+
ray="RayEngine",
|
|
544
554
|
numpy="NumpyEngine",
|
|
545
555
|
single="SingleChunkEngine",
|
|
546
556
|
).get(engine_type, engine_type)
|
|
@@ -87,7 +87,7 @@ class FarmController(FarmDataModel):
|
|
|
87
87
|
|
|
88
88
|
def needs_rews2(self):
|
|
89
89
|
"""
|
|
90
|
-
Returns flag for
|
|
90
|
+
Returns flag for requiring REWS2 variable
|
|
91
91
|
|
|
92
92
|
Returns
|
|
93
93
|
-------
|
|
@@ -102,7 +102,7 @@ class FarmController(FarmDataModel):
|
|
|
102
102
|
|
|
103
103
|
def needs_rews3(self):
|
|
104
104
|
"""
|
|
105
|
-
Returns flag for
|
|
105
|
+
Returns flag for requiring REWS3 variable
|
|
106
106
|
|
|
107
107
|
Returns
|
|
108
108
|
-------
|
|
@@ -348,7 +348,7 @@ class FarmController(FarmDataModel):
|
|
|
348
348
|
return list(ovars)
|
|
349
349
|
|
|
350
350
|
def calculate(self, algo, mdata, fdata, pre_rotor, downwind_index=None):
|
|
351
|
-
"""
|
|
351
|
+
"""
|
|
352
352
|
The main model calculation.
|
|
353
353
|
|
|
354
354
|
This function is executed on a single chunk of data,
|
|
@@ -70,7 +70,7 @@ class GroundModel(Model):
|
|
|
70
70
|
The target point data
|
|
71
71
|
downwind_index: int
|
|
72
72
|
The index of the wake causing turbine
|
|
73
|
-
in the
|
|
73
|
+
in the downwind order
|
|
74
74
|
wake_deltas: dict
|
|
75
75
|
The wake deltas. Key: variable name,
|
|
76
76
|
value: numpy.ndarray with shape
|
|
@@ -207,7 +207,7 @@ class GroundModel(Model):
|
|
|
207
207
|
The target point data
|
|
208
208
|
downwind_index: int
|
|
209
209
|
The index of the wake causing turbine
|
|
210
|
-
in the
|
|
210
|
+
in the downwind order
|
|
211
211
|
wake_deltas: dict
|
|
212
212
|
The wake deltas. Key: variable name,
|
|
213
213
|
value: numpy.ndarray with shape
|