Aerosol optical parameters obtained from sky radiometer instrument are important not only for studying aerosol effects on climate change, but also for validating several results obtained from satellite retrievals and numerical simulations. However, the greatest challenge is to separate cloud-affected and cloud free data from data measured by sky radiometer. In this study, we present an algorithm to separate such cloud-affected and cloud free data. The proposed algorithm is comprehensively tested with observational data. The algorithm consists of three tests: (i) test with global irradiance data, (ii) spectral variability test, and (iii) statistical analyses test. Though the test with the global irradiance data is the most powerful test, our study shows that it has some limitations, which can sometimes cause some clear sky data to be detected as cloud-affected data. In order to cope with this problem, a modified version of spectral variability algorithm is proposed. As the second test, the modified spectral variability algorithm is applied to filter clear sky data from data detected as cloud-affected by the first test. Finally, statistical analyses tests are performed to remove any outlier, if exists, from clear sky data detected by the first and second tests. It is shown that our proposed algorithm can screen cloud-affected data more effectively in comparison to other cloud screening algorithms. An application of this algorithm to screen observation data of one year collected in Chiba, Japan produces the seasonal means of optical thickness at 500 nm (Angstrom exponent) as ~0.17(~1.42), ~0.38(~0.98), ~0.53(~1.21), and ~0.21(~1.28) for winter, spring, summer and autumn seasons, respectively. Depending on the season, the initial seasonal mean optical thicknesses at 500 nm decrease by ~0.07 to ~0.16 and mean Angstrom exponents increase by ~0.087 to ~0.162 due to cloud screening. An application of this algorithm to dust-loaded atmospheres is also discussed. The proposed algorithm can be applied to any sky radiometer observation site as long as global irradiance data are available.