mabuseif commited on
Commit
822a8fe
·
verified ·
1 Parent(s): 696c0a8

Update utils/cooling_load.py

Browse files
Files changed (1) hide show
  1. utils/cooling_load.py +5 -1
utils/cooling_load.py CHANGED
@@ -509,6 +509,8 @@ class CoolingLoadCalculator:
509
 
510
  try:
511
  lat_value = float(latitude.replace('N', ''))
 
 
512
  except ValueError:
513
  if self.debug_mode:
514
  logger.error(f"Invalid latitude format: {latitude}. Defaulting to 32.0")
@@ -577,7 +579,7 @@ class CoolingLoadCalculator:
577
  numeric_map = {'1': 'A', '2': 'B', '3': 'C', '4': 'D', '5': 'E', '6': 'F', '7': 'G', '8': 'G'}
578
 
579
  if roof_group in numeric_map:
580
- roof_group = numeric_map[roof_group] # Fixed: Correctly use roof_group
581
  if self.debug_mode:
582
  logger.info(f"Mapped roof_group {roof.roof_group} to {roof_group}")
583
  elif roof_group not in self.valid_roof_groups:
@@ -587,6 +589,8 @@ class CoolingLoadCalculator:
587
 
588
  try:
589
  lat_value = float(latitude.replace('N', ''))
 
 
590
  except ValueError:
591
  if self.debug_mode:
592
  logger.error(f"Invalid latitude format: {latitude}. Defaulting to 32.0")
 
509
 
510
  try:
511
  lat_value = float(latitude.replace('N', ''))
512
+ if self.debug_mode:
513
+ logger.debug(f"Converted latitude {latitude} to {lat_value} for wall CLTD")
514
  except ValueError:
515
  if self.debug_mode:
516
  logger.error(f"Invalid latitude format: {latitude}. Defaulting to 32.0")
 
579
  numeric_map = {'1': 'A', '2': 'B', '3': 'C', '4': 'D', '5': 'E', '6': 'F', '7': 'G', '8': 'G'}
580
 
581
  if roof_group in numeric_map:
582
+ roof_group = numeric_map[roof_group]
583
  if self.debug_mode:
584
  logger.info(f"Mapped roof_group {roof.roof_group} to {roof_group}")
585
  elif roof_group not in self.valid_roof_groups:
 
589
 
590
  try:
591
  lat_value = float(latitude.replace('N', ''))
592
+ if self.debug_mode:
593
+ logger.debug(f"Converted latitude {latitude} to {lat_value} for roof CLTD")
594
  except ValueError:
595
  if self.debug_mode:
596
  logger.error(f"Invalid latitude format: {latitude}. Defaulting to 32.0")