First post ever here : I’ll try to make it as clear and concise as possible for you to get straight to the point.
How to get rid of exception and cloud pixels in LST dataset from S3_L3_LST product, using python script ?
Feeling like reading more details ?..
I am using Sentinel-3 Level 2 LST product:
My plan is to:
- get rid of orphan pixels first,
- filter all exception pixels
- filter all cloud pixels
- enjoy a nice LST plot.
I first thought that Lvl 2 product were already cloud and exception-filtered, but…
After a quick plot on jupyter lab, I could clearly witness clouds on LST dataset:
I made sure those were “removable” clouds, identified as so, using SNAP and the following flags :
confidence_invariable in similar
Then, I wanted to get rid of exception-pixels using the
exception variable in
As expected from the
[Sentinel-3 SLSTR Land Handbook](https://sentinel.esa.int/documents/247904/4598082/Sentinel-3-SLSTR-Land-Handbook.pdf) :
“The data have been quality checked with regards to input Level-1 data, with only valid data processed. All invalid data are identified with an exception flag.”
In other words, as I understood it : I’m expecting valid data to have
NaN value in the
```python import xarray as xr import numpy as np ds_lst = xr.open_dataset('lst_in.nc') np.isnan(ds_lst.exception.values).any()
Using the code above, I get a
False for the last line, which I translate as :
no NaN value in the exception values…
I didn’t get to the cloud-cleaning part since it feels like I need to get a better grasp on what the data means, and how to use correctly.
Thanks in advance for your time, and your help.