Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.forc.uDir = self.forcIP.uDir[self.ceil_time_step] # wind direction
# specific humidty (kg kg-1)
self.forc.hum = self.forcIP.hum[self.ceil_time_step]
self.forc.pres = self.forcIP.pres[self.ceil_time_step] # Pressure (Pa)
self.forc.temp = self.forcIP.temp[self.ceil_time_step] # air temperature (C)
self.forc.rHum = self.forcIP.rHum[self.ceil_time_step] # Relative humidity (%)
self.forc.prec = self.forcIP.prec[self.ceil_time_step] # Precipitation (mm h-1)
# horizontal solar diffuse radiation (W m-2)
self.forc.dif = self.forcIP.dif[self.ceil_time_step]
# normal solar direct radiation (W m-2)
self.forc.dir = self.forcIP.dir[self.ceil_time_step]
# Canyon humidity (absolute) same as rural
self.UCM.canHum = copy.copy(self.forc.hum)
# Update solar flux
self.solar = SolarCalcs(self.UCM, self.BEM, self.simTime,
self.RSM, self.forc, self.geoParam, self.rural)
self.rural, self.UCM, self.BEM = self.solar.solarcalcs()
# Update building & traffic schedule
# Assign day type (1 = weekday, 2 = sat, 3 = sun/other)
if self.is_near_zero(self.simTime.julian % 7):
self.dayType = 3 # Sunday
elif self.is_near_zero(self.simTime.julian % 7 - 6.):
self.dayType = 2 # Saturday
else:
self.dayType = 1 # Weekday
# Update anthropogenic heat load for each hour (building & UCM)
self.UCM.sensAnthrop = self.sensAnth * (self.SchTraffic[self.dayType-1][self.simTime.hourDay])
# Update the energy components for building types defined in initialize.uwg