added logger to inform about not calculated buildings in MEB
This commit is contained in:
parent
df7038df80
commit
ae6655fe3d
|
@ -7,6 +7,8 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
|||
|
||||
import numpy as np
|
||||
from pathlib import Path
|
||||
import sys
|
||||
from hub.hub_logger import logger
|
||||
|
||||
from hub.exports.formats.insel import Insel
|
||||
from hub.imports.weather.helpers.weather import Weather
|
||||
|
@ -38,6 +40,10 @@ class InselMonthlyEnergyBalance(Insel):
|
|||
if building.internal_zones is not None:
|
||||
for internal_zone in building.internal_zones:
|
||||
if internal_zone.thermal_zones is None:
|
||||
logger.error(f'Building {building.name} has missing values. '
|
||||
f'Monthly Energy Balance cannot be processed\n')
|
||||
sys.stderr.write(f'Building {building.name} has missing values. '
|
||||
f'Monthly Energy Balance cannot be processed\n')
|
||||
break
|
||||
self._contents.append(
|
||||
self.generate_meb_template(building, output_path, self._radiation_calculation_method,self._weather_format)
|
||||
|
|
|
@ -4,8 +4,10 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|||
Copyright © 2022 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
import math
|
||||
import sys
|
||||
from hub.hub_logger import logger
|
||||
|
||||
import hub.helpers.constants as cte
|
||||
from hub.catalog_factories.construction_catalog_factory import ConstructionCatalogFactory
|
||||
|
@ -37,6 +39,9 @@ class NrcanPhysicsParameters:
|
|||
function = Dictionaries().hub_function_to_nrcan_construction_function[building.function]
|
||||
archetype = self._search_archetype(nrcan_catalog, function, building.year_of_construction, self._climate_zone)
|
||||
except KeyError:
|
||||
logger.error(f'Building {building.name} has unknown construction archetype for building function: '
|
||||
f'{building.function}, building year of construction: {building.year_of_construction} '
|
||||
f'and climate zone {self._climate_zone}\n')
|
||||
sys.stderr.write(f'Building {building.name} has unknown construction archetype for building function: '
|
||||
f'{building.function}, building year of construction: {building.year_of_construction} '
|
||||
f'and climate zone {self._climate_zone}\n')
|
||||
|
|
Loading…
Reference in New Issue
Block a user