Skip to content

Add utilities for floris models#839

Closed
paulf81 wants to merge 40 commits into
NatLabRockies:v4from
paulf81:feature/floris_model_utils
Closed

Add utilities for floris models#839
paulf81 wants to merge 40 commits into
NatLabRockies:v4from
paulf81:feature/floris_model_utils

Conversation

@paulf81

@paulf81 paulf81 commented Mar 12, 2024

Copy link
Copy Markdown
Collaborator

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 requested review from bayc, misi9170 and rafmudaf March 12, 2024 18:50
@paulf81 paulf81 self-assigned this Mar 12, 2024
@misi9170

Copy link
Copy Markdown
Collaborator

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

@paulf81

paulf81 commented Mar 13, 2024

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
Collaborator

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

@paulf81

paulf81 commented Mar 13, 2024

Copy link
Copy Markdown
Collaborator Author

@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