L2A processing error:Not a TIFF file, bad magic number 0 (0x0)

I’ve got an error when i tried to run atmospheric correction(L2A) even if Cloud_Coverage_Assessment is 59,14.
Error: /mnt/archive/temp_maccs/workingDir/3489/29SNR/S2B_MSIL1C_20190216T111129_N0207_R137_T29SNR_20190216T132223.SAFE/GRANULE/L1C_T29SNR_A010173_20190216T111505/IMG_DATA/T29SNR_20190216T111129_B05.jp2:Not a TIFF file, bad magic number 0 (0x0)

MACCS mode L2INIT didn’t work for /mnt/archive/…/S2B_MSIL1C_20190216T111129_N0207_R137_T29SNR_20190216T132223.SAFE/
No report maccs files (REPT) found in: /mnt/archive/temp_maccs//maccs_29SNR.
No valid products (VALD status) found in: /mnt/archive/temp_maccs//maccs_29SNR.
MACCS did not processed any tiles for L1C product /mnt/archive/…/S2B_MSIL1C_20190216T111129_N0207_R137_T29SNR_20190216T132223.SAFE/

Please find attached the image


We noticed too the “Not a TIFF file, bad magic number 0” message in MACCS but this is not a critical error. I think this is just a way of MACCS to test if the file is a tiff or not (but this is just an assumption as MACCS is a tool developed by CNES). Nevertheless, you could try for that product the following steps:

  • go to the /mnt/archive/maccs_def/…/S2B_MSIL2A_20190216T111129_N0207_R137_T29SNR_20190216T132223.SAFE/
  • check the log file with the name of the tile (demmaccs_29SNR.log)
  • copy the command /usr/share/sen2agri/sen2agri-demmaccs/demmaccs.py --srtm /mnt/archive/srtm --swbd /mnt/archive/swbd --processes-number-dem 1 --processes-number-maccs 1 --gipp-dir /mnt/archive/gipp/ --working-dir /mnt/archive/demmaccs_tmp/ --maccs-launcher /opt/maccs/core/5.1/bin/maccs --delete-temp True /mnt/archive/dwn_def …
  • (that should be at the beginning of the file)
  • log in as user sen2agri-service (sudo su -l sen2agri-service)
  • execute the copied command
    In the console you should see the detailed logs that might help you identify the problem.

Best regards,

First of all thank you for your response.
I followed the steps that you suggested, so the detailed log gave the same error that i mentioned in the first post: "The detector indices are not in ascending order or do not have a constant shift with the feature indices in the MSK_DETFOO /mnt/archive/demmaccs_tmp/19891/29SN /S2B_MSIL1C_20190216T111129_N0207_R137_T29SNR_20190216T132223.SAFE/GRANULE/L1C_T29SNR_A010173_20190216T111505/…/…/GRANULE/L1C_T29SNR_A010173_20190216T111505/QI_DATA/MSK_DETFOO_B02.gml ! " and " MACCS mode L2NOMINAL didn’t work for /mnt/archive/dwn_def/…’’.
Why Maccs doesn’t work on this image even if Cloud_Coverage_Assessment is 59,14, is there another reason?

It seems that there is a problem in MACCS when the detector indices are not in ascending order (we also are facing this problem). It seems that starting from November a lot of S2 L1C products started to be produced by ESA with this issue. Unfortunately, MACCS is not under our control so we cannot correct this.
We have integrated MAJA into Sen2Agri system but it is still some work to do for using the MAJA new products format by the processors and also validating it.
We are hoping to release version 2.0 of the Sen2Agri system within a month or so.

Best regards,