I am attempting to calculate the clear sky solar irradiance for a given latitude with the equation:

I = I0(cozZ)*Tr*Tpg*Tw*Ta

where cozZ is the cosine of the solar zenith angle. which is given by
cosZ = sin(lat)*sin(dec) + cos(lat)*cos(dec)*cos(H),
where H is the hour angle given by:
H = (pi/12)*(tnoon - t)
where t is the local solar time.

So, the zenith returned from this function can be used as Z in the first equation shown here?