Update data/climate_data.py
Browse files- data/climate_data.py +11 -7
data/climate_data.py
CHANGED
|
@@ -92,16 +92,20 @@ class ClimateLocation:
|
|
| 92 |
_solar_cache: Dict[str, Dict[str, float]] # Cache for solar angle calculations
|
| 93 |
|
| 94 |
def __init__(self, epw_file: pd.DataFrame, typical_extreme_periods: Dict, ground_temperatures: Dict, albedo: float = 0.2, **kwargs):
|
| 95 |
-
|
| 96 |
-
self.
|
| 97 |
-
self.
|
| 98 |
-
self.
|
| 99 |
-
self.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
self.hourly_data = epw_file.iloc[8:].to_dict('records') # Assuming data starts at row 8
|
| 101 |
self.typical_extreme_periods = typical_extreme_periods
|
| 102 |
self.ground_temperatures = ground_temperatures
|
| 103 |
-
self.
|
| 104 |
-
self.tz = pytz.FixedOffset(int(self.time_zone * 60)) # Fixed
|
| 105 |
|
| 106 |
# Extract columns from EPW data
|
| 107 |
months = pd.to_numeric(epw_file[1], errors='coerce').values
|
|
|
|
| 92 |
_solar_cache: Dict[str, Dict[str, float]] # Cache for solar angle calculations
|
| 93 |
|
| 94 |
def __init__(self, epw_file: pd.DataFrame, typical_extreme_periods: Dict, ground_temperatures: Dict, albedo: float = 0.2, **kwargs):
|
| 95 |
+
self.id = kwargs.get("id")
|
| 96 |
+
self.country = kwargs.get("country") # Set country from kwargs
|
| 97 |
+
self.state_province = kwargs.get("state_province", "N/A")
|
| 98 |
+
self.city = kwargs.get("city")
|
| 99 |
+
self.latitude = kwargs.get("latitude")
|
| 100 |
+
self.longitude = kwargs.get("longitude")
|
| 101 |
+
self.elevation = kwargs.get("elevation")
|
| 102 |
+
self.time_zone = kwargs.get("time_zone")
|
| 103 |
+
self.albedo = albedo
|
| 104 |
self.hourly_data = epw_file.iloc[8:].to_dict('records') # Assuming data starts at row 8
|
| 105 |
self.typical_extreme_periods = typical_extreme_periods
|
| 106 |
self.ground_temperatures = ground_temperatures
|
| 107 |
+
self.solstice_zenith_angles = {}
|
| 108 |
+
self.tz = pytz.FixedOffset(int(self.time_zone * 60)) # Fixed offset in minutes
|
| 109 |
|
| 110 |
# Extract columns from EPW data
|
| 111 |
months = pd.to_numeric(epw_file[1], errors='coerce').values
|