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

Fixing datatype of value in WindData objects #872

Merged
merged 1 commit into from Apr 5, 2024

Conversation

ejsimley
Copy link
Collaborator

@ejsimley ejsimley commented Apr 5, 2024

Bug fix: setting value as a float in WindData objects and removing a warning when computing AVP

This PR fixes two small issues related to the WindData value array.

  • First, when wind speeds were defined as integers when creating a WindData object, the values array resulting from calling the WindData assign_value_piecewise_linear method would also be integers. Since we want values to be able to take non-integer values, dtype=float is now added when assigning values.
  • Second, in get_farm_AVP in floris_model.py, a warning about values being treated as 1 was printed when the WindData attribute in the floris model was a TimeSeries object. However, TimeSeries objects have a value array, so this warning isn't necessary. Now it only prints the warning when the floris model has no WindData attribute.

@ejsimley ejsimley added bug Something isn't working v4 Focus of FLORIS v4 labels Apr 5, 2024
@ejsimley ejsimley requested a review from paulf81 April 5, 2024 19:47
Copy link
Collaborator

@paulf81 paulf81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks Eric!

@ejsimley ejsimley merged commit 3c24a9c into NREL:v4 Apr 5, 2024
8 checks passed
@ejsimley ejsimley deleted the bugfix/set_value_as_float branch April 5, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v4 Focus of FLORIS v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants