Skip to content

Commit f15e863

Browse files
committed
Delete use of temperature_interpol() in rho_hub()
1 parent 905c496 commit f15e863

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

windpowerlib/modelchain.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,21 +147,11 @@ def rho_hub(self, weather, data_height):
147147
logging.debug('Using given temperature at hub height.')
148148
temp_hub = temp_air_closest
149149
# Calculation of temperature in K at hub height.
150-
elif self.temperature_model == 'gradient':
150+
else:
151151
logging.debug('Calculating temperature using a temp. gradient.')
152152
temp_hub = density.temperature_gradient(
153153
temp_air_closest, temp_air_height,
154154
self.wind_turbine.hub_height)
155-
elif self.temperature_model == 'interpolation':
156-
logging.debug('Calculating temperature using interpolation.')
157-
temp_hub = density.temperature_interpol(
158-
weather['temp_air'], weather['temp_air_2'],
159-
data_height['temp_air'], data_height['temp_air_2'],
160-
self.wind_turbine.hub_height)
161-
else:
162-
raise ValueError("'{0}' is an invalid value.".format(
163-
self.temperature_model) + "`temperature_model` " +
164-
"must be 'gradient' or 'interpolation'.")
165155
# Calculation of density in kg/m³ at hub height
166156
if self.rho_model == 'barometric':
167157
logging.debug('Calculating density using barometric height eq.')

0 commit comments

Comments
 (0)