One way of instantiating a ParFlorisModel is to pass in an instantiated FlorisModel. However, as is, if there are any control setpoints (yaw_angles, ...) that had already been set on the instantiated FlorisModel, they were dropped on instantiation of the ParFlorisModel. Similarly, wind_data was not copied over correctly.
A workaround is to only set() control setpoints and wind data after instantiating the ParFlorisModel; however, this is not immediately obvious to the user. Instead, this PR fixes the bug. In particular, the following code
produces [[0. 0. 0.]] and None prior to the bugfix; while producing [[20. 10. 0.]] and <floris.wind_data.TimeSeries object at 0x12f93e9f0>, as expected, with the fix.
One way of instantiating a
ParFlorisModel
is to pass in an instantiatedFlorisModel
. However, as is, if there are any control setpoints (yaw_angles
, ...) that had already been set on the instantiatedFlorisModel
, they were dropped on instantiation of theParFlorisModel
. Similarly,wind_data
was not copied over correctly.A workaround is to only
set()
control setpoints and wind data after instantiating theParFlorisModel
; however, this is not immediately obvious to the user. Instead, this PR fixes the bug. In particular, the following codeproduces
[[0. 0. 0.]]
andNone
prior to the bugfix; while producing[[20. 10. 0.]]
and<floris.wind_data.TimeSeries object at 0x12f93e9f0>
, as expected, with the fix.