What tools are available to perform a cloud mask on Sentinel-2 L2A products?

I’ve been using sen2cor to convert Sentinel-2 L1C (TOA reflectance) to L2A (BOA reflectance). I see that the sen2cor algorithm classifies the image and provides a variety of SCL masks. What is the preferred method using SNAP to apply these cloud masks to a Sentinel-2 L2A product? Ultimately I am after an image that is cloud free, where cloud pixels are replaced with NoData, or some user specified value.

Please see my answer in this thread:

@marpet Hi,
I have have been searching for steps to follow for masking out the cloud cover areas on Sentinel-2 imageries (all bands) but honestly I couldn’t find elaborated explanation about the procedure. I am very new to the Sentinel-1 and Sentinel-1 datasets and so to the SNAP, I would really appreciate if you could give me direction in order to deal with following points:

  1. The uses of available masks in the datasets?? within the SNAP what are the tools and steps??
  2. Masking out the thick/thin clouds from the bands with 10m resolution
  3. Interpolation technique and steps involved for the voids due to masking out the clouds from the images??
  4. Can I use Sentinel-1 (SAR Imageries) to get the masked out pixel information?
  5. Sentinel-1 datasets introduction (type and uses)??

Again, I would like to say that I am very new with the Sentinel datasets so elaborated and graphical explanation would be appreciated.
I know it is little time consuming even to reply with elaborated step wise explanation with SNAP screenshots, but it will really help lot of people same as me.
Thank you!

1 Like

Filling cloud gaps with SAR data is complicated and can not be done with a few clicks. Maybe this is intersting for you:

If you are new to SAR and the toolbox, please have a look at the many tutorials:
http://step.esa.int/main/doc/tutorials/sentinel-1-toolbox-tutorials/

And as you explicitly asked for graphic explanations, please visit this site:
https://saredu.dlr.de/
This is a collection of many great tutorials, talks and presentations on all kinds of SAR topics.

How masks can be used is explained in the video tutorials. http://step.esa.int/main/doc/tutorials/

If you have used Idepix on you S2 data you can use the combination of the following masks in the valid pixel expression of the bands. Or you create new bands by Band Maths and consider the masks.
The masks:

  • lc_cloud
  • lc_cloud_ambiguous
  • lc_cloud_sure
  • lc_cloud_buffer
  • lc_cloud_shadow
  • lc_cirrus_ambiguous
  • lc_cirrus_sure

The steps you want to do seem to be too big to be done in the GUI. Especially if you want to do it not only on a single scene.
You should consider writing a processor. See the documentation here:
https://senbox.atlassian.net/wiki/display/SNAP/Developer+Guide

@marpet and @ABraun thank you for the suggestion and links…I am going though it now, I will get back to you again if anything comes up. :slight_smile: