Sen2cor (detailled instructions)

Actually, what is strange is that when closing and re-open SNAP now the “external Tools Manager” is empty, although the sen2cor plugin appears as installed…

And the sen2cor now doesn’t run

yes - with File > Import > Optical > Sentinel 2 > Level 1C

Hard to tell what is wrong on your side without seeing it. If it is no longer there I can just recommend installing it from scratch as I explained above.

Did you try to run it from the command line? Just add the path to L2A_process to your system’s PATH variable and open the command window in the directory where your S2 product is located and proceed as described in the manual in chapter 3.3.1

I have no succeeded…I will try tomorrow with another PC, and I let you know. Thank you very much for you efforts!!

Dear nicola.colaninno,

Someone else was telling me the adapter is disappearing after restart. I tried different combinations of operations and I could not reproduce the disappearing. Please uninstall SNAP, Sen2Cor, and Anaconda, delete the suggested folders and system variables, and then retake the usual installation steps. I also use Windows 8, so the OS is not an issue. If you manage to reproduce the disappearing on a clean installation, please give me the steps (like: download the installer from …, double click the installer, restart, check the button… etc). This is a priority for me, so I want to find the issue and to provide a solution in the next update. So please, send me the details.
Have a nice day.

Error related to the List index out of range

I have resolved this problem by changing the code in line number 163 in
Older code:
self.tileId2a = t1c_split[0] + ‘USER’ + t1c_split[2] + '’ + t2a_split[0] + ‘’ +
t1c_split[4] + '
’ + t1c_split[5] + ‘’ + t2a_split[3] + '’ +
t2a_split[2] + ‘’ + t2a_split[1] + '’ + t1c_split[10]

Changed code
self.tileId2a = t1c_split[0] + ‘USER’ + t1c_split[2] + '’ + t2a_split[0] + ‘’ +
t1c_split[4] + '
’ + t1c_split[5] + ‘’ + t2a_split[3] + '’ +
t2a_split[2] + ‘’ + t2a_split[1] + '’ + t1c_split[-1]

Hi guys,

I am having the same problems as nicola.colaninno. I installed SNAP 6.0 on a Windows 10 operating system. I did not download the standalone version of Sen2Cor or the Anacona one, I just followed all the steps described above. I do have something from SNAP in my user variables of the environment variables (C:\Program Files\snap\bin), but not from Sen2Cor. However, every time I try to run Sen2Cor on images that I downloaded from, I get an empty AUX_DATA and an empty DATASTRIP file within seconds. I am not very good with computers so this plugin use via SNAP seemed perfect for me, but I just cannot manage it to work properly. Does anyone have suggestions on how to deal with it, or on another way of using Sen2Cor?

In addition to above: it seems to work when I directly import the MSIL1C file in the Sen2Cor plugin, so I do not import the MSIL1C file in SNAP but directly load it in the I/O parameters and then run it

1 Like

I guess it has to do with the directorry in which the satellite data is stored… Now I just unzipped the file I downloaded from scihub in my C:\users\documents folder (same as sen2cor) and then it works. Hope this is helpful to others who are struggling with the same problem.

1 Like

two very important hints, thank you for sharing!

1 Like

Found another possible source of the “cannot create L2A product” and the sen2cor “finished processing in 0 seconds” that I had. If you are experiencing this - check the file-folder structure of your unzipped S2*_MSIL1C*.SAFE folder and the archive zip you downloaded. In my case after unzipping and/or copying the .SAFE folder between drives the AUX_DATA folder in the unzipped .SAFE folder got deleted or was not copied or was not unzipped, may be due to it being an empty folder.

My solution was as simple as creating the AUX_DATA folder in the .SAFE folder, and now sen2cor runs from command line without problem even on .SAFE files deep in the folders on a separate drive (not system drive where sen2cor is installed). Hope this helps someone.


That’s odd, surely unzipping should create the empty folders too.

I just tried it again and the program “RAR opener” from windows app store omits the AUX_DATA folder in the unzipped .SAFE folder. It’s not there. However the winrar program does unzip ok it seems both single file and batch. Standard windows zip-folder process does not allow batch unzipping which is why I tried other programs.

From my experience 7-Zip is one of the best unzipping tools. It also works well on the command line.

I also had the same problem as Nicola.Colaninno, the problem was that SNAP is able to work with images even if they are compressed in the format. zip while Sen2cor is not capable, it needs the file to be unzipped.
The ABraun procdeure is correct.

1 Like

Hi, I am running into problems trying to integrate Sen2Cor (v. 2.5.5) to SNAP (v6.0) on Linux 64bit. I have tried both ways, to install Sen2Cor stand alone and link it to snap and to use the bundle installation. I am however still not able to run it . In command line the process runs without errors but in SNAP the Environment variables are reset to some defaults each time I open SNAP and if I reset them manually and attempt to run Sen2Cor I get following error:

I would be grateful for any suggestions you might have.

Dear Tereza,
The SNAP development team is working on a new adapter(plugin). The current SNAP adapter/plugin v6.0.0 is not working with Sen2Cor 2.5.5 due to some parameters changes. In a few days, a new adapter (SNAP plugin) will be available through SNAP update and the update will be announced.

1 Like

Ah OK, thank you for the update.