def header(self):
        """A list of text representing the full header (the first 8 lines) of the EPW."""
        self._load_header_check()
        loc = self.location
        loc_str = 'LOCATION,{},{},{},{},{},{},{},{},{}\n'.format(
            loc.city, loc.state, loc.country, loc.source, loc.station_id, loc.latitude,
            loc.longitude, loc.time_zone, loc.elevation)
        winter_found = bool(self._heating_dict)
        summer_found = bool(self._cooling_dict)
        extreme_found = bool(self._extremes_dict)
        if winter_found and summer_found and extreme_found:
            des_str = 'DESIGN CONDITIONS,1,Climate Design Data 2009 ASHRAE Handbook,,'
            des_str = des_str + 'Heating,{},Cooling,{},Extremes,{}\n'.format(
                ','.join([self._heating_dict[key] for key in DesignDay.heating_keys]),
                ','.join([self._cooling_dict[key] for key in DesignDay.cooling_keys]),
                ','.join([self._extremes_dict[key] for key in DesignDay.extreme_keys]))
        else:
            des_str = 'DESIGN CONDITIONS,0\n'
        weeks = []
        if bool(self.extreme_hot_weeks) is True:
            for wk_name, a_per in self.extreme_hot_weeks.items():
                weeks.append(self._format_week(wk_name, 'Extreme', a_per))
        if bool(self.extreme_cold_weeks):
            for wk_name, a_per in self.extreme_cold_weeks.items():
                weeks.append(self._format_week(wk_name, 'Extreme', a_per))
        if bool(self.typical_weeks):
            for wk_name in sorted(self.typical_weeks.keys()):
                a_per = self.typical_weeks[wk_name]
                weeks.append(self._format_week(wk_name, 'Typical', a_per))
        week_str = 'TYPICAL/EXTREME PERIODS,{},{}\n'.format(len(weeks), ','.join(weeks))
        grnd_st = 'GROUND TEMPERATURES,{}'.format(len(self._monthly_ground_temps.keys()))
        for depth in sorted(self._monthly_ground_temps.keys()):
            grnd_st = grnd_st + ',{},{}'.format(
                depth, self._format_grndt(self._monthly_ground_temps[depth]))
        grnd_st = grnd_st + '\n'
        leap_yr = 'Yes' if self._is_leap_year is True else 'No'
        leap_str = 'HOLIDAYS/DAYLIGHT SAVINGS,{},{},{},0\n'.format(
            leap_yr, self.daylight_savings_start, self.daylight_savings_end)
        c_str1 = 'COMMENTS 1,{}\n'.format(self.comments_1)
        c_str2 = 'COMMENTS 2,{}\n'.format(self.comments_2)
        data_str = 'DATA PERIODS,1,1,Data,Sunday, 1/ 1,12/31\n'
        return [loc_str, des_str, week_str, grnd_st, leap_str, c_str1, c_str2, data_str]
def header ( self ) : self . _load_header_check ( ) loc = self . location loc_str = 'LOCATION,{},{},{},{},{},{},{},{},{}\n' . format ( loc . city , loc . state , loc . country , loc . source , loc . station_id , loc . latitude , loc . longitude , loc . time_zone , loc . elevation ) winter_found = bool ( self . _heating_dict ) summer_found = bool ( self . _cooling_dict ) extreme_found = bool ( self . _extremes_dict ) if winter_found and summer_found and extreme_found : des_str = 'DESIGN CONDITIONS,1,Climate Design Data 2009 ASHRAE Handbook,,' des_str = des_str + 'Heating,{},Cooling,{},Extremes,{}\n' . format ( ',' . join ( [ self . _heating_dict [ key ] for key in DesignDay . heating_keys ] ) , ',' . join ( [ self . _cooling_dict [ key ] for key in DesignDay . cooling_keys ] ) , ',' . join ( [ self . _extremes_dict [ key ] for key in DesignDay . extreme_keys ] ) ) else : des_str = 'DESIGN CONDITIONS,0\n' weeks = [ ] if bool ( self . extreme_hot_weeks ) is True : for wk_name , a_per in self . extreme_hot_weeks . items ( ) : weeks . append ( self . _format_week ( wk_name , 'Extreme' , a_per ) ) if bool ( self . extreme_cold_weeks ) : for wk_name , a_per in self . extreme_cold_weeks . items ( ) : weeks . append ( self . _format_week ( wk_name , 'Extreme' , a_per ) ) if bool ( self . typical_weeks ) : for wk_name in sorted ( self . typical_weeks . keys ( ) ) : a_per = self . typical_weeks [ wk_name ] weeks . append ( self . _format_week ( wk_name , 'Typical' , a_per ) ) week_str = 'TYPICAL/EXTREME PERIODS,{},{}\n' . format ( len ( weeks ) , ',' . join ( weeks ) ) grnd_st = 'GROUND TEMPERATURES,{}' . format ( len ( self . _monthly_ground_temps . keys ( ) ) ) for depth in sorted ( self . _monthly_ground_temps . keys ( ) ) : grnd_st = grnd_st + ',{},{}' . format ( depth , self . _format_grndt ( self . _monthly_ground_temps [ depth ] ) ) grnd_st = grnd_st + '\n' leap_yr = 'Yes' if self . _is_leap_year is True else 'No' leap_str = 'HOLIDAYS/DAYLIGHT SAVINGS,{},{},{},0\n' . format ( leap_yr , self . daylight_savings_start , self . daylight_savings_end ) c_str1 = 'COMMENTS 1,{}\n' . format ( self . comments_1 ) c_str2 = 'COMMENTS 2,{}\n' . format ( self . comments_2 ) data_str = 'DATA PERIODS,1,1,Data,Sunday, 1/ 1,12/31\n' return [ loc_str , des_str , week_str , grnd_st , leap_str , c_str1 , c_str2 , data_str ]
A list of text representing the full header (the first 8 lines) of the EPW.