Sen2Cor 2.4.0, Stand-Alone Installers, How To Install

Tried the standalone installer, works fine - good job!

Adding the directory to PATH variable made it available from anwhere.

Thanks Uwe,
Sen2cor can now be Installed fast and works at once on a Fedora Linux computer. Good work !
Does the new version includes algorithm improvements ? I just noticed a few bug corrections that will affect the results.
Best regards,
Olivier

Hi Olivier & Andreas, thanks for the flowers, the stand alone installer has been developed by CS, so I will forward the compliment to them. About algorithm improvements: The following three fixes have in fact a slight impact on the output results compared to V.2.3.1: SIIMPC-952, 957, 998 and 1015 (see release note). Bigger Alogithmic improvements are planned for the next release 2.5.0 (already under development) for cirrus correction and AOT.
Cheers,
Uwe

3 Likes

Hello,
I installed the standalone and added the directory in the PATH variables as suggested. When I try the command line, it’s working and it can actually work from anywhere.
However, I can’t run Sen2Cor in SNAP. Somehow, there is always that SNAP extension running in place. Any tips on how to run the new standalone version in SNAP? or maybe a detailed explanation on how to process an image using the command prompt? Thanks in advance and sorry if my question is too “dumb” :confused:

Thanks,
Confiance

1 Like

I don’t think it is dumb at all. I also wondered how SNAP ‘finds’ sen2cor if it is just used as standalone software.

1 Like

SNAP 6 will come with a Sen2Cor stand-alone plugin; when you launch the Sen2Cor via SNAP for the first time, it will ask you if you want to download the plugin. If it’s already downloaded you will be able to tell SNAP it’s location. SNAP 5 works with classic Sen2Cor.
Launching stand-alone Sen2Cor with SNAP 5 would requires to change the SNAP adapter (change the executable path, the command line…).

1 Like

I am on Ubuntu 16.04 LTS
The install process went smoothly but I struggled to get it to work. The bash script is in the bin folder, only this worked:

~/Software/Sen2Cor-2.4.0-Linux64/bin$ bash L2A_Process --help
usage: L2A_Process.py [-h] [--resolution {10,20,60}] [--sc_only] [--cr_only]
                      [--refresh] [--GIP_L2A GIP_L2A]
                      [--GIP_L2A_SC GIP_L2A_SC] [--GIP_L2A_AC GIP_L2A_AC]
                      directory

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.4.0, created: 2017.06.05,
supporting Level-1C product version: 14.

positional arguments:
  directory             Directory where the Level-1C input files are located

optional arguments:
  -h, --help            show this help message and exit
  --resolution {10,20,60}
                        Target resolution, can be 10, 20 or 60m. If omitted,
                        all resolutions will be processed
  --sc_only             Performs only the scene classification at 60 or 20m
                        resolution
  --cr_only             Performs only the creation of the L2A product tree, no
                        processing
  --refresh             Performs a refresh of the persistent configuration
                        before start
  --GIP_L2A GIP_L2A     Select the user GIPP
  --GIP_L2A_SC GIP_L2A_SC
                        Select the scene classification GIPP
  --GIP_L2A_AC GIP_L2A_AC
                        Select the atmospheric correction GIPP

Just to make people like me save some time :slight_smile:
Thanks for the new version

Thanks for the hint, I have updated the installation procedure accordingly.

Hello

Today in order to process the new L2B data, I’ve unistalled SNAP 5 and sen2cor 2.3.0, I’ve installed the new sen2cor 4.0 standalone (using the procedure that I read in this post and all seem OK) and then I’ve installed the beta version 6.0 of SNAP.

I’ve read above that when I launch the Sen2Cor via SNAP 6.0 for the first time, it will ask me if I want to download the plugin. If it’s already downloaded I have to tell SNAP it’s location.

This non happened to me… When I search sen2cor in “Optical -> thematic land processing” I can’t find it and SNAP don’t ask me to download the plugin.
If I go in “tools -> Plugins” I can’t find sen2cor in any tags (Availeble Plugins, Downloaded, Installed ecc.).

Any idea on how to run the new standalone version in SNAP 6.0?
How can I add to SNAP the sen2cor location?

Thanks in advance

Roberto

Hi,

