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:
Traceback (most recent call last):
File “D:\Software\Sen2Cor-02.05.05-win64\lib\multiprocessing\process.py”, line 258, in _bootstrap
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
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.
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
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.