title: python error index out of bounds for .epw
body: <p>I'm really new at python and I'm using a script to do some data analysis.
  The analysis part is standard and in order to get results I need to import an .epw file.</p>
  
  <pre><code>nhours = 8760
  n12h = 730
  klimain = 'weather.epw'
  data = readclimafile(klimain)
  </code></pre>
  
  <p>And I use the data array to do analysis. For example, I do this</p>
  
  <pre><code>def readradfile(radin):
  rad = np.loadtxt(radin)
  def do_analysis(t, rad):
  R = 6.667
  for j in range(rad.shape[0]):
              q[j] = (20-t[j])/R
  </code></pre>
  
  <p>So, when I use an .epw for a whole year it works fine.
  But when I import an .epw for 8 days (192 hours), I get an error:</p>
  
  <pre><code>q[j] = (20-t[j])/R
  IndexError: index 192 is out of bounds for axis 0 with size 192
  </code></pre>
  
  <p>I changed the nhours to 191 and the n12h=16. I don't understand why it doesn't work. There's nowhere else to define the length of array, just the .epw imported. And it works fine for larger file, why does it get an error for a much smaller?
  Any ideas?</p>
  
  <p>Thank you!</p>