I am trying to convert Sentinel L1C to L2A using command line interface. I installed sen2cor and then in command line where the directory where L2A_Process.bat is located I ran the following command.
L2A_Process.bat --resolution 10 C:\Users\Sentinel\S2A_MSIL1C_20171015T044751_N0205_R076_T45RVL_20171015T045632.SAFE
The command line showed no output and no errors.
What am I doing wrong ? is the path too long ?
The path is not too long.
Any reaction should be printed when the script is started. Is there nothing?
How are you running
L2A_process.bat (e.g., in a terminal with PowerShell, cmd, the “Run” window, or some other way)?
@marpet No nothing appears.
@gnwiii I use the run command (cmd prompt)
@marpet @gnwiii I was using the sen2cor v_2.10, I tried with sen2cor v_2.5.5.
The input to the command line was C:\Sen2corprocessing\Sen2Cor-02.05.05-win64>L2A_process.bat --resolution 10 C:\Sen2corprocessing\S2A_MSIL1C_20171015T044751_N0205_R076_T45RVL_20171015T045632.SAFE
The output showed the following
C:\Sen2corprocessing\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\cfg\L2A_GIPP.xml → C:\Users\Com1\Documents\sen2cor\2.5\cfg\L2A_GIPP.xml
1 File(s) copied
The .XML file generated does not open in SNAP.
I’m still not sure what this means. Do you enter “cmd” in the Run text box to get a terminal or are you entering the command line in t\he Run text box? If you do the latter you may not see error messages.
Maybe @fgascon can have a look.
This xml-file is the configuration file for running Sen2Cor, it can not open in any product in SNAP.
Your command looks correct. But I launch Sen2Cor on Windows in “run” window or power shell, not on cmd prompt.
What do you get if you are simply type: L2A_process --h ? You should get a message about input parameters.
@bdpg L2_A Process --h gives the correct result which is expected.
Then it should be running with your command too. At least for me it does, checked both with Sen2Cor 2.8 and 2.10.
Is the path to your product correct? Do you have tried with another product for checking if your data file is corrupt?
@bdpg I found the issue, Sorry to bother everyone. But it seems that the antivirus was preventing sen2cor from reading the files.