SEN2COR tool

Hello,

i am trying to run Sen2cor (2.0.5) in SNAP (2.0-beta-08) as an external Tool.
I installed sen2cor sucessfully and the L2A_Processor is working on command line level.
If you need, i can provide my command line output from L2A_Processor.
I am working on a Windows 7 64bit machine.

I followed the discussion in the forum, but i am still having problems to create a L2A through the integrated sen2cor Tool in SNAP. Heres what i have done so far:

  • I renamed the root folder to: S2A_OPER_PRD_MSI_L1C_ to get rid of path length issues
  • Local Input path of the XML: D:\beck_ct\data\s2a\L1C\S2A_OPER_PRD_MSI_L1C_

I keep getting following error:

Is it possible that those errors are produced through the renaming oft the root folder?

Many Thanks in Advance,
Christian

1 Like

Dear Christian,

You get this message because you chose to see the processor output. There is a message saying Metadata file is invalid because of compliance to PSD (the product spec) but ‘Application terminated successfully’ so apparently everything went fine. What you see is a warning message that is not related to the folder.

Dear Nicolas,

thanks for your quick reply.
So for now we dont have worry too much about the metadata Validation errors?

Hello @chris,

For the moment, no. @umwilm will tell you more about it.
Please notice that a new release of sen2cor (2.0.6) is now available, with a few important fixes. Be sure to update !

Hi @sgri0009 !

Hope you noticed that now with the latest SNAP 2.0, the scene classification data is read automatically.

It appears in the “Index Bands” category, and tuning the color manipulation can quickly get you to the visualization you want.
Also, for each class, there is a dedicated Mask that can be used in SNAP, so you can visualize each class independently.

Hi,

The validation warning (error) currently appears due to a “mixture” of V12 and V13 in the L1C input data. This will be cleaned up in the coming version, as we currently received a new V13 Metadata scheme which must be integrated.
it does not have impacts on the generated output product.

Hi,

thanks for clarification @umwilm!
@jmalik: I recognized the new version of sen2cor you provided. Thanks for the advice!
General procedure for updating to a new version? I propose run install.py?

Thank you,
Christian

Great!

downloaded SNAP 2.0 and will give it a try.

Thanks

Hi,

best way to be sure to remove the previous version(s) in anaconda before a new installation:

“ pip uninstall sen2cor “ (see http://s2tbx.telespazio-vega.de/sen2cor/sen2cor-sum-2.0.pdf , section 3.1.5 for details.)

Then continue as is written in section 2.1 or 2.2 of http://s2tbx.telespazio-vega.de/sen2cor/SETUP.pdf

“ python setup.py install “

Cheers,
Uwe

Anyone else getting this kind of error. It looks like I am lacking some python dependencies. What is the library I have to install?

Instead of opening another thread, I’ll reply to this one as it is somehow related.

I installed Sen2Cor 2.0.6 on Ubuntu 14.04 LTS, as documented.

I downloaded 2A_OPER_PRD_MSIL1C_PDMC_20151201T182509_R137_V20151129T112140_20151129T112140.

After subsetting the scene, as it is a 6,3 GB full scene, using Sen2Cor give me the “fatal error” :
directory “…/DATASTRIP/” does not exist.

EDIT: From what I’m understanding, the ancillary mask data aren’t being subset and copied.

I had to execute Sen2Cor on the full scene, for a 10 hour run, with the already reported warnings but with useful results.

Is there any method to subset or apply a mask to a full scene, before calibrating with Sen2Cor?
Thank You,
Luís

1 Like

Hello everyone

I installed successfully sen2cor independently but I got this message right after the start of the processing.
Is there anybody who bump into this same issue? many thanks for providing guidance and help.

Hi Jegrix I am also facing the same issue? have you solved it? please let me know thanks Enrique

@eblondel Yes I did resolve the problem. The installation manual is somewhat misleading as installiation command python setup.py install actually installs sen2cor under your default Python installation that is usually (for windows) located in C:\Python27. You do not want that. Sen2cor has to be installed under Anaconda Python package. For that I used the following command C:\...\Anaconda2\python.exe setup.py install to sucessfully install the tool.

1 Like

Hi Jegrix, thanks for responding, I followed you instructions to the letter but I am still getting the same SNAP-Warning, No Module named tables. I even uninstall Anaconda2 and reinstall it again upon rebooting my desktop. Please let me know what I am doing wrong. Thanks again

For sen2cor installation I’m following the “SETUP.pdf” file indication. In the step 2.1 after unzipped “sen2cor-2.0.6.zip” file,
I don’t know hot to go on. The tutorial says "Open the folder sen2cor - 2. 0.6 , type “ python setup.py install”. This step is very unclear for me. Where do I have to type? Thanks in advance.

Open anaconda 2 command prompt then unzip the sen2corr package in the same folder of anaconda2 under the users folders then C:…\Anaconda2\python.exe setup.py install.
Anyway there is a bug and I can’t still manage to apply actor to the S2 files but I am pretty sure they are now working to solve the issue soon. Greetings

Hi there!

I have installed SEN@COR separately form SNAP, I think that I followed by all instructions. Unfortunately, when I want to use SEN2COR I have this kind of problem:

I would be grateful for some help. I don;t have any idea what to do.

Thanks a lot.

Hi, I’m having some problems installing sen2cor and looking for some tips. I tried to install it on two different (windows) machines and neither works. On one machine it actually seems to install correctly but any L2A_Process I run immediately shows a “python.exe has stopped working” error with the following error in the command prompt:

File “c:\users\user\anaconda2\lib\site-packages\glymur-0.8.0-py2.7.egg\glymur\lib\openjp2.py”, line 1268, in _stream_create_default_file_stream_2p0
stream = OPENJP2.opj_stream_create_default_file_stream(fptr, read_stream)
WindowsError: exception: access violation writing 0x0000000000000024

If running the L2A_Process --help command it will show no errors in the command prompt but again the “python.exe has stopped working” is shown. On the other machine it seems installation failed since the L2A_Process --help shows the following:

c:\users\user\anaconda2\lib\site-packages\glymur-0.8.0-py2.7.egg\glymur\lib\con
fig.py:102: UserWarning: The library specified by configuration file at C:\Users
\user\Anaconda2\Scripts\openjp2.dll could not be loaded.
warnings.warn(msg.format(path), UserWarning)
c:\users\user\anaconda2\lib\site-packages\glymur-0.8.0-py2.7.egg\glymur\lib\con
fig.py:151: UserWarning: Neither the openjp2 nor the openjpeg library could be l
oaded.

If running the same on an S2 file then it will also display this:

ImportError: DLL load failed: The application has failed to start because its si
de-by-side configuration is incorrect. Please see the application event log or u
se the command-line sxstrace.exe tool for more detail.

Both machines are 64-bit windows where I installed Anaconda2 and sen2cor 2.0.6. Ideas? Thanks

OK the “python.exe has stopped working” machine is working now! I had references to GDAL in the system environment variables, removed those and reinstalled. I suggest adding this as a note in the setup.pdf file