-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add utilities for floris models #839
Conversation
# Conflicts: # floris/core/core.py
# Conflicts: # examples/01_opening_floris_computing_power.py # examples/02_visualizations.py # examples/03_making_adjustments.py # examples/04_sweep_wind_directions.py # examples/32_plot_velocity_deficit_profiles.py # floris/floris_model.py # floris/flow_visualization.py # floris/layout_functions.py # floris/layout_visualization.py # floris/tools/__init__.py # floris/tools/visualization.py # floris/uncertainty_interface.py # floris/visualization.py # tests/floris_model_integration_test.py
# Conflicts: # floris/floris_model.py # floris/flow_visualization.py
# Conflicts: # floris/floris_model.py # floris/flow_visualization.py # tests/floris_model_integration_test.py
I'm going to wait to review until #830 is in to simplify the comparison? |
@paulf81 I think v4 branch needs to be merged into this one. |
That's it, somehow I'm not managing to merge in v4, I keep hitting errors. But since this PR is just adding two new files I just quit and started a new pull request off of a more current v4 to avoid the problems. Closing this one in favor of #840 |
Add utilities for floris models
(Note this will be easier to read when API changes merged to v4)
Previously, we added to flasc a set of utilities to make convenient the changing of FLORIS parameters within the nested dictionary structure. This pull request moves them to FLORIS as they could have uses beyond SCADA comparisons, matching the pattern we set up in PR #805
Originally I had planned to add these to utilities.py, but this creates a circular import since several of the functions accept and return a FlorisModel. So created the files:
floris_model_utils.py
floris_model_utils_test.py
Created tests to confirm correct behaviors. Last item could be if we wanted to provide a convenience function that sets certain parameters without their parents in the case they appear only once in the dictionary. But this a little bit violates the spirit of explicitness seen elsewhere.
A function to print the dictionary in a nice, indented way is provided.