@@ -2600,8 +2600,8 @@ def _getBoxesParamsForFF(self, lowbts, highbts, dt_low_desired, D, HubHt, xWT, y
26002600 # --- High-res location per turbine
26012601 X0_desired = np .asarray (xWT )- LX_High / 2 # high-res is centered on turbine location
26022602 Y0_desired = np .asarray (yt )- LY_High / 2 # high-res is centered on turbine location
2603- X0_High = X0_Low + np . floor (( X0_desired - X0_Low )/ dX_High ) * dX_High
2604- Y0_High = Y0_Low + np . floor (( Y0_desired - Y0_Low )/ dY_High ) * dY_High
2603+ X0_High = X0_Low + ( X0_desired - X0_Low )/ dX_High * dX_High # removed np.floor because it would prevent turbines being centered
2604+ Y0_High = Y0_Low + ( Y0_desired - Y0_Low )/ dY_High * dY_High # removed np.floor because it would prevent turbines being centered
26052605
26062606 if self .verbose > 2 :
26072607 print (f' Low Box \t \t High box ' )
@@ -2648,19 +2648,20 @@ def _getBoxesParamsForFF(self, lowbts, highbts, dt_low_desired, D, HubHt, xWT, y
26482648 d ['U_mean_Low' ] = meanU_Low
26492649 d ['U_mean_High' ] = meanU_High
26502650
2651-
2651+
2652+ # Commenting this for now: it was creating problems when the turbine is not exactly centered in the high-res box so I removed the np.floor
26522653 # --- Sanity check: check that the high res is at "almost" an integer location
2653- X_rel = (np .array (d ['X0_High' ])- d ['X0_Low' ])/ d ['dX_High' ]
2654- Y_rel = (np .array (d ['Y0_High' ])- d ['Y0_Low' ])/ d ['dY_High' ]
2655- dX = X_rel - np .round (X_rel ) # Should be close to zero
2656- dY = Y_rel - np .round (Y_rel ) # Should be close to zero
2654+ # X_rel = (np.array(d['X0_High'])-d['X0_Low'])/d['dX_High']
2655+ # Y_rel = (np.array(d['Y0_High'])-d['Y0_Low'])/d['dY_High']
2656+ # dX = X_rel - np.round(X_rel) # Should be close to zero
2657+ # dY = Y_rel - np.round(Y_rel) # Should be close to zero
26572658
2658- if any (abs (dX )> 1e-3 ):
2659- print ('Deltas:' ,dX )
2660- raise Exception ('Some X0_High are not on an integer multiple of the high-res grid' )
2661- if any (abs (dY )> 1e-3 ):
2662- print ('Deltas:' ,dY )
2663- raise Exception ('Some Y0_High are not on an integer multiple of the high-res grid' )
2659+ # if any(abs(dX)>1e-3):
2660+ # print('Deltas:',dX)
2661+ # raise Exception('Some X0_High are not on an integer multiple of the high-res grid')
2662+ # if any(abs(dY)>1e-3):
2663+ # print('Deltas:',dY)
2664+ # raise Exception('Some Y0_High are not on an integer multiple of the high-res grid')
26642665
26652666 return d
26662667
0 commit comments