Exporting S2 to nc: Cannot write multisize products

Hello,

I am trying to transform downloaded S2 data to a nc-file. Therefore I used the exporting option in SNAP and got this error message:
Writing this products as NetCDF4-CF is not possible: Cannot write multisize products. Consider resampling the product first.

I kno from another topic, that resampling is an option to solve this error. But actually I do not want to resample the data but use it in its original resolution. Is it possible to transform the original data to nc-file with SNAP?

Is there otherwise another option to do so, for example in python? I tried to do it in python but I failed at opening the dataset, because Sentinel data comes as zip.file and when I unpack it, I can not identify the file I can open within python.

I am happy for any help :slightly_smiling_face:

Looking at the SNAP code it is clear that you can’t do this when you have products that have different band sizes (resolutions) hence you need to resample or export the bands separately.

Have you considered using GDAL? I don’t know if it can be done but you could have a look at trying to use GDAL to convert each of the bands. have a look at the following pages:
Convert Sentinel-2 Data Using GDAL | spectraldifferences (wordpress.com)
SENTINEL2 – Sentinel-2 Products — GDAL documentation
gdal_translate — GDAL documentation

Thank you, that answered my question. I already had a look on gdal, but I was not sure which file I should open, since Sentinel data come in a zip-file. Your links are very helpful.