[BUGFIX] Warn users if the turbine_type
is set without setting reference_wind_height
#1000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces #809 to address #806. When a
FlorisModel
is instantiated using an input wind file that has areference_wind_height: -1
, the hub height of the specified turbine model is used as the reference wind height. However, if theturbine_type
is subsequently changed, the reference wind height is not updated to match. This PR adds a warning that is raised ifturbine_type
is set without also setting thereference_wind_height
.The following script demonstrates this update. Prior to the fix, the following code runs without raising any warnings:
producing
After the bugfix, the output is instead:
TODO:
UncertainFlorisModel
andParFlorisModel
(other warnings are also raised due to reinstantiation of the underlyingfmodel_expanded
withUncertainFlorisModel
, but this is acceptable)