Setting SEN2COR_HOME in SNAP

I used Stand-Alone Installer and installation seemed to have gone well (the processor answered they way it was supposed to answer). The sen2cor folder with the configuration file is also under User/Documents.

When I opened SNAP, uninstalled Sen2Cor and installed it again, the SEN2COR_HOME system variable was missing. I managed to change it once by manually writing the sen2cor path in External Tools and was able to make the atmospheric correction. The next times I opened SNAP and tried to add the SEN2COR_HOME path I got an error message "The tool executable does not exist. "

I have uninstalled SNAP and ran the .bat again but the same error keeps coming. The sen2cor folder has only one file called “L2A_GIPP” under cfg. Any suggestions what I should try next? I would like to use SNAP instead of command line.

Thank you for the help!

1 Like

If you installed Sen2Cor “classic” (ie. not the Standalone version) the executable is python, but the environment variables should be already set and you should only have to click “OK” on the settings windows. SNAP currently doesn’t support Sen2Cor standalone, it will be available as soon as SNAP 6 is released.

Hello.

I am new to SNAP and I manage to install SNAP 5 on UBUNTU 16.04. I just installed SEN2COR through SNAP plugin as Nicolas said above and restarted SNAP. However when I try to run sen2cor I got the warning message saying:
"
Before executing the tool, please correct the errors below:

Working path does not exist: ‘$SEN2COR_HOME’
Variable SEN2COR_HOME is not set
"

Then SNAP gave me the tab with Sen2Cor:
“Operator Descriptor
Configuration Parameters
Preprocessing
Operator Parameters
System Variables”

So I went to System Variables and indeed SEN2COR_HOME is not set and its Value is empty.
SEN2COR_BIN has as Value: C:\Anaconda\Lib\site-packages\sen2cor-2.2.1-py2.7.egg/sen2cor
PYTHON_BIN has as Value: python

I am running SNAP on Ubuntu so the Value for SEN2COR_BIN must be a folder under Linux, right? but the setting values are for Windows… I’ve already looked for sen2cor in my computer but with no success.

My questions are:
Where SEN2COR_HOME and SEN2COR_BIN must be set?

Many thanks.
Claudia

Hi @comachi,

Did you install sen2cor before installing the plugin? Is it working via command line?

Hello.
Thanks for replying.
I first installed SNAP 5 then installed SEN2COR via SNAP plugin.

I couldn’t run SEN2COR via SNAP because its path isn’t set and SNAP can’t find it so I installed SEN2COR stand alone and running via command line now.

Thank you.
Claudia

Hi,

sen2cor is an external tool that can be executed in SNAP using the sen2cor plugin. The plugin is an “Standalone Tool Adapter” which allows running the tool from SNAP, but you have to install sen2cor previously on your PC. You can find sen2cor in the following link:
http://step.esa.int/main/third-party-plugins-2/sen2cor/
Currently, there are two options to get sen2Cor:

  • the new standalone installers, which are much easier to install but are not fully integrated with SNAP v5 (they will be in version6). You shoul use it from the command line and after that you will be able to open the results in SNAP.
  • the “classic” installer which requires Anaconda and can be integrated in SNAP via the plugin you have installed.
    I would suggest using the standalone installer and when version 6 of SNAP is released, integrate it in SNAP.