Kipp&Zonen BSRN Scientific Solar Monitoring System User Manual
Page 183
171
SolarMn$ = RIGHT$(STR$(SMn), 2)
IF ABS(SMn) < Ten THEN SolarMn$ = "0" + RIGHT$(STR$(SMn), 1)
SolarSc$ = RIGHT$(STR$(SSc), 2)
IF ABS(SSc) < Ten THEN SolarSc$ = "0" + RIGHT$(STR$(SSc), 1)
SolarTime$ = SolarHr$ + ":" + SolarMn$ + ":" + SolarSc$
' Solar zenith angle in degrees.
Zenith = (Ninety - El)
' Station pressure in millibars.
StnPress = stdPress * EXP(-HC1 * StnHeight)
' Calculate the relative optical air mass.
IF (Ninetyplus - Zenith) < Zero THEN
Airmass$ = "Undefined because sun below horizon"
ELSE
' Airmass calculation of Kasten (1966)
Airmass = StnPress / stdPress * (COS(Zenith * ToRad) + PointFifteen * (Ninetyplus - Zenith) ^ AC1)^-One
Airmass$ = STR$(Airmass)
END IF
END SUB