added new format to weather factory

This commit is contained in:
Pilar 2021-01-13 12:24:46 -05:00
parent 869cc8fd81
commit 14d4a1a4b8
2 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,7 @@ class DatWeatherParameters:
try: try:
self._weather_values = pd.read_csv(self._path, sep='\s+', header=None, self._weather_values = pd.read_csv(self._path, sep='\s+', header=None,
names=['hour', 'global_horiz', 'temperature', 'diffuse', 'beam', 'empty']) names=['hour', 'global_horiz', 'temperature', 'diffuse', 'beam', 'empty'])
except ValueError: except SystemExit:
sys.stderr.write(f'Error: weather file {self._path} not found\n') sys.stderr.write(f'Error: weather file {self._path} not found\n')
sys.exit() sys.exit()

View File

@ -28,7 +28,7 @@ class XlsWeatherParameters:
'temperature', 'I_sol_vertical_N', 'I_sol_vertical_E', 'temperature', 'I_sol_vertical_N', 'I_sol_vertical_E',
'I_sol_vertical_S', 'I_sol_vertical_W', 'I_sol_45_N', 'I_sol_45_S', 'I_sol_vertical_S', 'I_sol_vertical_W', 'I_sol_45_N', 'I_sol_45_S',
'void', 'global_horiz', 'wind_velocity', 'humidity']) 'void', 'global_horiz', 'wind_velocity', 'humidity'])
except ValueError: except SystemExit:
sys.stderr.write(f'Error reading weather file {self._path}\n') sys.stderr.write(f'Error reading weather file {self._path}\n')
sys.exit() sys.exit()
@ -44,4 +44,3 @@ class XlsWeatherParameters:
building.global_horizontal['hour'] = new_value building.global_horizontal['hour'] = new_value
else: else:
pd.concat([building.global_horizontal['hour'], new_value], axis=1) pd.concat([building.global_horizontal['hour'], new_value], axis=1)