Water mask

Hello, im quite new to Snap, i’ve been trying to obtain the value of chlorophyll-a in reservoir trough sentinel 2 images , firstly i apply a water mask to separete the water values from the land values. I use this expression (If B8>0.05 then NaN else 1) envolving the radiance values estimated by the pixel info.It has been working so far with previous images, however i cannot separate the value from land and water images in the year of 2020.

It should look like this:

The range of values shown in the Colour Manipulation panel is 0.004 – 0.04. Did you mean to use 0.008? I do oceans and don’t normally look at NIR bands so I don’t have a feeling for the normal range
of band 8.

Regardless of the correct threshold, I think it is easier to use the Mask Manager.
If allows you to define masks (e.g. “water”) based on simple logic: B8 < 0.05
You can use the name of this mask as “valid pixel expression” in the band properties to remove all pixels which do not belong to the mask.
This also allows you to change the definition of the mask and the bands which use this mask are changed accordingly.

1 Like

In the C2RCC processor the following expression is used to distinguish between land and water by default.
B8 > 0 && B8 < 0.1
By the way, this operator can calculate chl_a for you. But there might be reasons why you want to do it on your own.
With your expression I was able to create a good mask on the product:

1 Like