code: def declination_spencer71(dayofyear):
      
      day_angle = _calculate_simple_day_angle(dayofyear)
      return (
          0.006918 -
          0.399912 * np.cos(day_angle) + 0.070257 * np.sin(day_angle) -
          0.006758 * np.cos(2. * day_angle) + 0.000907 * np.sin(2. * day_angle) -
          0.002697 * np.cos(3. * day_angle) + 0.00148 * np.sin(3. * day_angle)
      )
docs: Solar declination from Duffie & Beckman [1] and attributed to
      Spencer (1971) and Iqbal (1983).
  
      .. warning::
          Return units are radians, not degrees.
  
      Parameters
      ----------
      dayofyear : numeric
  
      Returns
      -------
      declination (radians) : numeric
          Angular position of the sun at solar noon relative to the plane of the
          equator, approximately between +/-23.45 (degrees).
  
      References
      ----------
      [1] J. A. Duffie and W. A. Beckman,  "Solar Engineering of Thermal
      Processes, 3rd Edition" pp. 13-14, J. Wiley and Sons, New York (2006)
  
      [2] J. W. Spencer, "Fourier series representation of the position of the
      sun" in Search 2 (5), p. 172 (1971)
  
      [3] Daryl R. Myers, "Solar Radiation: Practical Modeling for Renewable
      Energy Applications", p. 4 CRC Press (2013)
  
      See Also
      --------
      declination_cooper69