From 93c867558ae387915ca029817c3c9e277bcfadc5 Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Fri, 7 Jul 2023 11:57:24 -0400 Subject: [PATCH 1/2] modified ground_temperature name due to an overwriting of year in month --- hub/imports/weather/epw_weather_parameters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hub/imports/weather/epw_weather_parameters.py b/hub/imports/weather/epw_weather_parameters.py index c9819b46..a1f45772 100644 --- a/hub/imports/weather/epw_weather_parameters.py +++ b/hub/imports/weather/epw_weather_parameters.py @@ -40,13 +40,13 @@ class EpwWeatherParameters: _ = file.readline().split(',') line = file.readline().split(',') number_records = int(line[1]) - ground_temperature = {} + ground_temperature_ini = {} for i in range(0, number_records): depth_measurement_ground_temperature = line[i*16+2] temperatures = [] for j in range(0, 12): temperatures.append(float(line[i*16+j+6])) - ground_temperature[depth_measurement_ground_temperature] = temperatures + ground_temperature_ini[depth_measurement_ground_temperature] = temperatures except SystemExit: logging.error('Error: weather file %s not found. Please download it from https://energyplus.net/weather and place' ' it in folder data\\weather\\epw', self._path) @@ -79,7 +79,7 @@ class EpwWeatherParameters: sys.stderr.write(f'Error: wrong formatting of weather file {self._path}\n') sys.exit() for building in self._city.buildings: - building.ground_temperature[cte.MONTH] = ground_temperature + building.ground_temperature[cte.MONTH] = ground_temperature_ini ground_temperature = {} for ground_temperature_set in building.ground_temperature[cte.MONTH]: temperature = 0 From db2687f75fda7d9cb45dcf5c142cb02a70176109 Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Fri, 7 Jul 2023 13:55:19 -0400 Subject: [PATCH 2/2] changed name for a more clear understanding --- hub/imports/weather/epw_weather_parameters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hub/imports/weather/epw_weather_parameters.py b/hub/imports/weather/epw_weather_parameters.py index a1f45772..cbf4d2de 100644 --- a/hub/imports/weather/epw_weather_parameters.py +++ b/hub/imports/weather/epw_weather_parameters.py @@ -40,13 +40,13 @@ class EpwWeatherParameters: _ = file.readline().split(',') line = file.readline().split(',') number_records = int(line[1]) - ground_temperature_ini = {} + ground_temperature_from_file = {} for i in range(0, number_records): depth_measurement_ground_temperature = line[i*16+2] temperatures = [] for j in range(0, 12): temperatures.append(float(line[i*16+j+6])) - ground_temperature_ini[depth_measurement_ground_temperature] = temperatures + ground_temperature_from_file[depth_measurement_ground_temperature] = temperatures except SystemExit: logging.error('Error: weather file %s not found. Please download it from https://energyplus.net/weather and place' ' it in folder data\\weather\\epw', self._path) @@ -79,7 +79,7 @@ class EpwWeatherParameters: sys.stderr.write(f'Error: wrong formatting of weather file {self._path}\n') sys.exit() for building in self._city.buildings: - building.ground_temperature[cte.MONTH] = ground_temperature_ini + building.ground_temperature[cte.MONTH] = ground_temperature_from_file ground_temperature = {} for ground_temperature_set in building.ground_temperature[cte.MONTH]: temperature = 0