You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And issue (#833) was raised which was caused by a change in the dimensions of Farm.hub_heights during the Farm.finalize() call. Essentially, some attributes which might be expected to have a single dimension of length n_turbines are "finalized" with dimensions (n_findex x n_turbines). The following code demonstrates this change:
importnumpyasnpfromflorisimportFlorisModelfmodel=FlorisModel("inputs/gch.yaml")
# Before run(), hub_heights has the same dimensions as the layoutfmodel.set(layout_x=[0, 500.0], layout_y=[0.0, 0.0])
fmodel.set(wind_directions=np.array([270.0, 270.0, 270.0, 270.0]),
wind_speeds=[8.0, 8.0, 10.0, 10.0],
turbulence_intensities=np.array([0.06, 0.06, 0.06, 0.06]))
print("Prior to run():", fmodel.core.farm.hub_heights.shape)
# After run(), the dimensions of hub_heights have been expandedfmodel.run()
print("After run():", fmodel.core.farm.hub_heights.shape)
Under the hood, FLORIS is using a _sorted version of hub_heights that does need to have shape (n_findex, n_turbines). However, as far as I can tell, there is no need for the "unsorted" hub_heights to also take that shape.
For simplicity, I suggest we keep any ("unsorted") attribute that is not obviously related to the number of conditions being evaluated to length n_turbines. This affects:
rotor_diameters
possibly turbine_type_map (as long as the _sorted version is used suitably).
any others?
The text was updated successfully, but these errors were encountered:
And issue (#833) was raised which was caused by a change in the dimensions of
Farm.hub_heights
during theFarm.finalize()
call. Essentially, some attributes which might be expected to have a single dimension of lengthn_turbines
are "finalized" with dimensions (n_findex
xn_turbines
). The following code demonstrates this change:Under the hood, FLORIS is using a
_sorted
version ofhub_heights
that does need to have shape(n_findex, n_turbines)
. However, as far as I can tell, there is no need for the "unsorted"hub_heights
to also take that shape.For simplicity, I suggest we keep any ("unsorted") attribute that is not obviously related to the number of conditions being evaluated to length
n_turbines
. This affects:rotor_diameters
turbine_type_map
(as long as the_sorted
version is used suitably).The text was updated successfully, but these errors were encountered: