diff --git a/hub/imports/weather/epw_weather_parameters.py b/hub/imports/weather/epw_weather_parameters.py index 2c7de4e2..faaa91f0 100644 --- a/hub/imports/weather/epw_weather_parameters.py +++ b/hub/imports/weather/epw_weather_parameters.py @@ -37,7 +37,7 @@ class EpwWeatherParameters: depth_measurement_ground_temperature = line[i*16+2] temperatures = [] for j in range(0, 12): - temperatures.append(line[i*16+j+6]) + temperatures.append(float(line[i*16+j+6])) ground_temperature[depth_measurement_ground_temperature] = temperatures file.close() except SystemExit: @@ -74,6 +74,13 @@ class EpwWeatherParameters: for building in self._city.buildings: building.ground_temperature[cte.MONTH] = ground_temperature + ground_temperature = {} + for set in building.ground_temperature[cte.MONTH]: + temperature = 0 + for value in building.ground_temperature[cte.MONTH][set]: + temperature += value / 12 + ground_temperature[set] = [temperature] + building.ground_temperature[cte.YEAR] = ground_temperature if cte.HOUR in building.external_temperature: del building.external_temperature[cte.HOUR] new_value = pd.DataFrame(self._weather_values[['dry_bulb_temperature_c']].to_numpy(), columns=['epw'])