C2X processing chain for S2-MSI L1C

Dear SNAP-users,

I’m trying to detect Chl-a concentration in small lake. I chose 2 atmospheric correction for my study (C2RCC and C2X). C2RCC was performed perfect. But after doing similar steps with C2RCC in C2X processor, the difference of the min. and max values were too high and min. values were minus. Now I would like to change my processing chain to do it right.
-Preprocessing:
1.Resample
2.IdePix
3.Subset
3.Reprojection.
-Atmospheric correction -C2X
1.Salinity, Temp, Ozone, Air pressure, Elevation will be set
2.Output -normalized water leaving reflectances and Output -irradiance attenuation coefficients and Output -uncertainties will be chosen
3. other factors will be remained as default

-BandMath
in BandMath Valid_Pe and rhown_B4 and rhown_B5 will be used

Do you see there any false step? Or could you suggest some method to process C2X in right way?

Mr.Peters wrote me " consider the flags which are created by C2RCC. Especially the invalid flag.". But I didn’t understand how I consider it. Actually I didn’t understand where I use it. and for which propose, however I searched about it in google.

I look forward to hear from you

I missed the important thing. The problem is that the values of B5 is always higher than B4 from the beginning. (I mean before and after ATMOSPHERIC CORRECTION it was always similar, B5 is higher that B4).

image

image

Hi Ganjug,

what water type is your lake? it is eutrophic or clear / oligotrophic?
C2X can cover more extreme concentrations but has larger noise (due to larger training range).
You should also test the C2X-COMPLEX option, which is a good compromise between C2RCC and C2X and it works quite well in inland waters. You find it in the drop-down menue of the set of Neuralnal Nets.

Your second question concerning the masks/flags and how to apply them. If you go to the mask manager, you see a lot of entries that provide you masks you can overlay to your product. they indicate if a pixel is valid or not. C2RCC comes with a lot of flags/masks that help to assess the validity of your pixels.
Also Idepix (which you applied beforehand) provides you flags/masks that identify clouds, land etc. and that should be masked out when only interested in valid water pixels.
the most revant flags are: IDEPIX_CLOUD, IDEPIX_CLOUD_BUFFER, IDEPIX_CIRRUS_SURE, IDEPIX_VEG_RISK, IDEPIX_CLOUD_SHADOW, Cloud_risk, Rtosa_OOS, Rtosa_OOR, Rhow_OOR.
If you have found a good combination of flags, you can apply those in the properties of each band (right mouse click to the band). Here, you can specify the valid pixel expression which can be a combination from a number of different flags/masks. However, your NDCI should already be a good first assessment. You can try to specify as valid_pixel expression “NDCI < 0”.

Within your processing step I am wondering why your are doeing the reprojection. This should not be done before applying C2RCC and it is not needed (?).

I hope this was not too confusing…

best,
Kerstin

1 Like

Dear Kerstin,

Thank you very much for your advice.

The Study area is eutrophic and small lake (0.32km2).
Abraun said that the reprojection is needed.

I found an idea, but I don’t know if it is good idea

In the Atmospheric correction step, I have applied “B8 > 0 && B8 < 0.1 && pixel_classif_flags.IDEPIX_CLOUD == 0 && pixel_classif_flags.IDEPIX_CLEAR_LAND == 0” this expression as Valid_PE expression. As a result, only remained the clear IDEPIX_CLEAR_WATER.

What do you think about this expression?

This was a misunderstanding then. I just said a previous reprojection might explain why the values changed (e.g. into negative numbers). I don’t consider it a necessary preprocessing step for C2RCC.

Ok. I have removed the “reproject”.

I have been facing this issue since last week.
Most of the reflectance of B4 is higher than B5 from the beginning. After and before the atmospheric correction, it was same.
Because of this, the final min. values are always negative.


I put as Valid_PE the B5>B4, but after this expression most of the area has been eliminated.

Below is an example of the masked band after I gave the B5>B4 expression.

I used both C2X and C2X_Complex nets. But in C2RCC the processing was performed perfect without minus values, however I didn’t put this expression B5>B4 as Valid_PE.

I would like to know how to process C2X and C2X complex nets without minus values.

What is the purpose of your B5>B4, calculation? You will generally have lower values in the B5 because you are moving to the infrarred part of the spectrum.Valid_PE is indicating which values have a high confidence to be true, it is a flag in itself, you do not need to add any argument.

First I performed the empirical approach with C2RCC atmospheric correction under following tutorial. https://rus-copernicus.eu/portal/wp-content/uploads/library/education/training/HYDR02_FreshWaterQuality_Tutorial.pdf

Then I used the following atmospheric corrections with this empirical approach by same steps what I used in C2RCC processor.

  1. Sen2Cor
  2. C2X
  3. C2X Complex
    Difference between min. and max. value was too high after Sen2Cor - #3 by Ganjug

Of course in my first attempts I applied the BandMath by following expressions

But the result was unexpected that the minimum Chl-a concentrations were always negative (-20 microgram/leter) in all 3 atmospheric correction.
Then I applied the following expression, in order to eliminate negative values. Unfortunately the result was same again (the minimum Chl concentration were negative, and maximum value were too high(300-500 micrometer/leter) )

I mean in Sen2Cor, C2X and C2X complex similar negative min values were calculated.
I would like to kindly ask how to process C2X and C2X complex nets without minus values.

And can you answer this question?

Your lake is in this scene S2A_MSIL1C_20150911T104036_N0204_R008_T31UGT_20150911T104038 ?
Can you point to its location within the scene?

Right after writing the question, I found it. :slight_smile:
It is very much in the centre.

That is right. It is a small and fascinating lake of Germany. I’m working with 11 images and it’s in-situ data of this lake.

The shape of the lake reminds me of a calabash (bottle gourd)
Calabash - Wikipedia

I didn’t notice it. but after you say it, I agree with you.Calabash :slightly_smiling_face:

Dear Ganjug,
coming back to your inital list of processors you are using - which Resampler did you use (your first step)? You should use Optical->Geometric->S2 Resampling Operator .
might not solve the problems with neg. values, but is needed for correct Idepix and C2RCC calculation.
As the products are already projected, you do not need a reproject step.

best,
Kerstin

Dear Kerstin,

I used Raster> Geometric> Resampling.
Ok. I will use S2 Resampling right now. Then I will share the result. (Reprojection will not be performed.)

Dear Kerstin
My first image was processed this way. There is a very slight difference. The process takes time. I don’t know if it will affect for the final result. Maybe tomorrow we will be able to see the final result.

I chose in S2Resampling the following options.