Sen2Cor exits with "All images contain only invalid pixels"

Hi,

I’m running Sen2Cor to produce Sentinel-2 L2A scenes from L1C data. I’m running into an issue with specific scenes
where the bands (apparently) do not “contain any data”, and so Sen2cor terminates with a non-zero return code.
However, I notice that SciHub does have outputs for these scenes.

Consider the scene S2B_MSIL1C_20221205T140709_N0400_R110_T22PEA_20221205T155328 (I’m not sure how to link to the info page for that scene, but I think
https://scihub.copernicus.eu/dhus/odata/v1/Products(‘e16e69e2-7548-451b-90a3-89c8e097a080’)/$value is the download URL). That has a corresponding
L2A scene of S2B_MSIL2A_20221205T140709_N0400_R110_T22PEA_20221205T162557 (download URL: https://scihub.copernicus.eu/dhus/odata/v1/Products(‘a30a3fb5-c0c5-476a-97be-70382f725eac’)/$value).

I’m not sure how that L2A scene is produced. When running Sen2Cor (version 2.10.01) on a similar scene locally,
it exits with a returncode=1. I’ve copied the stdout from that run below:

    Sen2Cor. Version: 02.10.01, created: 2021.12.13, supporting Level-1C product version 14.2 - 14.9 started ...
    Product version: 14.9
    Operation mode: TOOLBOX
    Processing baseline: 04.00
    Progress[%]: 0.00 : Generating datastrip metadata
    L2A datastrip successfully generated
    No resolution specified, will process 20 and 10 m resolution
    20 m resolution will be downsampled to 60 m
    Progress[%]: 0.05 : PID-109721, L2A_ProcessTile: processing with resolution 20 m, elapsed time[s]: 1.483, total: 0:00:07.132872
    Progress[%]: 0.05 : PID-109721, L2A_ProcessTile: start of pre processing, elapsed time[s]: 0.008, total: 0:00:07.141268
    Progress[%]: 0.05 : PID-109721, L2A_Tables: start import, elapsed time[s]: 0.075, total: 0:00:07.216503
    Progress[%]: 0.10 : PID-109721, L2A_Tables: band B01 imported, elapsed time[s]: 1.242, total: 0:00:08.458796
    Band B02 does not contain any data
    Progress[%]: 0.17 : PID-109721, L2A_Tables: band B02 imported, elapsed time[s]: 2.236, total: 0:00:10.694493
    Progress[%]: 0.26 : PID-109721, L2A_Tables: band B03 imported, elapsed time[s]: 2.472, total: 0:00:13.166692
    Progress[%]: 0.33 : PID-109721, L2A_Tables: band B04 imported, elapsed time[s]: 2.330, total: 0:00:15.496810
    Progress[%]: 0.53 : PID-109721, L2A_Tables: band B05 imported, elapsed time[s]: 5.656, total: 0:00:21.152907
    Progress[%]: 0.59 : PID-109721, L2A_Tables: band B06 imported, elapsed time[s]: 1.930, total: 0:00:23.082575
    Progress[%]: 0.75 : PID-109721, L2A_Tables: band B07 imported, elapsed time[s]: 4.668, total: 0:00:27.750152
    Progress[%]: 0.95 : PID-109721, L2A_Tables: band B8A imported, elapsed time[s]: 5.977, total: 0:00:33.727504
    Progress[%]: 1.01 : PID-109721, L2A_Tables: band B09 imported, elapsed time[s]: 1.506, total: 0:00:35.233142
    Band B10 does not contain any data
    Progress[%]: 1.09 : PID-109721, L2A_Tables: band B10 imported, elapsed time[s]: 2.427, total: 0:00:37.660485
    Band B11 does not contain any data
    Progress[%]: 1.28 : PID-109721, L2A_Tables: band B11 imported, elapsed time[s]: 5.542, total: 0:00:43.202043
    Progress[%]: 1.47 : PID-109721, L2A_Tables: band B12 imported, elapsed time[s]: 5.789, total: 0:00:48.990668
    Progress[%]: 1.47 : PID-109721, L2A_Tables: AUX_CAMS* file found., elapsed time[s]: 0.015, total: 0:00:49.005747
    Progress[%]: 1.96 : PID-109721, L2A_Tables: Visibility map from file AUX_CAMSFO prepared, elapsed time[s]: 14.436, total: 0:01:03.441572
    DEM retrieved data contains no values, switching to flat surface
    Application will continue with a flat terrain
    Progress[%]: 2.64 : PID-109721, L2A_Tables: band WBI imported, elapsed time[s]: 19.993, total: 0:01:23.434911
    Progress[%]: 2.67 : PID-109721, L2A_Tables: band LCM imported, elapsed time[s]: 0.785, total: 0:01:24.220073
    Progress[%]: 2.69 : PID-109721, L2A_Tables: band SNC imported, elapsed time[s]: 0.521, total: 0:01:24.741255
    Progress[%]: 2.69 : PID-109721, L2A_Tables: stop import, elapsed time[s]: 0.093, total: 0:01:24.834009
    Progress[%]: 2.69 : PID-109721, L2A_ProcessTile: start of Scene Classification, elapsed time[s]: 0.001, total: 0:01:24.835052
    Progress[%]: 2.70 : PID-109721, L2A_Tables: band B02 must be resampled, elapsed time[s]: 0.304, total: 0:01:25.138625
    Progress[%]: 2.76 : PID-109721, Pre process , elapsed time[s]: 1.779, total: 0:01:26.918121
    Progress[%]: 2.76 : PID-109721, L2A_Tables: band B01 must be resampled, elapsed time[s]: 0.013, total: 0:01:26.931317
    Progress[%]: 2.93 : PID-109721, L2A_Tables: band B03 must be resampled, elapsed time[s]: 4.845, total: 0:01:31.775878
    Progress[%]: 3.00 : PID-109721, L2A_Tables: band B04 must be resampled, elapsed time[s]: 2.225, total: 0:01:34.000494
    Progress[%]: 3.08 : PID-109721, L2A_Tables: band B09 must be resampled, elapsed time[s]: 2.359, total: 0:01:36.359968
    Progress[%]: 3.15 : PID-109721, L2A_Tables: band B10 must be resampled, elapsed time[s]: 1.888, total: 0:01:38.248152
    All images contain only invalid pixels, processing will terminate
    Progress[%]: 3.24 : PID-109721, Post process , elapsed time[s]: 2.725, total: 0:01:40.972831
    Progress[%]: 3.24 : PID-109721, Post process , elapsed time[s]: 0.007, total: 0:01:40.979697
    Module L2A_T41PKT_A029990_20221203T063230 failed
    Progress[%]: 100.00 : Application terminated with at least one error.

Thanks for any help you can provide,

Tom

Dear user,

This issue has been fixed in Sen2Cor 2.11.

Please be aware of point 7) of Sen2Cor FAQ if you plan to install Sen2Cor version 2.11 on Linux recent distributions.

Cheers,

@Sen2cor_dev_team