Sen2cor bugged

Hello,

I am trying to use sen2cor 2.5.5 for atmospheric correction of a series of Sentinel-2 images, but, with the very first image I get the following error message:

Process L2A_ProcessTile-1:
Traceback (most recent call last):
File “D:\Software\Sen2Cor-02.05.05-win64\lib\multiprocessing\process.py”, line 258, in _bootstrap
self.run()
File “D:\Software\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 133, in run
if not self.process_20():
File “D:\Software\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 158, in process_20
return self.process()
File “D:\Software\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 223, in process
if ac.process() == False:
File “L2A_AtmCorr.py”, line 3160, in L2A_AtmCorr.L2A_AtmCorr.process (L2A_AtmCorr.c:73751)
File “L2A_AtmCorr.py”, line 7463, in L2A_AtmCorr.L2A_AtmCorr.prepare_rho_retrieval (L2A_AtmCorr.c:196970)
File “L2A_AtmCorr.py”, line 7284, in L2A_AtmCorr.L2A_AtmCorr.find_vegetation_pixels_vari_a3 (L2A_AtmCorr.c:191676)
File “L2A_AtmCorr.py”, line 295, in L2A_AtmCorr.median_filter_2d (L2A_AtmCorr.c:13809)
IndexError: too many indices for array

I checked, and the cause seems to be using the BRDF correction with ID 21.

This is congruent with this post:

Thanks,
Ignacio

Hi Ignacio - did you ever solve this? I am having the same problem.
Thanks,

1 Like

I was able to run sen2cor using the BRDF correction with ID 2 “correction with sqrt(cos) of local solar zenith angle”, the rest of them did not work.

However, I ended up using another algorithm for correcting my S2 images

Thanks for reply. Out of interest what other algorithm did you decide to use instead?
If you can’t share - no worries

Hello

I performed multiple tests, using FORCE, MAJA and sen2agri. From these three I had to discard FORCE because it does not work well in montaneous regions. For now I am using sen2agri because it eases my workflow, performing the tasks of downloading and correcting the images, as well as creating monthly mosaics

3 Likes

Thank you for this , very interesting - I have not checked sen2agri out yet.

(in case you are interested: I asked marpet about sen2cor and BRDF correction problems, it seems this error is known about. Linked to the issue of there is no official support for sen2cor at this time. Maybe ESA will sort it … )

If you are interested in S2 data corrected by sen2cor you might want to have a look at
https://s2gm.eu
It is a new service of the Copernicus Land Monitoring Service. It provides you with composites which are atmospherically corrected by sen2cor and clouds are removed. The pixels selection takes place on a best-pixel-approach.

Right now it is limited to Europe, but will be extended to global scale this year. It depends on S2 L2A data availability.

This same problem exists in SenCor2.8

@ognjen, did you ever find a resolution here? We are experiencing the same issue. Thanks!

I ended up changing the BRDF correction parameter to 2, like Sen2cor bugged suggested.

Cheers!