function zen_angle = s_zen_ang(declin,latitude,hour_angle)

% function zen_angle = s_zen_ang(declin,latitude,hour_angle)
%
% function that returns the solar zenith angle in degrees
%
% declin = declination angle in radians
% latitude = latitude in radians
% hour_angle = hour_angle in radians  (0 at noon)

cos_szen_rad = sin(declin)*sin(latitude) + ...
   cos(declin)*cos(latitude)*cos(hour_angle);
zen_angle = rad2deg(acos(cos_szen_rad));
