Merge pull request 'modified ground_temperature name due to an overwriting of year in month' (#28) from bug_in_ground_temperature into main

Reviewed-on: https://nextgenerations-cities.encs.concordia.ca/gitea/CERC/hub/pulls/28
This commit is contained in:
Guille Gutierrez 2023-07-07 14:00:05 -04:00
commit dfd41250e5

View File

@ -40,13 +40,13 @@ class EpwWeatherParameters:
_ = file.readline().split(',')
line = file.readline().split(',')
number_records = int(line[1])
ground_temperature = {}
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[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
building.ground_temperature[cte.MONTH] = ground_temperature_from_file
ground_temperature = {}
for ground_temperature_set in building.ground_temperature[cte.MONTH]:
temperature = 0