Error NodeId:S2Resampling: Invalid S2 source product when obtaining SZA at 60m

I’m running SNAP 7.0 on different dates and tiles for S2A and S2B data.

I mainly got the error when processing L1C files with date 20180510T112121 and processing time 20180510T133456

The following codes was used to obtain the SZA at 60m from S2A_MSIL1C_20180510T112121_N0206_R037_T30TTK_20180510T133456.SAFE and gave the error

/usr/local/snap/bin/gpt /home/user/sentinel2biopar/resample_band.xml -J-Djava.library.path=/usr/local/snap/auxdata/gdal:/usr/local/snap/auxdata/gdal/gdal-2.2.0-linux/lib/jni:/usr/local/snap/auxdata/gdal/gdal-2.2.0-linux/lib/ -Dsnap.dataio.gdal.creationoptions=“COMPRESS=DEFLATE;TILED=TRUE” -Dsnap.jai.defaultTileSize=256 -c 512M -q 8 -Poutput_format=GDAL-GTiff-WRITER -Poutput=/TEMP/S2A_MSIL1C_20180510T112121_N0206_R037_T30TTK_20180510T133456_3BAND/01_preproc_tmp/T30TTK_20180510T112121_angles_60M_sza.tif -J-Xms2G -J-Xmx2G -Presolution=60 -Pdownsampling_method=Mean -Pband=sun_zenith -Pdownsampling_flag=FlagMedianAnd -Pupsampling_method=Bilinear /TEMP/S2A_MSIL1C_20180510T112121_N0206_R037_T30TTK_20180510T133456.SAFE’.
2021-02-13 18:27:13,096 - ERROR : Failed!

[NodeId:S2Resampling] Invalid S2 source product

I obtained the L1C data from cloudferro and from scihub. Both yielding the same error.

Can some help me how to solve this error?

Hi Bruno,
I’m not so familiar with S2 but I try to give some first suggestions.

First I guess you are bound to SNAP 7 for project reasons, if not I would suggest to move to SNAP 8.

The error message “Invalid S2 source product” is shown when either not at least one “detector_footprint” is contained in the product or if it is not read with an S2 data reader.
Can you open it in SNAP Desktop and check if those masks are present and which reader is shown in the Info dialog of the Product.

Does this only happen for this product from 20180510? Maybe it is broken? You could ask the SciHub support eosupport@copernicus.esa.int

Hi Marco,

We’ve tried to delve deeper into it and indeed it seems detector_footprint is missing (at least I could not find anything to could pass for it). We contacted SciHub to further investigate in it.

1 Like

Hi Bruno @smetsb
I hav just retreived the L1C 30TTK from SciHub and it contains all the DETFOO GML files in the correct sub folder (S2A_MSIL1C_20180510T112121_N0206_R037_T30TTK_20180510T133456.SAFE\GRANULE\L1C_T30TTK_A015049_20180510T112250\QI_DATA\ ). So maybe your download wasn’t complete (although we have had recent queries from Users about missing files seemingly arising as a consequence of the DHUS migration - https://scihub.copernicus.eu/news/News00875).

Cheers

Jan

S2MPC Operations Manager

Hi Jan,
I checked this now and indeed these files are in the product. However it seems SNAP is not picking it up? I looked in the product explorer where I was expecting it too show up under masks?

@oana_hogoiu can you check this issue? Maybe you have an idea what could be the problem.
Thanks

I have also downloaded the same product and the specified QI_DATA folder is empty:

Plus, the local size of the downloaded product matches the one specified by SciHub before the download:

Hello @Bert

Well, this is strange. The files are shown in the product (left view) but not picked up in SNAP (right view - they should be in the Mask Manager list).

Cheers

Jan

@oana_hogoiu
Any idea on why it could be that these mask data is not picked up?

First of all, why these masks are not present in the product when downloading it from SciHub?
That was my case, as I showed with screenshots above.
SNAP cannot pick up something that doesn’t exist.

Does it work for other products? Do you have something in your QI_DATA folder?

@Jan can you please specify what exactly is missing in the Mask Manager list, in your case?

I’ve tried with a different product, and I see the masks in Mask Manager:

@oana_hogoiu Yes, it works for other products. Yes, I have things in the QI_DATA folder. It looks the same as Jan showed.

Ok, and for this trouble product, can you please specify what exactly is missing in Mask Manager (but shown in Product Explorer) ?
Thank you in advance.

Hi @oana_hogoiu

Sorry for the delay in answering…
Here’s what I see (or don’t see) in SNAP: it’s just the DETFOO Masks that don’t appear. I have compared the 30TTK with a recent random L1C Tile:

Cheers

Jan

hi @oana_hogoiu,

Did you have any time to look further into this problem?

Hello @Bert,
First time I downloaded this product (as shown in previous topics), its size was only 4KB and QI_DATA directory was empty.
Yesterday I triggered again the product retrieval from LTA on SciHub, this morning I found the product in my cart, but the downloaded archive (17.4 KB this time!) is corrupted. (not able to unzipp it on the file system, also detected invalid in SNAP)

Can you try again to download from SciHub this product S2A_MSIL1C_20180510T112121_N0206_R037_T30TTK_20180510T133456 ?
(just curious what size will you obtain and if it’s also corrupted for you)

Hello @oana_hogoiu

I downloaded the data from scihub and I don’t have any problem (got 358M).
However I download it via scripting and not de web ui

Strange. SciHub seems to have issues in retrieving LTA products.
On CREODIAS the size is 341M

I’ll try with this one.

Hello @Bert,
At first sight, there are things missing from mask MSK_DETFOO_*.gml files, they have only 1KB (I also noticed this in the screenshot from @Jan), and their content is just something like:

It should have been something like this instead:

Therefore, the extent polygons are missing, and this type of mask (MSK_DETFOO) is per polygons. This is why SNAP is not picking them up.
@Jan, do you have any idea why these MSK_DETFOO_*.gml files are like this?
Thank you in advance.