Skip to content

Bug fix: Finalize Farm attributes#665

Merged
rafmudaf merged 5 commits intoNatLabRockies:developfrom
rafmudaf:farm_cleanup
Jul 6, 2023
Merged

Bug fix: Finalize Farm attributes#665
rafmudaf merged 5 commits intoNatLabRockies:developfrom
rafmudaf:farm_cleanup

Conversation

@rafmudaf
Copy link
Copy Markdown
Collaborator

@rafmudaf rafmudaf commented Jun 1, 2023

Finalize Farm attributes and other Farm clean up

This pull request finalized three attributes on the Farm class:

Farm.ref_density_cp_cts
Farm.ref_tilt_cp_cts
Farm.correct_cp_ct_for_tilt

Currently, these are created when the Farm attributes are expanded using the Farm.construct_* methods. However, these particular attributes are initially 1D with the length being the number of turbines. After the wake calculation, they must be expanded again via Farm.finalize() so that they have the three dimensions expected by the post-processing routines in Turbine, that is (n wind directions, n wind speeds, n turbines).

Thanks to @MarcusBecker-GitHub for reporting this bug in #664.

Additionally, this pull request declares some Farm-class attributes that were otherwise added to the class after init. The attributes are also grouped into whether they have a corresponding _sorted version.

Related issue

#664

Impacted areas of the software

Only changes are in farm.py

Additional supporting information

Since this is a bug, it could be released as v3.4.1 along with #663.

@rafmudaf rafmudaf added the bug Something isn't working label Jun 1, 2023
@rafmudaf rafmudaf requested a review from bayc June 1, 2023 15:44
@rafmudaf rafmudaf self-assigned this Jun 1, 2023
@rafmudaf
Copy link
Copy Markdown
Collaborator Author

rafmudaf commented Jul 3, 2023

ping @bayc - I think this PR is good, but I'd like to get your eyes on it to double check

@rafmudaf rafmudaf added this to the v3.5 milestone Jul 6, 2023
@rafmudaf rafmudaf merged commit 9c73a41 into NatLabRockies:develop Jul 6, 2023
@rafmudaf rafmudaf deleted the farm_cleanup branch July 6, 2023 15:10
rafmudaf added a commit that referenced this pull request Jul 27, 2023
* Arrange attribute declarations by shape and sort

* Add missing attribute declarations

* Remove unused attribute

* Add comments requesting more info

* Bug fix: unsort arrays
rafmudaf added a commit to rafmudaf/floris that referenced this pull request Jul 27, 2023
* Arrange attribute declarations by shape and sort

* Add missing attribute declarations

* Remove unused attribute

* Add comments requesting more info

* Bug fix: unsort arrays

Update version to v3.4.1
@rafmudaf rafmudaf mentioned this pull request Oct 26, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant