docs: def write(self, file_path, hoys=None, write_hours=False):
          """Write the wea file.
  
          WEA carries irradiance values from epw and is what gendaymtx uses to
          generate the sky.
          """
          if not file_path.lower().endswith('.wea'):
              file_path += '.wea'
  
          # generate hoys in wea file based on timestep
          full_wea = False
          if not hoys:
              hoys = self.hoys
              full_wea = True
  
          # write header
          lines = [self.header]
          if full_wea:
              # there is no user input for hoys, write it for all the hours
              for dir_rad, dif_rad, dt in zip(self.direct_normal_irradiance,
                                              self.diffuse_horizontal_irradiance,
                                              self.datetimes):
                  line = "%d %d %.3f %d %d\n" \
                      % (dt.month, dt.day, dt.float_hour, dir_rad, dif_rad)
                  lines.append(line)
          else:
              # output wea based on user request
              for hoy in hoys:
                  try:
                      dir_rad, dif_rad = self.get_irradiance_value_for_hoy(hoy)
                  except IndexError:
                      print('Warn: Wea data for {} is not available!'.format(dt))
                      continue
  
                  dt = DateTime.from_hoy(hoy)
                  dt = dt.add_minute(30) if self.timestep == 1 else dt
                  line = "%d %d %.3f %d %d\n" \
                      % (dt.month, dt.day, dt.float_hour, dir_rad, dif_rad)
  
                  lines.append(line)
          file_data = ''.join(lines)
          write_to_file(file_path, file_data, True)
  
          if write_hours:
              hrs_file_path = file_path[:-4] + '.hrs'
              hrs_data = ','.join(str(h) for h in hoys) + '\n'
              write_to_file(hrs_file_path, hrs_data, True)
  
          return file_path