title: Zenith Angle for DNI calculation
body: <p>For a machine learning problem, I want to derive the hourly PV power of a specific system given various weather parameter, including hourly GHI and DHI, but no DNI. If I would take one of the <a href="https://pvlib-python.readthedocs.io/en/latest/api.html#dni-estimation-models" rel="nofollow noreferrer">pvLib DNI estimation models</a>, I always need the zenith angle. Since I have hourly values for Irradiance, I cannot be very specific regarding the angle. Would you take an hourly average? There is always the problem that angles close to 90° result in super high DNI values.</p>
  <p>So far I tried to manually calculate hourly DNI = (GHI-DHI)/cos(zenith), taking the mean of 5 min resolution zenith angles for the hourly zenith. The sunrise in the location is almost always before 7 am, so I should get some very small PV power in hour 6 of the day. However, due to the fact that I take the average which is almost always over 90°, I get 0 kW AC power or for the few days when the mean angle is just below 90° I get 40 kW AC power, which is the system's maximum limited by the inverters and this in these early hours even more unrealistic.</p>
  <p>ModelChain Parameters:</p>
  <pre><code>pvsys_ref=pvsyst
  loc_ref=loc
  orient_strat_ref=None
  sky_mod_ref='ineichen'
  transp_mod_ref='haydavies'
  sol_pos_mod_ref='nrel_numpy'
  airm_mod_ref='kastenyoung1989'
  dc_mod_ref='cec'
  ac_mod_ref=None
  aoi_mod_ref='physical'
  spec_mod_ref='no_loss'
  temp_mod_ref='sapm'
  loss_mod_ref='no_loss'
  </code></pre>
  <p>The required weather panda consists out of the hourly simulated ghi, dhi, temp and windspeed as well as the manually calculated dni.</p>