The cloud masking of Sentinel-2 results in this 'diamond shaped' process graph:
This works, but is not the most efficient approach, because to create the mask, the backend also needs to load the other bands already. Cloud masking often has the effect that full chunks can be discarded, so my general recommendation is to create a separate cube for the SCL band, convert it to a mask, and then load the other bands and apply the mask. The backend can then only load the chunks of data that are not fully masked.
In this notebook: https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/3.1_data_processing/exercises/31_data_processing.ipynb
The cloud masking of Sentinel-2 results in this 'diamond shaped' process graph:
This works, but is not the most efficient approach, because to create the mask, the backend also needs to load the other bands already. Cloud masking often has the effect that full chunks can be discarded, so my general recommendation is to create a separate cube for the SCL band, convert it to a mask, and then load the other bands and apply the mask. The backend can then only load the chunks of data that are not fully masked.