def _solarZenith(date, lat=-3.13, lon=-60.016667, lon0=-63.0, negative=
    False, dr=None):
    """
    Calculates the solar zenith angle at any given day

    needs validation and needs to work without lon0

    Parameters
    -----------
    date: datetime object
        the date and time for which the zenith angle has to be calculated
    lat: float
        latitude in degrees
    lon: float
        longitude in degrees
    lon0: float
        DEFINE IT BETTER

    dr is the julian day of the solstice. Default is to get from dictionary

    Returns
    --------
    zen_ang: float
        the zenith angle in degrees
    """
    from math import pi, sin, cos, acos, radians, degrees
    from calendar import isleap
    from datetime import timedelta
    if dr == None:
        from .constants import sumsolstice
        dr = sumsolstice[date.year].timetuple().tm_yday
    if isleap(date.year):
        da = 366
    else:
        da = 365
    tt = date.timetuple()
    j_day = tt.tm_yday
    gamma = 2.0 * pi / 365.0 * (j_day - 1.0)
    et = 1.0 / 60.0 * (229.18 * (7.5e-05 + 0.001868 * cos(gamma) - 0.032077 *
        sin(gamma) - 0.014615 * cos(2.0 * gamma) - 0.04089 * sin(2.0 * gamma)))
    y = (lon - lon0) / 15.0 * 60.0
    soma = y + 60.0 * et
    solar_date = date + timedelta(soma / (24.0 * 60.0))
    delta = 0.409 * cos(2.0 * pi * (j_day - dr) / da)
    Hsv = (solar_date.hour + solar_date.minute / 60.0 + solar_date.second /
        3600.0)
    h = 2.0 * pi / 24.0 * (Hsv - 12.0)
    zen_ang = degrees(acos(sin(radians(lat)) * sin(delta) + cos(radians(lat
        )) * cos(delta) * cos(h)))
    if negative:
        if solar_date.hour <= 12:
            return zen_ang
        else:
            return -zen_ang
    else:
        return zen_ang
