could you please give me a hint how to automatically call sen2cor for e.g. 20 L1C sentinel product in one directory? I know that I can use SNAP but it doesnt work for me from some reason (I got an error, when called gdal is not existing) but a single processing from command lines works perfectly. (WINDOWS)
So i have tried cal python script with something like
import os
os.system(r’L2A_Process --resolution 10 C:\sentinel\Jizerka\2016\input\S2A_OPER_PRD_MSIL1C_PDMC_20160429T215735_R022_V20160429T101028_20160429T101028.SAFE’)
os.system(r’L2A_Process --resolution 10 C:\sentinel\Jizerka\2016\input\S2A_OPER_PRD_MSIL1C_PDMC_20160506T210005_R122_V20160506T100527_20160506T100527.SAFE’)
but this ended up with error. I believe it it because that tries to process everything in paralel and there is a limit for memory, etc. But I don’t need a parallel approach, just some chain or order processing is enough.
probably the original aproach might work as well but the following works fine:
in conda:
for /D %s in (<PATH/TO/sentinelFolder>\S2A_OPER_PRD_MSIL1C*) do L2A_Process %s --resolution=10
But - the error could happens - in case you have already proccesed or partially processed (the structure is created) some products. From some reason, there is no check of a status of process and so that no proper end of loop (but the same error hapens during single processing by the same condition of the presence of bad results).
Thanks for your comments @ABraun. Now its can call the command but I got another error massage. Please see below,
C:\Sen2Cor\L2A_Process.bat C:\data\S2A_MSIL1C_20170818T103021_N0205_R108_T32TMT_20170818T103421.SAFE --resolution=10
Operation mode PDGS is not supported for Product version 14.2.
Operation mode will be reset to TOOLBOX.
Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.5.5, created: 2018.03.19, supporting Level-1C product version <= 14.5 started …
Product version: 14.2. Operation mode: TOOLBOX. Processing baseline: 02.05.
Cannot create the config object configPic.p, parent folder may be write protected.
For your kind information, the output folder is not write protected. I downloaded the data from Copernicus Open Access with my personal ID. Any solution?