foxes 1.4__tar.gz → 1.5__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.4/foxes.egg-info → foxes-1.5}/PKG-INFO +32 -52
- {foxes-1.4 → foxes-1.5}/README.md +1 -1
- {foxes-1.4 → foxes-1.5}/docs/source/conf.py +1 -1
- {foxes-1.4 → foxes-1.5}/examples/field_data_nc/run.py +1 -1
- {foxes-1.4 → foxes-1.5}/examples/streamline_wakes/run.py +2 -2
- {foxes-1.4 → foxes-1.5}/examples/yawed_wake/run.py +3 -1
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/downwind.py +5 -5
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/init_farm_data.py +58 -28
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/set_amb_farm_results.py +1 -1
- {foxes-1.4 → foxes-1.5}/foxes/core/algorithm.py +5 -5
- {foxes-1.4 → foxes-1.5}/foxes/core/data.py +75 -4
- {foxes-1.4 → foxes-1.5}/foxes/core/data_calc_model.py +4 -2
- {foxes-1.4 → foxes-1.5}/foxes/core/engine.py +33 -40
- {foxes-1.4 → foxes-1.5}/foxes/core/farm_data_model.py +16 -13
- {foxes-1.4 → foxes-1.5}/foxes/core/model.py +19 -1
- {foxes-1.4 → foxes-1.5}/foxes/core/point_data_model.py +19 -14
- {foxes-1.4 → foxes-1.5}/foxes/core/rotor_model.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/wake_deflection.py +3 -3
- foxes-1.5/foxes/data/states/point_cloud_100.nc +0 -0
- foxes-1.5/foxes/data/states/weibull_cloud_4.nc +0 -0
- foxes-1.5/foxes/data/states/weibull_grid.nc +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/engines/dask.py +3 -6
- {foxes-1.4 → foxes-1.5}/foxes/engines/default.py +2 -2
- {foxes-1.4 → foxes-1.5}/foxes/engines/numpy.py +11 -10
- {foxes-1.4 → foxes-1.5}/foxes/engines/pool.py +20 -11
- {foxes-1.4 → foxes-1.5}/foxes/engines/single.py +8 -6
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/__init__.py +1 -0
- foxes-1.5/foxes/input/farm_layout/from_arrays.py +68 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/__init__.py +7 -1
- foxes-1.5/foxes/input/states/dataset_states.py +710 -0
- foxes-1.5/foxes/input/states/field_data.py +531 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/multi_height.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/one_point_flow.py +1 -0
- foxes-1.5/foxes/input/states/point_cloud_data.py +618 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/scan.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/single.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/states_table.py +13 -23
- foxes-1.5/foxes/input/states/weibull_sectors.py +330 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/wrg_states.py +1 -1
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/dict.py +25 -24
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/read_attributes.py +40 -27
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/read_farm.py +12 -10
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/read_outputs.py +25 -15
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/read_site.py +121 -12
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/windio.py +22 -10
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/yaml.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/model_book.py +16 -15
- {foxes-1.4 → foxes-1.5}/foxes/models/rotor_models/__init__.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/rotor_models/centre.py +1 -1
- foxes-1.5/foxes/models/rotor_models/direct_infusion.py +241 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/calculator.py +16 -3
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/kTI_model.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/lookup_table.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/power_mask.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/rotor_centre_calc.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/sector_management.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/set_farm_vars.py +3 -8
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/table_factors.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/thrust2ct.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/yaw2yawm.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/yawm2yaw.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/PCt_file.py +2 -4
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/PCt_from_two.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/__init__.py +1 -0
- foxes-1.5/foxes/models/turbine_types/calculator_type.py +123 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/null_type.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/wsrho2PCt_from_two.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/wsti2PCt_from_two.py +3 -1
- {foxes-1.4 → foxes-1.5}/foxes/output/farm_layout.py +2 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/farm_results_eval.py +4 -1
- {foxes-1.4 → foxes-1.5}/foxes/output/flow_plots_2d/flow_plots.py +18 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/flow_plots_2d/get_fig.py +1 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/output.py +6 -1
- {foxes-1.4 → foxes-1.5}/foxes/output/results_writer.py +1 -1
- {foxes-1.4 → foxes-1.5}/foxes/output/rose_plot.py +10 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/rotor_point_plots.py +3 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/state_turbine_map.py +3 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/turbine_type_curves.py +3 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/dict.py +46 -34
- {foxes-1.4 → foxes-1.5}/foxes/utils/factory.py +2 -2
- {foxes-1.4 → foxes-1.5/foxes.egg-info}/PKG-INFO +32 -52
- {foxes-1.4 → foxes-1.5}/foxes.egg-info/SOURCES.txt +9 -1
- foxes-1.5/foxes.egg-info/requires.txt +37 -0
- {foxes-1.4 → foxes-1.5}/pyproject.toml +34 -54
- foxes-1.4/foxes/input/states/field_data_nc.py +0 -833
- foxes-1.4/foxes/input/states/weibull_sectors.py +0 -225
- foxes-1.4/foxes.egg-info/requires.txt +0 -58
- {foxes-1.4 → foxes-1.5}/LICENSE +0 -0
- {foxes-1.4 → foxes-1.5}/Logo_FOXES.svg +0 -0
- {foxes-1.4 → foxes-1.5}/MANIFEST.in +0 -0
- {foxes-1.4 → foxes-1.5}/examples/abl_states/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/compare_rotors_pwakes/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/compare_wakes/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/dyn_wakes/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/induction/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/multi_height/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/power_mask/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/quickstart/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/random_timeseries/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/scan_row/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/sector_management/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/sequential/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/single_state/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/states_lookup_table/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/tab_file/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/timelines/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/timeseries/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/timeseries_slurm/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/examples/wind_rose/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/farm_wakes_calc.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/point_wakes_calc.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/reorder_farm_output.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/downwind/models/set_amb_point_results.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/iterative/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/iterative/iterative.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/iterative/models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/iterative/models/convergence.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/iterative/models/farm_wakes_calc.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/iterative/models/urelax.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/sequential/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/sequential/models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/sequential/models/plugin.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/sequential/models/seq_state.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/algorithms/sequential/sequential.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/config/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/config/config.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/constants.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/axial_induction_model.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/farm_controller.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/farm_model.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/ground_model.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/partial_wakes_model.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/states.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/turbine.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/turbine_model.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/turbine_type.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/vertical_profile.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/wake_frame.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/wake_model.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/wake_superposition.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/core/wind_farm.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/farms/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/farms/test_farm_67.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/parse.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/power_ct_curves/DTU-10MW-D178d3-H119.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/power_ct_curves/IEA-15MW-D240-H150.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/power_ct_curves/IWT-7d5MW-D164-H100.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/power_ct_curves/NREL-5MW-D126-H90.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/power_ct_curves/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/WRF-Timeseries-3000.nc +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/WRF-Timeseries-4464.csv.gz +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/abl_states_6000.csv.gz +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/timeseries_100.csv.gz +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/timeseries_3000.csv.gz +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/timeseries_8000.csv.gz +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/weibull_sectors_12.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/weibull_sectors_12.nc +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/wind_rose_bremen.csv +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/wind_rotation.nc +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/states/winds100.tab +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/data/static_data.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/engines/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/engines/futures.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/engines/mpi.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/engines/multiprocess.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/engines/ray.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/from_csv.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/from_df.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/from_file.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/from_json.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/from_random.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/grid.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/ring.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/farm_layout/row.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/create/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/create/random_abl_states.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/states/create/random_timeseries.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/input/yaml/windio/read_fields.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/axial_induction/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/axial_induction/betz.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/axial_induction/madsen.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/farm_controllers/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/farm_controllers/basic.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/farm_models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/farm_models/turbine2farm.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/ground_models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/ground_models/no_ground.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/ground_models/wake_mirror.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/axiwake.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/centre.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/grid.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/rotor_points.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/segregated.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/partial_wakes/top_hat.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/point_models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/point_models/set_uniform_data.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/point_models/tke2ti.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/point_models/ustar2ti.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/point_models/wake_deltas.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/rotor_models/grid.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/rotor_models/levels.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/CpCt_file.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/CpCt_from_two.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/TBL_file.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/turbine_types/lookup.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/abl_log_neutral_ws.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/abl_log_stable_ws.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/abl_log_unstable_ws.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/abl_log_ws.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/data_profile.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/sheared_ws.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/vertical_profiles/uniform.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_deflections/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_deflections/bastankhah2016.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_deflections/jimenez.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_deflections/no_deflection.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/dynamic_wakes.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/farm_order.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/rotor_wd.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/seq_dynamic_wakes.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/streamlines.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_frames/timelines.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/axisymmetric.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/dist_sliced.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/gaussian.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/induction/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/induction/rankine_half_body.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/induction/rathmann.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/induction/self_similar.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/induction/self_similar2020.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/induction/vortex_sheet.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/ti/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/ti/crespo_hernandez.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/ti/iec_ti.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/top_hat.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/wind/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/wind/bastankhah14.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/wind/bastankhah16.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/wind/jensen.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_models/wind/turbopark.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ti_linear.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ti_max.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ti_pow.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ti_quadratic.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/wind_vector.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ws_linear.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ws_max.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ws_pow.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ws_product.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/models/wake_superpositions/ws_quadratic.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/animation.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/calc_points.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/flow_plots_2d/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/grids.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/plt.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/seq_plugins/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/seq_plugins/seq_flow_ani_plugin.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/seq_plugins/seq_wake_debug_plugin.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/slice_data.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/slices_data.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/output/state_turbine_table.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/abl/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/abl/neutral.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/abl/sheared.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/abl/stable.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/abl/unstable.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/cubic_roots.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/data_book.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/dev_utils.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/exec_python.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/__init__.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/area_geometry.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/circle.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/example_intersection.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/example_union.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/half_plane.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geom2d/polygon.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/geopandas_utils.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/load.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/pandas_utils.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/random_xy.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/regularize.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/subclasses.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/tab_files.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/two_circles.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/weibull.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/wind_dir.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/wrg_utils.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/utils/xarray_utils.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes/variables.py +0 -0
- {foxes-1.4 → foxes-1.5}/foxes.egg-info/dependency_links.txt +0 -0
- {foxes-1.4 → foxes-1.5}/foxes.egg-info/entry_points.txt +0 -0
- {foxes-1.4 → foxes-1.5}/foxes.egg-info/top_level.txt +0 -0
- {foxes-1.4 → foxes-1.5}/setup.cfg +0 -0
- {foxes-1.4 → foxes-1.5}/tests/0_consistency/iterative/test_iterative.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/0_consistency/partial_wakes/test_partial_wakes.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/PCt_files/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/PCt_files/test_PCt_files.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/abl_states/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/abl_states/test_abl_states.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/partial_top_hat/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/partial_top_hat/test_partial_top_hat.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_centre/test_row_Jensen_linear_centre.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat/test_row_Jensen_linear_tophat.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2005/test_row_Jensen_linear_tophat_IECTI_2005.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_linear_tophat_IECTI2019/test_row_Jensen_linear_tophat_IECTI_2019.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6/row_Jensen_quadratic_centre/test_row_Jensen_quadratic_centre.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6_2/grid_rotors/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6_2/grid_rotors/test_grid_rotors.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6_2/row_Bastankhah_Crespo/test_row_Bastankhah_Crespo.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/flappy/run.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/1_verification/flappy_0_6_2/row_Bastankhah_linear_centre/test_row_Bastankhah_linear_centre.py +0 -0
- {foxes-1.4 → foxes-1.5}/tests/3_examples/test_examples.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: foxes
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5
|
|
4
4
|
Summary: Farm Optimization and eXtended yield Evaluation Software
|
|
5
5
|
Author: Jonas Schulte
|
|
6
6
|
Maintainer: Jonas Schulte
|
|
@@ -36,7 +36,6 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
36
36
|
Classifier: Intended Audience :: Developers
|
|
37
37
|
Classifier: Intended Audience :: Science/Research
|
|
38
38
|
Classifier: Programming Language :: Python :: 3
|
|
39
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
40
39
|
Classifier: Programming Language :: Python :: 3.9
|
|
41
40
|
Classifier: Programming Language :: Python :: 3.10
|
|
42
41
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -45,60 +44,41 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
45
44
|
Classifier: License :: OSI Approved :: MIT License
|
|
46
45
|
Classifier: Operating System :: OS Independent
|
|
47
46
|
Classifier: Development Status :: 4 - Beta
|
|
48
|
-
Requires-Python: >=3.
|
|
47
|
+
Requires-Python: >=3.9
|
|
49
48
|
Description-Content-Type: text/markdown
|
|
50
49
|
License-File: LICENSE
|
|
51
|
-
Requires-Dist:
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
54
|
-
Requires-Dist:
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist:
|
|
58
|
-
Requires-Dist:
|
|
59
|
-
Requires-Dist:
|
|
50
|
+
Requires-Dist: cycler>=0.10
|
|
51
|
+
Requires-Dist: h5netcdf>=1.0
|
|
52
|
+
Requires-Dist: matplotlib>=3.8
|
|
53
|
+
Requires-Dist: numpy>=1.26
|
|
54
|
+
Requires-Dist: pandas>=2.0
|
|
55
|
+
Requires-Dist: pyyaml>=4.0
|
|
56
|
+
Requires-Dist: scipy>=1.12
|
|
57
|
+
Requires-Dist: tqdm>=2.0
|
|
58
|
+
Requires-Dist: xarray>=2023
|
|
60
59
|
Provides-Extra: opt
|
|
61
|
-
Requires-Dist: foxes-opt; extra == "opt"
|
|
60
|
+
Requires-Dist: foxes-opt>=0.5; extra == "opt"
|
|
62
61
|
Provides-Extra: dask
|
|
63
|
-
Requires-Dist: dask; extra == "dask"
|
|
64
|
-
Requires-Dist: distributed; extra == "dask"
|
|
65
|
-
Requires-Dist: dask-jobqueue; extra == "dask"
|
|
66
|
-
Requires-Dist: setuptools; extra == "dask"
|
|
67
|
-
Provides-Extra: eng
|
|
68
|
-
Requires-Dist: multiprocess; extra == "eng"
|
|
69
|
-
Requires-Dist: dask; extra == "eng"
|
|
70
|
-
Requires-Dist: distributed; extra == "eng"
|
|
71
|
-
Requires-Dist: dask-jobqueue; extra == "eng"
|
|
72
|
-
Requires-Dist: setuptools; extra == "eng"
|
|
73
|
-
Requires-Dist: mpi4py; extra == "eng"
|
|
74
|
-
Requires-Dist: ray; extra == "eng"
|
|
75
|
-
Provides-Extra: eng0
|
|
76
|
-
Requires-Dist: multiprocess; extra == "eng0"
|
|
77
|
-
Requires-Dist: dask; extra == "eng0"
|
|
78
|
-
Requires-Dist: distributed; extra == "eng0"
|
|
79
|
-
Requires-Dist: dask-jobqueue; extra == "eng0"
|
|
80
|
-
Requires-Dist: setuptools; extra == "eng0"
|
|
81
|
-
Requires-Dist: ray; extra == "eng0"
|
|
82
|
-
Provides-Extra: test
|
|
83
|
-
Requires-Dist: flake8; extra == "test"
|
|
84
|
-
Requires-Dist: pytest; extra == "test"
|
|
62
|
+
Requires-Dist: dask>=2022.0; extra == "dask"
|
|
63
|
+
Requires-Dist: distributed>=2022.0; extra == "dask"
|
|
64
|
+
Requires-Dist: dask-jobqueue>=0.8; extra == "dask"
|
|
65
|
+
Requires-Dist: setuptools>=61.0; extra == "dask"
|
|
85
66
|
Provides-Extra: doc
|
|
86
|
-
Requires-Dist: setuptools; extra == "doc"
|
|
87
|
-
Requires-Dist: sphinx; extra == "doc"
|
|
88
|
-
Requires-Dist: sphinx-immaterial; extra == "doc"
|
|
89
|
-
Requires-Dist: nbsphinx; extra == "doc"
|
|
90
|
-
Requires-Dist: ipykernel; extra == "doc"
|
|
91
|
-
Requires-Dist: ipywidgets; extra == "doc"
|
|
92
|
-
Requires-Dist: m2r2; extra == "doc"
|
|
93
|
-
Requires-Dist: lxml_html_clean; extra == "doc"
|
|
94
|
-
Requires-Dist: dask; extra == "doc"
|
|
95
|
-
Requires-Dist: distributed; extra == "doc"
|
|
96
|
-
Provides-Extra:
|
|
97
|
-
Requires-Dist: flake8; extra == "
|
|
98
|
-
Requires-Dist: pytest; extra == "
|
|
99
|
-
|
|
100
|
-
Requires-Dist: objsize; extra == "
|
|
101
|
-
Requires-Dist: ruff; extra == "dev"
|
|
67
|
+
Requires-Dist: setuptools>=61.0; extra == "doc"
|
|
68
|
+
Requires-Dist: sphinx>=5.0; extra == "doc"
|
|
69
|
+
Requires-Dist: sphinx-immaterial>=0.10; extra == "doc"
|
|
70
|
+
Requires-Dist: nbsphinx>=0.5; extra == "doc"
|
|
71
|
+
Requires-Dist: ipykernel>=5.0; extra == "doc"
|
|
72
|
+
Requires-Dist: ipywidgets>=5.0; extra == "doc"
|
|
73
|
+
Requires-Dist: m2r2>=0.2; extra == "doc"
|
|
74
|
+
Requires-Dist: lxml_html_clean>=0.4; extra == "doc"
|
|
75
|
+
Requires-Dist: dask>=2022.0; extra == "doc"
|
|
76
|
+
Requires-Dist: distributed>=2022.0; extra == "doc"
|
|
77
|
+
Provides-Extra: test
|
|
78
|
+
Requires-Dist: flake8>=0.1; extra == "test"
|
|
79
|
+
Requires-Dist: pytest>=7.0; extra == "test"
|
|
80
|
+
Provides-Extra: utils
|
|
81
|
+
Requires-Dist: objsize>=0.5; extra == "utils"
|
|
102
82
|
Dynamic: license-file
|
|
103
83
|
|
|
104
84
|
# Welcome to foxes
|
|
@@ -159,7 +139,7 @@ Evaluation Software"`
|
|
|
159
139
|
|
|
160
140
|
## Requirements
|
|
161
141
|
|
|
162
|
-
The supported Python versions are `Python 3.
|
|
142
|
+
The supported Python versions are `Python 3.9`...`3.13`.
|
|
163
143
|
|
|
164
144
|
## Installation
|
|
165
145
|
|
|
@@ -68,7 +68,7 @@ intersphinx_mapping = {
|
|
|
68
68
|
|
|
69
69
|
# The suffix(es) of source filenames.
|
|
70
70
|
#
|
|
71
|
-
source_suffix = {
|
|
71
|
+
source_suffix = {".rst": "restructuredtext", ".md": "restructuredtext"}
|
|
72
72
|
|
|
73
73
|
# The master toctree document.
|
|
74
74
|
master_doc = "index"
|
|
@@ -97,7 +97,7 @@ if __name__ == "__main__":
|
|
|
97
97
|
mbook.turbine_models["set_yawm"].add_var(FV.YAWM, yawm)
|
|
98
98
|
ymodels = ["set_yawm"]
|
|
99
99
|
|
|
100
|
-
states = foxes.input.states.
|
|
100
|
+
states = foxes.input.states.FieldData(
|
|
101
101
|
args.file_pattern,
|
|
102
102
|
states_coord="state",
|
|
103
103
|
x_coord="x",
|
|
@@ -108,7 +108,7 @@ if __name__ == "__main__":
|
|
|
108
108
|
var2ncvar={FV.WS: "ws", FV.WD: "wd"},
|
|
109
109
|
fixed_vars={FV.RHO: 1.225, FV.TI: 0.1},
|
|
110
110
|
load_mode=args.load_mode,
|
|
111
|
-
bounds_error=False,
|
|
111
|
+
interpn_pars=dict(bounds_error=False),
|
|
112
112
|
)
|
|
113
113
|
|
|
114
114
|
farm = foxes.WindFarm()
|
|
@@ -82,7 +82,9 @@ if __name__ == "__main__":
|
|
|
82
82
|
|
|
83
83
|
# set turbines in yaw
|
|
84
84
|
yawm = np.array([[args.yawm, args.yawm2]])
|
|
85
|
-
mbook.turbine_models["set_yawm"] = foxes.models.turbine_models.SetFarmVars(
|
|
85
|
+
mbook.turbine_models["set_yawm"] = foxes.models.turbine_models.SetFarmVars(
|
|
86
|
+
pre_rotor=True
|
|
87
|
+
)
|
|
86
88
|
mbook.turbine_models["set_yawm"].add_var(FV.YAWM, yawm)
|
|
87
89
|
|
|
88
90
|
# create states
|
|
@@ -477,7 +477,7 @@ class Downwind(Algorithm):
|
|
|
477
477
|
# 2) calculate ambient rotor results:
|
|
478
478
|
mlist.models.append(self.rotor_model)
|
|
479
479
|
calc_pars.append(calc_parameters.get(mlist.models[-1].name, {}))
|
|
480
|
-
calc_pars[-1]
|
|
480
|
+
calc_pars[-1]["store"] = True
|
|
481
481
|
|
|
482
482
|
# 3) run post-rotor turbine models via farm controller:
|
|
483
483
|
mlist.models.append(self.farm_controller)
|
|
@@ -508,7 +508,7 @@ class Downwind(Algorithm):
|
|
|
508
508
|
def _launch_parallel_farm_calc(
|
|
509
509
|
self,
|
|
510
510
|
mlist,
|
|
511
|
-
|
|
511
|
+
model_data,
|
|
512
512
|
outputs=None,
|
|
513
513
|
normalize=False,
|
|
514
514
|
**kwargs,
|
|
@@ -520,8 +520,8 @@ class Downwind(Algorithm):
|
|
|
520
520
|
----------
|
|
521
521
|
mlist: foxes.models.FarmDataModelList
|
|
522
522
|
The model list
|
|
523
|
-
|
|
524
|
-
The
|
|
523
|
+
model_data: xarray.Dataset
|
|
524
|
+
The initial model data
|
|
525
525
|
outputs: list of str, optional
|
|
526
526
|
The output variables, or None for defaults
|
|
527
527
|
normalize: bool
|
|
@@ -538,7 +538,7 @@ class Downwind(Algorithm):
|
|
|
538
538
|
"""
|
|
539
539
|
out_vars = self.farm_vars if outputs is None else outputs
|
|
540
540
|
farm_results = get_engine().run_calculation(
|
|
541
|
-
self, mlist,
|
|
541
|
+
self, mlist, model_data, out_vars=out_vars, **kwargs
|
|
542
542
|
)
|
|
543
543
|
|
|
544
544
|
if normalize:
|
|
@@ -74,17 +74,17 @@ class InitFarmData(FarmDataModel):
|
|
|
74
74
|
n_states = fdata.n_states
|
|
75
75
|
n_turbines = algo.n_turbines
|
|
76
76
|
|
|
77
|
-
#
|
|
78
|
-
fdata
|
|
79
|
-
|
|
77
|
+
# add and set X, Y, H, D:
|
|
78
|
+
fdata.add(
|
|
79
|
+
FV.TXYH,
|
|
80
|
+
np.zeros((n_states, n_turbines, 3), dtype=config.dtype_double),
|
|
81
|
+
(FC.STATE, FC.TURBINE, FC.XYH),
|
|
82
|
+
)
|
|
83
|
+
fdata.add(
|
|
84
|
+
FV.D,
|
|
85
|
+
np.zeros((n_states, n_turbines), dtype=config.dtype_double),
|
|
86
|
+
(FC.STATE, FC.TURBINE),
|
|
80
87
|
)
|
|
81
|
-
fdata.dims[FV.TXYH] = (FC.STATE, FC.TURBINE, FC.XYH)
|
|
82
|
-
for i, v in enumerate([FV.X, FV.Y, FV.H]):
|
|
83
|
-
fdata[v] = fdata[FV.TXYH][..., i]
|
|
84
|
-
fdata.dims[v] = (FC.STATE, FC.TURBINE)
|
|
85
|
-
|
|
86
|
-
# set X, Y, H, D:
|
|
87
|
-
fdata[FV.D] = np.zeros((n_states, n_turbines), dtype=config.dtype_double)
|
|
88
88
|
for ti, t in enumerate(algo.farm.turbines):
|
|
89
89
|
if len(t.xy.shape) == 1:
|
|
90
90
|
fdata[FV.TXYH][:, ti, :2] = t.xy[None, :]
|
|
@@ -103,34 +103,64 @@ class InitFarmData(FarmDataModel):
|
|
|
103
103
|
D = algo.farm_controller.turbine_types[ti].D
|
|
104
104
|
fdata[FV.D][:, ti] = D
|
|
105
105
|
|
|
106
|
-
# calc WD
|
|
106
|
+
# calc WD at rotor centres:
|
|
107
107
|
svrs = algo.states.output_point_vars(algo)
|
|
108
108
|
tdata = TData.from_points(points=fdata[FV.TXYH], variables=svrs)
|
|
109
109
|
sres = algo.states.calculate(algo, mdata, fdata, tdata)
|
|
110
|
-
fdata
|
|
110
|
+
fdata.add(
|
|
111
|
+
FV.WD,
|
|
112
|
+
sres[FV.WD][:, :, 0],
|
|
113
|
+
(FC.STATE, FC.TURBINE),
|
|
114
|
+
)
|
|
115
|
+
fdata.add(
|
|
116
|
+
FV.AMB_WD,
|
|
117
|
+
fdata[FV.WD].copy(),
|
|
118
|
+
(FC.STATE, FC.TURBINE),
|
|
119
|
+
)
|
|
111
120
|
del tdata, sres, svrs
|
|
112
121
|
|
|
113
|
-
# calculate
|
|
122
|
+
# calculate downwind order:
|
|
114
123
|
order = algo.wake_frame.calc_order(algo, mdata, fdata)
|
|
115
124
|
ssel = np.zeros_like(order)
|
|
116
125
|
ssel[:] = np.arange(n_states)[:, None]
|
|
117
|
-
fdata[FV.ORDER] = order
|
|
118
|
-
fdata[FV.ORDER_SSEL] = ssel
|
|
119
|
-
fdata[FV.ORDER_INV] = np.zeros_like(order)
|
|
120
|
-
fdata[FV.ORDER_INV][ssel, order] = np.arange(n_turbines)[None, :]
|
|
121
126
|
|
|
122
127
|
# apply downwind order to all data:
|
|
123
|
-
|
|
128
|
+
for data in [fdata, mdata]:
|
|
129
|
+
for k in data.keys():
|
|
130
|
+
if (
|
|
131
|
+
k not in [FV.X, FV.Y, FV.H]
|
|
132
|
+
and tuple(data.dims[k][:2]) == (FC.STATE, FC.TURBINE)
|
|
133
|
+
and np.any(data[k] != data[k][0, 0, None, None])
|
|
134
|
+
):
|
|
135
|
+
data[k][:] = data[k][ssel, order]
|
|
136
|
+
|
|
137
|
+
# add derived data:
|
|
124
138
|
for i, v in enumerate([FV.X, FV.Y, FV.H]):
|
|
125
|
-
fdata
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
)
|
|
134
|
-
|
|
139
|
+
fdata.add(
|
|
140
|
+
v,
|
|
141
|
+
fdata[FV.TXYH][:, :, i],
|
|
142
|
+
(FC.STATE, FC.TURBINE),
|
|
143
|
+
)
|
|
144
|
+
fdata.add(
|
|
145
|
+
FV.YAW,
|
|
146
|
+
fdata[FV.WD].copy(),
|
|
147
|
+
(FC.STATE, FC.TURBINE),
|
|
148
|
+
)
|
|
149
|
+
fdata.add(
|
|
150
|
+
FV.ORDER,
|
|
151
|
+
order,
|
|
152
|
+
(FC.STATE, FC.TURBINE),
|
|
153
|
+
)
|
|
154
|
+
fdata.add(
|
|
155
|
+
FV.ORDER_SSEL,
|
|
156
|
+
ssel,
|
|
157
|
+
(FC.STATE, FC.TURBINE),
|
|
158
|
+
)
|
|
159
|
+
fdata.add(
|
|
160
|
+
FV.ORDER_INV,
|
|
161
|
+
np.zeros_like(order),
|
|
162
|
+
(FC.STATE, FC.TURBINE),
|
|
163
|
+
)
|
|
164
|
+
fdata[FV.ORDER_INV][ssel, order] = np.arange(n_turbines)[None, :]
|
|
135
165
|
|
|
136
166
|
return {v: fdata[v] for v in self.output_farm_vars(algo)}
|
|
@@ -63,8 +63,8 @@ class Algorithm(Model):
|
|
|
63
63
|
self.__farm = farm
|
|
64
64
|
self.__mbook = mbook
|
|
65
65
|
self.__dbook = StaticData() if dbook is None else dbook
|
|
66
|
-
self.__idata_mem = Dict(
|
|
67
|
-
self.__chunk_store = Dict(
|
|
66
|
+
self.__idata_mem = Dict(_name="idata_mem")
|
|
67
|
+
self.__chunk_store = Dict(_name="chunk_store")
|
|
68
68
|
|
|
69
69
|
if len(engine_pars):
|
|
70
70
|
if "engine_type" in engine_pars:
|
|
@@ -558,7 +558,7 @@ class Algorithm(Model):
|
|
|
558
558
|
"n_states": n_states,
|
|
559
559
|
"n_targets": n_targets,
|
|
560
560
|
},
|
|
561
|
-
|
|
561
|
+
_name=f"chunk_store_{i0}_{t0}",
|
|
562
562
|
)
|
|
563
563
|
|
|
564
564
|
self.chunk_store[key][name] = data.copy() if copy else data
|
|
@@ -638,11 +638,11 @@ class Algorithm(Model):
|
|
|
638
638
|
"""
|
|
639
639
|
chunk_store = self.chunk_store
|
|
640
640
|
if new_chunk_store is None:
|
|
641
|
-
self.__chunk_store = Dict(
|
|
641
|
+
self.__chunk_store = Dict(_name="chunk_store")
|
|
642
642
|
elif isinstance(new_chunk_store, Dict):
|
|
643
643
|
self.__chunk_store = new_chunk_store
|
|
644
644
|
else:
|
|
645
|
-
self.__chunk_store = Dict(
|
|
645
|
+
self.__chunk_store = Dict(_name="chunk_store")
|
|
646
646
|
self.__chunk_store.update(new_chunk_store)
|
|
647
647
|
return chunk_store
|
|
648
648
|
|
|
@@ -53,7 +53,7 @@ class Data(Dict):
|
|
|
53
53
|
The data container name
|
|
54
54
|
|
|
55
55
|
"""
|
|
56
|
-
super().__init__(
|
|
56
|
+
super().__init__(_name=name)
|
|
57
57
|
|
|
58
58
|
self.update(data)
|
|
59
59
|
self.dims = dims
|
|
@@ -109,12 +109,12 @@ class Data(Dict):
|
|
|
109
109
|
or the corresponding index
|
|
110
110
|
|
|
111
111
|
"""
|
|
112
|
-
if
|
|
113
|
-
return None
|
|
114
|
-
elif counter:
|
|
112
|
+
if counter:
|
|
115
113
|
if self.__states_i0 is None:
|
|
116
114
|
raise KeyError(f"Data '{self.name}': states_i0 requested but not set")
|
|
117
115
|
return self.__states_i0
|
|
116
|
+
elif FC.STATE not in self:
|
|
117
|
+
return None
|
|
118
118
|
else:
|
|
119
119
|
return self[FC.STATE][0]
|
|
120
120
|
|
|
@@ -394,6 +394,74 @@ class FData(Data):
|
|
|
394
394
|
f"FData '{self.name}': Missing '{x}' in sizes, got {sorted(list(self.sizes.keys()))}"
|
|
395
395
|
)
|
|
396
396
|
|
|
397
|
+
@classmethod
|
|
398
|
+
def from_sizes(cls, n_states, n_turbines, *args, callback=None, **kwargs):
|
|
399
|
+
"""
|
|
400
|
+
Create Data object from model data
|
|
401
|
+
|
|
402
|
+
Parameters
|
|
403
|
+
----------
|
|
404
|
+
n_states: int
|
|
405
|
+
The number of states
|
|
406
|
+
n_turbines: int
|
|
407
|
+
The number of turbines
|
|
408
|
+
args: tuple, optional
|
|
409
|
+
Additional parameters for the constructor
|
|
410
|
+
callback: Function, optional
|
|
411
|
+
Function f(data, dims) that manipulates
|
|
412
|
+
the data and dims dicts before construction
|
|
413
|
+
kwargs: dict, optional
|
|
414
|
+
Additional parameters for the constructor
|
|
415
|
+
|
|
416
|
+
Returns
|
|
417
|
+
-------
|
|
418
|
+
data: Data
|
|
419
|
+
The data object
|
|
420
|
+
|
|
421
|
+
"""
|
|
422
|
+
data = cls(*args, **kwargs)
|
|
423
|
+
data.sizes[FC.STATE] = n_states
|
|
424
|
+
data.sizes[FC.TURBINE] = n_turbines
|
|
425
|
+
|
|
426
|
+
if callback is not None:
|
|
427
|
+
callback(data, data.dims)
|
|
428
|
+
|
|
429
|
+
return data
|
|
430
|
+
|
|
431
|
+
@classmethod
|
|
432
|
+
def from_mdata(cls, mdata, *args, callback=None, **kwargs):
|
|
433
|
+
"""
|
|
434
|
+
Create Data object from model data
|
|
435
|
+
|
|
436
|
+
Parameters
|
|
437
|
+
----------
|
|
438
|
+
mdata: MData
|
|
439
|
+
The model data
|
|
440
|
+
args: tuple, optional
|
|
441
|
+
Additional parameters for the constructor
|
|
442
|
+
callback: Function, optional
|
|
443
|
+
Function f(data, dims) that manipulates
|
|
444
|
+
the data and dims dicts before construction
|
|
445
|
+
kwargs: dict, optional
|
|
446
|
+
Additional parameters for the constructor
|
|
447
|
+
|
|
448
|
+
Returns
|
|
449
|
+
-------
|
|
450
|
+
data: Data
|
|
451
|
+
The data object
|
|
452
|
+
|
|
453
|
+
"""
|
|
454
|
+
data = cls(*args, **kwargs)
|
|
455
|
+
for v in [FC.STATE, FC.TURBINE]:
|
|
456
|
+
data[v] = mdata[v]
|
|
457
|
+
data.dims[v] = mdata.dims[v]
|
|
458
|
+
data.sizes[v] = mdata.sizes[v]
|
|
459
|
+
|
|
460
|
+
if callback is not None:
|
|
461
|
+
callback(data, data.dims)
|
|
462
|
+
|
|
463
|
+
return data
|
|
464
|
+
|
|
397
465
|
@classmethod
|
|
398
466
|
def from_dataset(cls, ds, *args, mdata=None, callback=None, **kwargs):
|
|
399
467
|
"""
|
|
@@ -427,6 +495,9 @@ class FData(Data):
|
|
|
427
495
|
if FC.STATE not in data:
|
|
428
496
|
data[FC.STATE] = mdata[FC.STATE]
|
|
429
497
|
dims[FC.STATE] = mdata.dims[FC.STATE]
|
|
498
|
+
if FC.TURBINE not in data:
|
|
499
|
+
data[FC.TURBINE] = mdata[FC.TURBINE]
|
|
500
|
+
dims[FC.TURBINE] = mdata.dims[FC.TURBINE]
|
|
430
501
|
if callback is not None:
|
|
431
502
|
callback(data, dims)
|
|
432
503
|
|
|
@@ -45,8 +45,10 @@ class DataCalcModel(Model):
|
|
|
45
45
|
----------
|
|
46
46
|
algo: foxes.core.Algorithm
|
|
47
47
|
The calculation algorithm
|
|
48
|
-
data: tuple of foxes.core.Data
|
|
49
|
-
The input data
|
|
48
|
+
data: tuple of foxes.core.Data, optional
|
|
49
|
+
The input data, typically either (mdata, fdata) in
|
|
50
|
+
the case of farm calculations, or (mdata, fdata, tdata)
|
|
51
|
+
for point data calculations
|
|
50
52
|
parameters: dict, optional
|
|
51
53
|
The calculation parameters
|
|
52
54
|
|
|
@@ -6,7 +6,6 @@ from xarray import Dataset
|
|
|
6
6
|
|
|
7
7
|
from .data import MData, FData, TData
|
|
8
8
|
from foxes.utils import new_instance
|
|
9
|
-
from foxes.config import config
|
|
10
9
|
import foxes.constants as FC
|
|
11
10
|
|
|
12
11
|
__global_engine_data__ = dict(
|
|
@@ -350,8 +349,9 @@ class Engine(ABC):
|
|
|
350
349
|
|
|
351
350
|
Returns
|
|
352
351
|
-------
|
|
353
|
-
data:
|
|
354
|
-
|
|
352
|
+
data: tuple of foxes.core.Data
|
|
353
|
+
The input data for the chunk calculation,
|
|
354
|
+
either (mdata, fdata) or (mdata, fdata, tdata)
|
|
355
355
|
|
|
356
356
|
"""
|
|
357
357
|
# prepare:
|
|
@@ -370,51 +370,37 @@ class Engine(ABC):
|
|
|
370
370
|
)
|
|
371
371
|
|
|
372
372
|
# create fdata:
|
|
373
|
-
if
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
373
|
+
if farm_data is not None:
|
|
374
|
+
fdata = FData.from_dataset(
|
|
375
|
+
farm_data,
|
|
376
|
+
mdata=mdata,
|
|
377
|
+
s_states=s_states,
|
|
378
|
+
callback=None,
|
|
379
|
+
states_i0=i0_states,
|
|
380
|
+
copy=True,
|
|
381
|
+
)
|
|
383
382
|
else:
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
s_states=s_states,
|
|
389
|
-
callback=cb,
|
|
390
|
-
states_i0=i0_states,
|
|
391
|
-
copy=True,
|
|
392
|
-
)
|
|
383
|
+
fdata = FData.from_mdata(
|
|
384
|
+
mdata=mdata,
|
|
385
|
+
states_i0=i0_states,
|
|
386
|
+
)
|
|
393
387
|
|
|
394
388
|
# create tdata:
|
|
395
|
-
tdata =
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
def cb(data, dims):
|
|
399
|
-
n_states = i1_states - i0_states
|
|
400
|
-
n_targets = i1_targets - i0_targets
|
|
401
|
-
for o in set(out_vars).difference(data.keys()):
|
|
402
|
-
data[o] = np.full(
|
|
403
|
-
(n_states, n_targets, 1), np.nan, dtype=config.dtype_double
|
|
404
|
-
)
|
|
405
|
-
dims[o] = (FC.STATE, FC.TARGET, FC.TPOINT)
|
|
406
|
-
|
|
407
|
-
tdata = TData.from_dataset(
|
|
389
|
+
tdata = (
|
|
390
|
+
TData.from_dataset(
|
|
408
391
|
point_data,
|
|
409
392
|
mdata=mdata,
|
|
410
393
|
s_states=s_states,
|
|
411
394
|
s_targets=s_targets,
|
|
412
|
-
callback=
|
|
395
|
+
callback=None,
|
|
413
396
|
states_i0=i0_states,
|
|
414
397
|
copy=True,
|
|
415
398
|
)
|
|
399
|
+
if point_data is not None
|
|
400
|
+
else None
|
|
401
|
+
)
|
|
416
402
|
|
|
417
|
-
return
|
|
403
|
+
return (mdata, fdata) if tdata is None else (mdata, fdata, tdata)
|
|
418
404
|
|
|
419
405
|
def combine_results(
|
|
420
406
|
self,
|
|
@@ -535,7 +521,14 @@ class Engine(ABC):
|
|
|
535
521
|
)
|
|
536
522
|
|
|
537
523
|
@abstractmethod
|
|
538
|
-
def run_calculation(
|
|
524
|
+
def run_calculation(
|
|
525
|
+
self,
|
|
526
|
+
algo,
|
|
527
|
+
model,
|
|
528
|
+
model_data=None,
|
|
529
|
+
farm_data=None,
|
|
530
|
+
point_data=None,
|
|
531
|
+
):
|
|
539
532
|
"""
|
|
540
533
|
Runs the model calculation
|
|
541
534
|
|
|
@@ -543,12 +536,12 @@ class Engine(ABC):
|
|
|
543
536
|
----------
|
|
544
537
|
algo: foxes.core.Algorithm
|
|
545
538
|
The algorithm object
|
|
546
|
-
model: foxes.core.DataCalcModel
|
|
539
|
+
model: foxes.core.DataCalcModel, optional
|
|
547
540
|
The model that whose calculate function
|
|
548
541
|
should be run
|
|
549
542
|
model_data: xarray.Dataset
|
|
550
543
|
The initial model data
|
|
551
|
-
farm_data: xarray.Dataset
|
|
544
|
+
farm_data: xarray.Dataset, optional
|
|
552
545
|
The initial farm data
|
|
553
546
|
point_data: xarray.Dataset, optional
|
|
554
547
|
The initial point data
|
|
@@ -66,28 +66,29 @@ class FarmDataModel(DataCalcModel):
|
|
|
66
66
|
"""
|
|
67
67
|
return (FC.STATE, FC.TURBINE)
|
|
68
68
|
|
|
69
|
-
def
|
|
69
|
+
def ensure_output_vars(self, algo, fdata):
|
|
70
70
|
"""
|
|
71
|
-
|
|
71
|
+
Ensures that the output variables are present in the farm data.
|
|
72
72
|
|
|
73
73
|
Parameters
|
|
74
74
|
----------
|
|
75
75
|
algo: foxes.core.Algorithm
|
|
76
76
|
The calculation algorithm
|
|
77
|
-
|
|
78
|
-
The model data
|
|
79
|
-
fdata: foxes.core.Data
|
|
77
|
+
fdata: foxes.core.FData
|
|
80
78
|
The farm data
|
|
81
79
|
|
|
82
80
|
"""
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
for var in self.output_farm_vars(algo):
|
|
82
|
+
if var not in fdata:
|
|
83
|
+
fdata.add(
|
|
84
|
+
var,
|
|
85
|
+
np.full(
|
|
86
|
+
(fdata.n_states, fdata.n_turbines),
|
|
87
|
+
np.nan,
|
|
88
|
+
dtype=config.dtype_double,
|
|
89
|
+
),
|
|
90
|
+
(FC.STATE, FC.TURBINE),
|
|
89
91
|
)
|
|
90
|
-
fdata.dims[v] = (FC.STATE, FC.TURBINE)
|
|
91
92
|
|
|
92
93
|
@abstractmethod
|
|
93
94
|
def calculate(self, algo, mdata, fdata):
|
|
@@ -264,7 +265,7 @@ class FarmDataModelList(FarmDataModel):
|
|
|
264
265
|
The model data
|
|
265
266
|
fdata: foxes.core.FData
|
|
266
267
|
The farm data
|
|
267
|
-
parameters: list of dict
|
|
268
|
+
parameters: list of dict
|
|
268
269
|
A list of parameter dicts, one for each model
|
|
269
270
|
|
|
270
271
|
Returns
|
|
@@ -274,6 +275,8 @@ class FarmDataModelList(FarmDataModel):
|
|
|
274
275
|
Values: numpy.ndarray with shape (n_states, n_turbines)
|
|
275
276
|
|
|
276
277
|
"""
|
|
278
|
+
self.ensure_output_vars(algo, fdata)
|
|
279
|
+
|
|
277
280
|
if parameters is None:
|
|
278
281
|
parameters = [{}] * len(self.models)
|
|
279
282
|
elif not isinstance(parameters, list):
|