Help with sen2cor and SNAP

where can I find the L1C Product Directory on my computer?

this is the directory you download and extract to any folder you want. It is just required to not change the name of the folder

L2A_Process runs the correction from outside SNAP. It however requires a resolution and the name of the folder.

For example:

  1. You download the data in C:\Downloads\name.zip
  2. Then you extract the data here. This creates data in one subfolder wth the data (AUX_DATA…) you showed above. Leave the name as it is: C:\Downloads\S2A_OPER_BWI…
  3. You start the correction from the command line in this folder: C:\Downloads\ like this L2A_Process --resolution 60 S2A_OPER_BWI...
    You can recall the total name of the subfolder with the tabulator key so you won’t need to type it in manually.

Am I doing something wrong here? In specifying the L1C Level directory

I am using windows 7

Again here is where I have the files:

as stated in the error message: You may not rename the folder in which the data is located (S2A_10_6 in your case). It has to stay like it is extracted.

Extract it in your Project folder, so there is the S2A_OPER_BWI[...].safe folder. Run the command from outside this folder. Then it should work.

This time I renamed the folders as you said. But when I run the L2A Process command, I get this error.

can you please again post a screenshot of your folder?

this is how it works for me from the command line:

Get the data
the zip-file is in
D:\S2
in my case

Extract the data
The data is now located in
D:\S2\S2A_OPER_PRD_MSIL1C_PDMC_20160721T183022_R065_V20160721T102059_20160721T102059.SAFE

Open the command line in this superior folder, D:\S2 in my case. Don’t navigate in the data folder.

Type L2A_Process --resolution 60 S2A_OPER_PRD_MSIL1C_PDMC_20160721T183022_R065_V20160721T102059_20160721T102059.SAFE

You don’t need to type the whole folder name manually, just hit the tabulator button after the "60 " (indicated by the red x) and you will be given all names of the available files and folders. Make sure you select the folder (.SAFE) and not the zip-file.

Hit ENTER and it should run - given that sen2cor is installed correctly. Otherwise there was an error in the installation, the file structure, the data or your system variables.

Show us the error if it occurs.

Otherwise you will receive this:

A new folder is created: S2A_USER_PRD_MSIL2A_PDMC_20160721T183022_R065_V20160721T102059_20160721T102059.SAFE

It can be opened in SNAP.
They are optically alike but you can see the changes in a scatter plot, for example.

There is also a classification file. It is an indicator if sen2cor performed correcly (although there are many clouds in my example)

1 Like

Thanks! which snap version are you using?

the latest available
S1TBX 4.0.4
S2TBX 4.0.2

1 Like

Thanks I am using snap 4.0.0
Please take a look at my folder pic and my command pic, see if you spot anything am doing wrong.
Again, I appreciate your help

so what can you find under:
C:\Anaconda\Lib\site-packages\sen2cor-2.2.1-py2.7.egg\sen2cor

Is this your sen2cor installation directory?

1 Like

Yes, it looks like it is there.

no, your installation expects it under
C:\Anaconda\Lib\site-packages\sen2cor-2.2.1-py2.7.egg\sen2cor
while it is in
C:\Program Files\Anaconda2\Lib\site-packages\sen2cor-2.2.1-py2.7.egg\sen2cor

I think there went something wrong with the installation of sen2cor.

Enter pip uninstall sen2cor in order to delete it completely and run the installation again as stated in the manual.

1 Like

Thank you so much for your help!
cheers :slight_smile:

come on, don’t just post pictures of error messages if you expect help.

Most likely your installation was not successful. If you have other programs that use python there could be a mismatch between the different python versions.

User marko was successful by removing old GDAL variables from the environment and re-installing sen2cor.


Hello!
I have a problem while i try to install Sen2cor 2.2.1 in Snap 3.
I followed the steps of the release notes, so the L2A Process --help looks like that

which means the installation is ok.

After that in Snap i did all the instractions and i read the forum . The problem i had, i fixed it as i put the variables from the system so the PYTHON BIN which couldn’t find is ok.

Now it should work as i have uninstall and install from the begining and all looks okey, but when i load the image of S2 nothing happens.
Please i am very confused !
My pc’s window is 10
thanks in advance
A.

what error message do you get?

I don’t get error , when i load the image the program tries to read it , and after that nothing happens. The image is not loaded.
Is there any way to see the error while the image is loaded?

thanx again!