Sen2Cor 2.4.0, Stand-Alone Installers, How To Install

Dear rashadkm:
Thank you very much for your reply. I will try to do it and I hope it works!
I’ll let you know.
thanks again
Anabel

Hello, thank you for your comment
regards
anabel

A post was split to a new topic: UnicodeDecodeError when processing with sen2cor

A post was split to a new topic: “DLL load failed” message when processing

I have the same problem. Does anyone knows how to solve it?

do you have the name of product?
we can download and test it here. once the issue can be verified on our side with same product, we can try to find a fix.
Thanks in advance

Thanx.
So I ve tried to install Sen2Cor 2.4.0. on the last version of SNAP what I download a few days ago too.
The filename of santinel is S2B_MSIL1C_20170719T145729_N0205_R039_T20QMF_20170719T145725.
I ve tried with another files but it still the same.
The data were processed in more than 99%, then it dropped to 97%, then it increased to about 99% and so on over and over. I had to stop the process. There were no errors in the console. It seems to me that program couldn’t pass the final processing stage. In addition, one granule in an anaconda is processed on another computer for about 15 minutes, but here it lasts all day and hasn’t ended. I also noticed that a folder with L2A data was created, but missing jp2 files. ¨

Thanks. I will download this data and have a look. Will keep you posted

Trying to install the sen2cor standalone version.
Tried to follow the instructions step by step.

C:\Windows\system32>C:\Users\User\AppData\Local\Sen2Cor-02.05.05-win64\L2A_Process.bat --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]
[–GIP_L2A_PB GIP_L2A_PB]
directory

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.5.5, created: 2018.03.19,
supporting Level-1C product version <= 14.5.

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
–GIP_L2A_PB GIP_L2A_PB
Select the processing baseline GIPP

					Product version cannot be read.

14.5 will be used by default, but warnings during validation might occur.
Traceback (most recent call last):
File “C:\Users\User.snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 354, in
sys.exit(main())
File “C:\Users\User.snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 175, in main
if not config.setProductVersion():
File “C:\Users\User.snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Config.py”, line 4747, in setProductVersion
self.processingBaseline = processingBaseline
UnboundLocalError: local variable ‘processingBaseline’ referenced before assignment
Finished tool execution in 43 seconds

Product version cannot be read.
14.5 will be used by default, but warnings during validation might occur.
Traceback (most recent call last):
File “C:\Users\User.snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 354, in
sys.exit(main())
File “C:\Users\User.snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Process.py”, line 175, in main
if not config.setProductVersion():
File “C:\Users\User.snap\auxdata\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Config.py”, line 4747, in setProductVersion
self.processingBaseline = processingBaseline
UnboundLocalError: local variable ‘processingBaseline’ referenced before assignment
Finished tool execution in 4 seconds

What could I be doing wrong? I am getting the “it seems there was an error on execution or the defined tool output error pattern was not found. Consult SNAP lof file” error.

l had the exact error with Sen2Cor 2.5.5 on the office computer (but not at home).
I’m not yet a 100% sure, but I think for me it was because the Sentinel-2 product wasn’t extracted correctly (the size of the unzipped product was too low). So it couldn’t find some properties it was looking for in there.

I have the same problem too.


Hi, I’am new to SNAP and Sen2cor. I tried to follow your instructions. And this is the result. I had an error message. I don’t know what else to do. Any suggestions?

Take a look at this post,

Source of the post

How to install and implement sen2cor version 2.08 please take a look the following thread,

Source of the thread

As I mentioned sen2cor had problem of implementing directly from SNAP, Nevertheless, you could implement it from the command shell,

Take a look at the following post,

Source of the post

to call sen2cor from the command line, first thing you need to add the sen2cor to your path, please have a look at the following post, How to add up sen2cor to the path,

Source of the post

After adding up sen2cor to your path, typing the following statement in your console

L2A_Process.bat --help

Should gives you the following result,

Source of the post

Also here is an example of call and implement sen2cor from the console, Navigate to the directory, where the granular is existed and then, implement L2A_ Process as below

L2A_Process ./S2A_MSIL1C_XXXXXXXXXXXXXXXXXXXXXX.SAFE -–resolution=10

Hey thanks for replying,
I tried to add the sen2cor to my path and I got an error message saying “too few arguments”

If you added up it correctly, there is no need to navigate to the sen2cor folder,

Also , Please type up the above command

Does this mean that it is added correctly?


however when I type the following this happens

Do you think the problem has to do with the fact that my image is L2A and not L1C?

First thing, I forgot to tell you to upgrade to

SNAP 7 official is released , is solved the issue,

Source of the post

Second thing , the adding path is correct, last issue is not correct, the sen2cor is applied to the L1_C, The L2A is already atmospheric corrected, but you could applied sen2three to the L1A if it’s needed.

Thanks for your fast reply.
I already have the SNAP 7, and I can’t run sen2cor 2.08 directly from it, so I’ll be using the command prompt directly.
My problem now is that I want to eliminate clouds from my Sentinel-2 L2A image. My advisor wants me to do it with sen2cor. I know that I can always find new images cloud-free from the scihub_copernicus website, but he wants me to figure it out based on the L2A image.Any suggestions?

Sen2Cor is a processor for Sentinel-2 Level 2A product generation and formatting; it performs the atmospheric-, terrain and cirrus correction of Top-Of- Atmosphere Level 1C input data. Sen2Cor creates Bottom-Of-Atmosphere, optionally terrain- and cirrus corrected reflectance images; additional, Aerosol Optical Thickness-, Water Vapor-, Scene Classification Maps and Quality Indicators for cloud and snow probabilities. Its output product format is equivalent to the Level 1C User Product: JPEG 2000 images, three different resolutions, 60, 20 and 10 m.

Source: http://step.esa.int/main/third-party-plugins-2/sen2cor/

So accordingly in case of thick cloud you should apply IdePix, and in this case IdePix is applied on L1C,

Please take a look at the following post,

Source of the post

@bbtobek Have you got the solution? If yes then please share it…I am also getting same error.
When I type ‘L2A_Process.bat -h’ I get the following error:
‘import lxml.etree as ET
ImportError: DLL load failed: The specified module could not be found…’

thanks.