Error when exporting as CSV

Hi there,

As part of my project I’m trying to create a Graph which carries out the following process:

  1. Takes a Sentinel-3 OLCI product as input
  2. Removes all data which is either:
    • NOT fresh_inland_water mask
    • cloud mask
  3. Exports the remaining data as a CSV format, or other (text) format readily usable for data analysis.

To achieve this, I’ve created a graph:
image

This graph works well for steps 1) and 2). However, when trying to write as a CSV, an error occurs:
Not able to write product file: 'C:/…"
Writing into any other format works fine.

An output file is created, but it only contains headers and has no data. I’ve attached one such file.
S3A_OL_2_WFR____20200130T212751_20200130T213051_20200201T062238_0179_054_214_3600_MAR_O_NT_002.SEN3.csv (1.7 KB)

Additional findings:
Exporting a OCLI product as a csv by using Raster > Export > Mask Pixels DOES work
Exporting a OCLI product as a csv by using File > Export > CSV does NOT work

Any help would be appreciated!
Cheers,
Oli

It seems there are at least two issues involved.
With the released SNAP version I get the same error when trying to write the entire product.
When using a subset of 500x500 pixel a different error happens.
This one is fixed in the current development version.
But still the full product can’t be written.
CSV data needs a lot of memory on disk and in RAM. And it is not well suited for writing.
So creating a subset and only write the region of interest would be a good idea.

So with the next release it will be possible at least to write subsets but if writing the entire product will be possible I can’t promise (SNAP-1342).
As a workaround you can process to BEAM-DIMAP and then export only a masked area as you already found out.
If you have many products the is not really a goo way to go. Maybe you can use python/snappy to convert to CSV?

Snappy seems to be the perfect tool for my project, not sure how I missed its existence. Thank you for the quick and useful reply!