def group_by_day(self):
hourly_data_by_day = OrderedDict()<EOL>for d in xrange(<NUM_LIT:1>, <NUM_LIT>):<EOL><INDENT>hourly_data_by_day[d] = []<EOL><DEDENT>a_per = self.header.analysis_period<EOL>indx_per_day = <NUM_LIT> * a_per.timestep<EOL>start_doy = sum(a_per._num_of_days_each_month[:a_per.st_time.month-<NUM_LIT:1>])+ a_per.st_time.day<EOL>if not a_per.is_reversed:<EOL><INDENT>for i in range(<NUM_LIT:0>, len(self._values), indx_per_day):<EOL><INDENT>hourly_data_by_day[start_doy] = self._values[i:i + indx_per_day]<EOL>start_doy += <NUM_LIT:1><EOL><DEDENT><DEDENT>else:<EOL><INDENT>end_ind = <NUM_LIT> * a_per.timestep * (<NUM_LIT> - start_doy)<EOL>for i in range(<NUM_LIT:0>, end_ind + <NUM_LIT:1>, indx_per_day):<EOL><INDENT>hourly_data_by_day[start_doy] = self._values[i:i + indx_per_day]<EOL>start_doy += <NUM_LIT:1><EOL><DEDENT>start_doy = <NUM_LIT:1><EOL>for i in range(end_ind, len(self._values), indx_per_day):<EOL><INDENT>hourly_data_by_day[start_doy] = self._values[i:i + indx_per_day]<EOL>start_doy += <NUM_LIT:1><EOL><DEDENT><DEDENT>return hourly_data_by_day<EOL>
Return a dictionary of this collection's values grouped by each day of year.

        Key values are between 1-365.