Speed up Sen2Cor batch processing

Hi,
I’m using Sen2Cor thru command line “L2A_Process” . Since I want to process 45 Sentinel-2 products I’m using that process in a for loop (UNIX code for linux):

for file in ./*.SAFE; do L2A_Process --resolution=10 file; done

this code are working fine, but seem it does not use al the machine capability. the CPU usage are less than 20% and the RAM occupied is 20 Gb with 40 Gb free.

Since the processing time is very long, I’m asking if there is a way to speed up the process using more machine hardware.

Thank you all,
Best.

I do not know the particulars of Sen2Cor but large EO raster-data processing is very often I/O-limited, therefore SNAP on SSD (or RAMDISK) is way faster than on HDD.

try for file in ./*.SAFE; do L2A_Process --resolution=10 file & ; done

it doesn’t work at all.
error: unexpected ;

If I were you I would script the processing using Python.
Python also has a good multiprocessing libary.

Hi,

Do you mind sharing your UNIX code for batch processing with Sen2Cor? I also want to batch processing L1C files for atmospheric correction in Linux.

Thank you!
Bests,
Han