Analytical expression of solar zenith angle based on spherical
    trigonometry.

    .. warning:: The analytic form neglects the effect of atmospheric
        refraction.

    Parameters
    ----------
    latitude : numeric
        Latitude of location in radians.
    hourangle : numeric
        Hour angle in the local solar time in radians.
    declination : numeric
        Declination of the sun in radians.

    Returns
    -------
    zenith : numeric
        Solar zenith angle in radians.

    References
    ----------
    [1] J. A. Duffie and W. A. Beckman,  "Solar Engineering of Thermal
    Processes, 3rd Edition" pp. 14, J. Wiley and Sons, New York (2006)

    [2] J. H. Seinfeld and S. N. Pandis, "Atmospheric Chemistry and
    Physics" p. 132, J. Wiley (1998)

    [3] Daryl R. Myers, "Solar Radiation: Practical Modeling for
    Renewable Energy Applications", p. 5 CRC Press (2013)

    `Wikipedia: Solar Zenith Angle
    <https://en.wikipedia.org/wiki/Solar_zenith_angle>`_

    `PVCDROM: Sun's Position
    <http://www.pveducation.org/pvcdrom/2-properties-sunlight/suns-position>`_

    See Also
    --------
    declination_spencer71
    declination_cooper69
    hour_angle

def solar_zenith_analytical(latitude, hourangle, declination):
    """
    Analytical expression of solar zenith angle based on spherical
    trigonometry.

    .. warning:: The analytic form neglects the effect of atmospheric
        refraction.

    Parameters
    ----------
    latitude : numeric
        Latitude of location in radians.
    hourangle : numeric
        Hour angle in the local solar time in radians.
    declination : numeric
        Declination of the sun in radians.

    Returns
    -------
    zenith : numeric
        Solar zenith angle in radians.

    References
    ----------
    [1] J. A. Duffie and W. A. Beckman,  "Solar Engineering of Thermal
    Processes, 3rd Edition" pp. 14, J. Wiley and Sons, New York (2006)

    [2] J. H. Seinfeld and S. N. Pandis, "Atmospheric Chemistry and
    Physics" p. 132, J. Wiley (1998)

    [3] Daryl R. Myers, "Solar Radiation: Practical Modeling for
    Renewable Energy Applications", p. 5 CRC Press (2013)

    `Wikipedia: Solar Zenith Angle
    <https://en.wikipedia.org/wiki/Solar_zenith_angle>`_

    `PVCDROM: Sun's Position
    <http://www.pveducation.org/pvcdrom/2-properties-sunlight/suns-position>`_

    See Also
    --------
    declination_spencer71
    declination_cooper69
    hour_angle
    """
    return np.arccos(
        np.cos(declination) * np.cos(latitude) * np.cos(hourangle) +
        np.sin(declination) * np.sin(latitude)
    )