Sen2cor stops processing without any error for files between October and November

Hi guys,

I am using sen2cor 2.3.0 to process 19 different files throughout the year 2016. I have noticed something peculiar. So far it worked as expected for files from December 2016 (e.g. files after the name procedure change/update) and for files from December 2015 to about September 2016 (e.g. files before the change to SAFE files to only contain 1 granule). Files from October and November 2016 do not work. I get:

F:\Data> L2A_Process --resolution 60 "S2A_MSIL1C_20161002T141733_N0204_R105_T43SGR_20161002T053919.SAFE"
    
Sentinel-2 Level 2A Prototype Processor (Sen2Cor), 2.3.0, created: 2016.11.18 started ...

F:\Data>

It stops randomly with no traceback or anything. Also as far as I remember, I haven’t altered the SAFE file or anything. But I took a look at the L2A_Process.py file and was able to trace the error to lines 297-299, which read:

L2A_TILES = updateTiles(config)
if L2A_TILES == False:
    return FAILURE

Anyone encounter this error or managed to solve it?

EDIT: updateTiles is a function at the beginning of the L2A_Process.py file, I believe something with the naming convention is broken in sen2cor or the SAFE files. I have decided to first run all files that work, before I will attempt to test this function further.

Ok, I solved the problem. Turns out I did alter the SAFE file. I renamed the SAFE files from October and November to match the new post-December naming convention, however, I didn’t change the names of the internal folder (e.g. granules), which caused the Sen2Cor to exit prematurely by thinking there were no tiles to process.

So lesson, don’t change files names or anything before processing using Sen2Cor!
Cheers

1 Like

I’m having the same problem but didn’t change any file or folder names. I’m using S2 from google public cloud.

Can you elaborate on your problem? Is it maybe Google’s (Earth Engine?) names are different from the standard Sentinel-2 naming conventions?

I’m trying to run sen2cor on the image downloaded from here:

https://console.cloud.google.com/storage/browser/gcp-public-data-sentinel-2/tiles/28/S/CB/S2A_MSIL1C_20160807T120222_N0204_R023_T28SCB_20160808T001240.SAFE/

I simply get:

“Sentinel-2 Level 2A Processor (Sen2Cor), 2.3.1, created: 2017.02.03 started …”

and nothing happens.

Ok, I had a look at the file names and even though you didn’t change them they are incorrect. Its the same case I had, the directory filename follows the new convention, while the rest of the directory follows the old convention.

So a quick fix to trick Sen2Cor in thinking it is the old naming convention is to add _OPER_PRD to the directory name, that it looks like:

S2A_OPER_PRD_MSIL1C_20160807T120222_N0204_R023_T28SCB_20160808T001240.SAFE

That should work, also if you have want to have more verbose messages from Sen2Cor, open the GIPP file (on Windows it is \Documents\sen2cor\cfg\L2A_GIPP.xml) and on the fourth line change Log_Level to ERROR or CRITICAL.

2 Likes

Thanks a lot!
I did exactly as you say, but I still get nothing. Same “Sentinel-2 Level 2A Processor (Sen2Cor), 2.3.1, created: 2017.02.03 started …” message. :confused:

Then I don’t know, then there are probably some more things wrong with the directory format, maybe you should attempt a way to download the same files from the Scihub because then the format will be correct. Or you can go into the Sen2Cor Python code to attempt and place some print statments to see where it goes wrong?

I think I got it.
I also needed to create a folder “AUX_DATA” and adjust line:

self.datatakeSensingTime = L2A_UP_ID[25:40] to
self.datatakeSensingTime = L2A_UP_ID[20:35]

Cheers! Good to hear, hope it works out.

Hi all,
I’ve installed sen2cor 2.3.1 onto anaconda2 4.2.0 from ubuntu 14.04. I have no problem during installation. When I launched L2A_Process, sen2cor stops processing with no error description.
Command:
/usr/local/anaconda2/bin/L2A_Process --resolution=10 S2A_MSIL1C_20170303T074821_N0204_R135_T37PCS_20170303T080436.SAFE/
Sentinel-2 Level 2A Processor (Sen2Cor), 2.3.1, created: 2017.02.03 started …
$
I changed file name of sentinel-2 directory as previously described but I have the same problem.
Any suggestion ? Have you resolved your own but similar problem ?

Note I changed version of Anaconda2 from 4.3.1 to 4.2.0 to resolve an other issue discussed hereafter
http://forum.step.esa.int/t/issue-with-installation-of-sen2cor-2-3-1-on-ubuntu-16-04-and-other-linux-distributions/4764
Regards.