Error when the Groundstation string identification name is over 3 character

if I try to use san2core with L1C image that have in the Groundstation’s identification more than three characters I recive error signal. This error is generate becose in the name ther are a different number of ‘_’

No ERROR name

S2B_OPER_MSI_L1C_TL_SGS__20180816T190016_A007543_T22KFE_N02.06
if use split (’_’)
[‘S2B’, ‘OPER’, ‘MSI’, ‘L1C’, ‘TL’, ‘SGS’, ‘’, ‘20180816T190016’, ‘A007543’, ‘T22KFE’, ‘N02.06’]

ERROR name

S2B_OPER_MSI_L1C_TL_EPAE_20180819T200710_A007586_T22KDE_N02.06
if use split (’_’)
[‘S2B’, ‘OPER’, ‘MSI’, ‘L1C’, ‘TL’, ‘EPAE’, ‘20180819T200710’, ‘A007586’, ‘T22KDE’, ‘N02.06’]

So I modifed the function L2A_Tables.py in this manner

add a ‘_’ if Groundstation has only 3 character (see section 3.4.2 of PSD 14.1):

            if len(t1c_split[5]) == 3:
                t1c_split[5] += '_'
                self._tileId2a = t1c_split[0] + '_USER_' + t1c_split[2] + '_' + t2a_split[0] + '_' + \
                           t1c_split[4] + '_' + t1c_split[5] + '_' + t2a_split[3] + '_' + \
                           t2a_split[2] + '_' + t2a_split[1] + '_' + t1c_split[10]
            else :
                self._tileId2a = t1c_split[0] + '_USER_' + t1c_split[2] + '_' + t2a_split[0] + '_' + \
                           t1c_split[4] + '_' + t1c_split[5] + '_' + t2a_split[3] + '_' + \
                           t2a_split[2] + '_' + t2a_split[1] + '_' + t1c_split[9]

Hi,

what version of sen2cor are you using? I think that in the latest version (02.05.05) this bug was already fixed. (And I think that it was made exactly in the same way)

I have modified the version 2.4.0 but if I try to use the last version I have this error

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.5.5, created: 2018.03.19, su
pporting Level-1C product version <= 14.5 started …
Product version: 14.5. Operation mode: PDGS. Processing baseline: 02.06.
Traceback (most recent call last):
File “X:\Tool\python\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Pro
cess.py”, line 354, in
sys.exit(main())
File “X:\Tool\python\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Pro
cess.py”, line 309, in main
L2A_TILES = updateTiles(config)
File “X:\Tool\python\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Pro
cess.py”, line 40, in updateTiles
L1C_TILES = config.createOrUpdateL2A_UserProduct()
File “X:\Tool\python\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Conf
ig.py”, line 3356, in createOrUpdateL2A_UserProduct
self.createAtmDataFilename()
File “X:\Tool\python\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Conf
ig.py”, line 4572, in createAtmDataFilename
delta = self.assignOzoneContent()
File “X:\Tool\python\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Conf
ig.py”, line 4620, in assignOzoneContent
self.ozoneContent = min(columns, key=columns.get)
AttributeError: ‘NoneType’ object has no attribute ‘get’

I use this test data

‘S2B_MSIL1C_20180819T134209_N0206_R124_T22KDF_20180819T200710.SAFE’