Skip to content
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

Closed
wants to merge 40 commits into from

Conversation

paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Mar 12, 2024

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.

rafmudaf and others added 30 commits March 5, 2024 11:06
# 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
@paulf81 paulf81 added the v4 Focus of FLORIS v4 label Mar 12, 2024
@paulf81 paulf81 added this to the v4.0 milestone Mar 12, 2024
@paulf81 paulf81 self-assigned this Mar 12, 2024
@misi9170
Copy link
Collaborator

I'm going to wait to review until #830 is in to simplify the comparison?

@paulf81
Copy link
Collaborator Author

paulf81 commented Mar 13, 2024

It's funny @misi9170 , I think this should now be simpler following the merge of #830 but it hasn't refreshed or something?

@rafmudaf
Copy link
Collaborator

@paulf81 I think v4 branch needs to be merged into this one.

@paulf81
Copy link
Collaborator Author

paulf81 commented Mar 13, 2024

@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

@paulf81 paulf81 closed this Mar 13, 2024
@paulf81 paulf81 deleted the feature/floris_model_utils branch March 13, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 Focus of FLORIS v4
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants