High-resolution spectra of reflected sunlight in the 2-mm absorption band of CO2 are simulated at the top of the atmosphere using cloud profiles and particle sizes from CloudSat analyzed meteorology from ECMWF, surface bidirectional distribution functions over land derived from the Moderate Resolution Imaging Spectroradiometer (MODIS), and a facet model of ocean reflectance. It is argued that in clear sky the photons will follow the direct path from sun to surface to satellite, because Rayleigh scattering is negligible at 2 mm, so the distribution of photon pathlengths will be a d function. A proxy for the photon pathlength distribution under any sky condition is recovered from the high-resolution spectrum by representing the distribution as a weighted sum of d functions. Scenes are classified as clear or cloudy according to how closely the distribution approximates the ideal single d function for the direct path. The algorithm has an efficiency of approximately 75%, meaning that 25% of the clear cases will be rejected as cloudy. For scenes that pass the clear-sky test, the probability that the prediction will be correct is typically 95%. The algorithm appears to be robust, insensitive to instrument noise and to errors in the surface pressure and profiles of temperature and water vapor. The efficiency and confidence level of the algorithm are almost unchanged for bright surfaces such as sun glint.