Processing of multiple granules

I wrote a routine which allows the input of multiple Sentinel-2 products. Next, the script runs through the folder structure and search for those tiles/granules which are part of my area of investigation.
But when I have stored the name of the first granule I’d like to process, the process won’t start…
As explanation: ‘UPB’ contains the name of the granule S2A_OPER_MSI_L1C_TL_SGS__20151207T160946_A002393_T32UPB_N02.00.

I enter this command in my Python script:
L2A_Process UPB --resolution 10

For some reason I get the message: ‘SyntaxError: Invalid Syntax’. But the syntax is right, isn’t it?
Is it possible to run L2A_Process from within Python or is it necessary to call L2A_Process from the Win Command Line (in my case)?



it should be possible to run it from python, e.g.:

cmd = ‘L2A_Process --resolution 10 < path >’

I am not sure about the actual version of sen2cor, but I think you have to process sen2cor from the main directory of your S2 dataset. If you dont want to process a certain tile, then you can remove/delete the GRANULE folder of this tile.


As described here:
sen2cor on a sub-scene? [Granule Processing]
Sen2Cor Produce just part of L1C image [Script for the previous version of sen2cor]

1 Like

@abgbaumann: Thanks, that was the right solution. I totally forgot that the execution of L2A doesn’t happen from the python console…