Hello,
All users of Sentinel2 imagery need to use sen2cor to process it from level L1C to L2A. Not only there are several problems with sen2cor installation but apparently there are also several bugs.
@ChristianSeverin has brilliantly shown there’s a bug in the L2A_Tables.py and he offered a solution. Since I’m not familiar with python, I copied the file version as kindly uploaded in this forum by @riyaadh91. After that I did the following tests:
-
Run sen2cor on a whole Sentinel-2 image
-
Run sen2cor on selected granules/tiles of a Sentinel-2 image
As explained by ChristianSeverin I am using the command line to execute sen2cor. This is faster, easy and allows to follow all the process.
I have found the following:
-
You can process only selected granules if you keep them in the full image directory (you eliminate the granules you don’t need) probably because the image xml file contains information not available inside the xml files of the granules.
-
Whatever the method (full image or selected tiles), the same validity issues occurr with the xml files generated by sen2cor itself:
-
Files S2A_USER_MTD_SAFL2A_PDMC_…xml are systematically evaluated as invalid
-
Files S2A_USER_MTD_L2A_TL_SGS_…xml are systematically evaluated as invalid
-
Files S2A_USER_MTD_L2A_DS_SGS_…xml are systematically evaluated as valid
-
Also there are some strange messages but target already exists while copying different files that sen2cor itself has created!
The following image shows a sample of this phenomenon that happens with each granule.
However I could get processed images of all selected granules and also of full image. However, when I produced RGBs in SNAP, some of the processed tiles have different colours with seams between them whereas the L1C does not have any seams.
The following images show the situation before and after processing:
I would like to ask if:
-
@ChristianSeverin could kindly make available (upload) his corrected L2A_Tables.py as many of us have little command of python and also because he perhaps has made new corrections that we can test.
-
Someone has encountered similar problems, has any explanations and/or solutions?
Kind regards to all.