function sol_zen_ang,doy,time,lat,lon ;------------------------------------------------------------------- ; Routine calculates the solar zenith angle (SZA) ; ; ; Input: ; doy......day of year ; time.....time of day, hours GMT ; lat......latitude, degrees ; lon......longitude, degrees ; ; Output: ; SZA......solar zenith angle, degrees ; ; Requirements: solar_time.pro ; ; Source: Mark Hervig ;------------------------------------------------------------------- ;- calculate the solar declination angle sdec = 23.5* cos(2.* !pi* doy /365.) ; deg ;- calculate the LST LST = solar_time(time,lon) ; hrs ;- calculate the SZA arg1_ang = sin(lat* !pi/180.)*sin(sdec* !pi/180.) arg2_ang = cos(2.*!pi*(LST - 12.)/24.) * cos(lat*!pi/180.) * cos(sdec*!pi/180.) chi = acos(arg1_ang + arg2_ang) SZA = 180.* chi / !pi ;- done return,SZA end