Batch processing - sen2cor


Based on other threads that I have read, it appears that sen2cor is not currently working in SNAP batch processing. If this is true, what’s the easiest way to apply sen2cor processing to multiple files? If it is false, could you please explain the graph settings that are needed to make it work?

Thank you.

You need to write your own scripts to let it run on several files.
Maybe the example we have written for the use with gpt might serve as an example for you.
Bulk Processing with GPT.

1 Like

We us a simple BASh script to run multiple (>200) files in parallel. Most often there are problems and not all files get processed OK and we are not very happy withe performance. I am not 100% sure if it depends on SEN2COR or on data. Script looks like this:

#!/bin/bash for LUNARC
for j in $(ls -1Rd /projects/eko/fs1/S2/L1/$tile/S2?_MSIL1C*.SAFE); do
echo Processing: $j
/projects/eko/fs3/nateko/bin/Sen2Cor-2.4.0-Linux64/bin/L2A_Process --refresh --GIP_L2A /projects/eko/fs3/S2/33VUC_L2A_GIPP.xml --resolution 10 $j &

if [ “$NPROC” -ge 26 ]; then