Is there a way (or ways) to adjust the cloud flag determination in l2gen to be "more aggressive" in flagging cloudy pixels? I'm finding that we're getting contaminated data (for the purpose of our algorithm) at / near the edge of cloudy areas.
In case it makes a difference in the answer we're operating on MODISA granules.
STRAYLIGHTflag is effectively a dilation of the
If you apply the
STRAYLIGHTflag as a mask, you may not need to change the cloud threshold.
If you really want to change the
CLDICEflag, you can provide l2gen with a stricter
The default is 0.027 (effectively a 2.7% reflectance at 869nm - the wavelength to use is determined by the
When doing vicarious calibration work, I usually set it to 0.022.
Thank you, as always, for your helpful hints. I tried with the straylight flag and while it removed almost all of the cloud contamination (yaay!) it also dropped more pixels than we would like :(.
You said the flag is based on reflectance at 869nm - is that rrs_869, rhos_869, the cloud_albedo product or something else entirely? Since I'm processing (slowly!) at 500m resolution it would be nice to write the relevant value to the L2 file and then decide which pixels to keep during post-processing.