I found something much more simple for my Ubuntu 16.04 config… I had forgotten about the command source (or ‘.’)
Either in the bashrc or before you start your script, you can do:
source /home/user/sen2cor/L2A_Bashrc
or
. /home/user/sen2cor/L2A_Bashrc

L2A_Process command should now work from anywhere.

Cheers

L2A_Process script in bin directory already does the source ./L2A_Bashrc. Maybe this file could be removed in future release and put all those env setting inside bin/L2A_Process.
Users then only have to call L2A_Processs with full path, alias, or adding PATH or sen2cor240/bin to system PATH

@umwilm, any thoughts ?

1 Like

I do not use sen2cor, I think I should install correctly, but when I go to run it the following error appears:
"Before executing the tool, please correct the errors below: - Working path does not exist: $SEN2COR_HOME

  • Variable SEN2COR_HOME is not set "

I need help, urgently!!!

so did you set this variable already?

How to set it correctly is explained in multipe topics: http://forum.step.esa.int/search?q=sen2cor_home

Hi there !

I’ve a problem too with the installation. I’m on windows 10 - 64bits.
As you can see here, everything is fine about the Sen2cor file. It is situated in the Users documents.
The command displays the right message :

Then I’ve set the PATH into the environment variables :

And after this step, I launch SNAP but there is no Sen2Cor tool in “Optical -> thematic land processing”. Did I miss something or something is wrong with my installation ?

Thanks in advance

Remi

1 Like

Would anyone please make a Youtube video showing the installation and running of the stand alone Sen2Cor plugin in windows as it would help many users to
follow and do it the right way Please!

3 Likes

I am trying to install on armv71 architecture (64bit, Raspberry PI 3) but I get

bin/python2.7: cannot execute binary file: Exec format error

and ELF errors, which suggest the compilation is not working for this kind of architecture. Since sen2cor is not really open source, there is supposedly no possibility to compile from source. Do you intend to release a binary version for armv71?

Guido

you can get sen2cor 2.4.0 sources but not for atcor. ATCOR is proprietary of DLR and is only released in binary form by ESA.
Here you must pay attention to “binary form”. Sen2cor is expected to run on three major platforms namely Windows, GNU/Linux, OSX. Unfortunately, the list doesn’t include any RPIs.

Adding RPI to list of “supported” will be more maintenance without almost zero benefit.
because there are some memory requirements when it comes to Sen2Cor processing. I

What is your actual use case of sen2cor in RPI? just curious?

Well, you assume there is zero benefit, but you do not know that for sure. Also, if you would make sure the whole project would be open source, you would not have any maintenance issues at all, because the specific user community and source compilation would accommodate that.

Memory issues may be manageable as well, but would also require access to the source. Most of the processing of sen2cor appears to be localised, so should be streamable to a large extent. In fact, you do not have a developer community for sen2cor, exactly because it is closed at the core.

I am interested in demonstrating cheap processing solutions on RP3s (35 Euro per piece), e.g. for anyone who cannot afford big hardware solutions. That often means tailoring to low(er) bandwidth and stripping bulky processing solutions to the bare minimum. Atmospheric correction is essential for S2 use. I am looking at (open source) 6S as an alternative, because it yields comparable results to sen2cor.

I’ll check the source for the scene classification and water vapour, because I understand these are independent from the atcor part (but useful to finetune 6S).

1 Like

I really don’t buy this. Usually maintenance cost is not tied only on packaging or building. It is much more that that…
Anyway, You are diverging from subject which was “Sen2Cor 2.4.0 stand-alone Installers”. The post itself on says about linux, osx, windows. It is okay to start discussion about 6S, Sen2Cor and ATCOR, licenses (apache2, mit, GPL3) but you are doing this on wrong thread.
If you want to get ATCOR part under an open source license, feel free to start a new thread or make new project and publish it as open source!.

It is really cool to have this.
I wish you will be able to succeed in getting a cheap alternative solution for Sen2Cor.

Well, wrong again. My RP3’s run 64 bit linux, so perfectly match both the title and the content of this thread. It was you who started about maintenance. What is the “much more than that…” part of maintenance exactly? I do not agree that the choice of open source or not has no impact on software maintenance and evolution, but happy to leave that for another thread.