Skip to content

Commit 6caf852

Browse files
Birgit SchachlerBirgit Schachler
authored andcommitted
Bug fix modelchain
1 parent 12c2512 commit 6caf852

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

windpowerlib/modelchain.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def rho_hub(self, weather, data_height):
175175
else:
176176
logging.info('Wrong value: `temperature_model` must be gradient ' +
177177
'or interpolation.')
178+
sys.exit()
178179
# Calculation of density in kg/m³ at hub height
179180
if self.rho_model == 'barometric':
180181
logging.debug('Calculating density using barometric height eq.')
@@ -191,6 +192,7 @@ def rho_hub(self, weather, data_height):
191192
else:
192193
logging.info('Wrong value: `rho_model` must be barometric ' +
193194
'or ideal_gas.')
195+
sys.exit()
194196
return rho_hub
195197

196198
def v_wind_hub(self, weather, data_height):
@@ -229,7 +231,7 @@ def v_wind_hub(self, weather, data_height):
229231
# Calculation of wind speed in m/s at hub height.
230232
elif self.wind_model == 'logarithmic':
231233
logging.debug('Calculating v_wind using logarithmic wind profile.')
232-
if weather['v_wind_2'] is None:
234+
if weather['v_wind_2'].isnull().all():
233235
v_wind = wind_speed.logarithmic_wind_profile(
234236
weather['v_wind'], data_height['v_wind'],
235237
self.wind_turbine.hub_height,

0 commit comments

Comments
 (0)