C2rcc processing sentinel 3 images

Hi, I have been trying to use batch processing to run the c2rcc.olci processor on multiple Sentinel 3 level 1 images. I adapted an xml which I wrote to do a similar process for Sentinel 2 files, but removed the read and resample steps and replace c2rcc.msi with c2rcc.olci. When I try and run the xml through the command line it returns the following error:
Error: expression: Undefined symbol ‘iop_bpart’.

When I try and run the xml through a batch file I get a different error:
Error: Missing source ‘E:…/…xml’ The system cannot find the file specified (although if I copy and paste the path I can see the specified .xml is there), so I am clearly doing quite a few things wrong!

Any pointers on either issue would be really appreciated!
TSM_Sentinel3.xml (1.3 KB)
Rachel

Hi there,

The second test your are doing, with the batch processing in SNAP, has several issues. The most evident is the E:\target.tif, that should not be written there. The not so evident but very important is that c2rcc is not available in the GUI batch processing, only in the GPT.

About the first test I would need to see how you are writing your command if you do it directly in the command line. Typically you have to write something like:

gpt_dir xml_dir input_dir output_dir

You do not write the output directories in the xml either in this case.

It would be also wise to make the spatial subset first, run c2rcc and later do another band subset and export results. It would probably shorten processing times.

Yes, I confirm what @abruescas wrote.
Beside this the error

is caused due to the reason that the conc_tsm is a virtual band and uses iop_btot as input. And this is virtual too and uses iop_bpart and iop_bwit.

To overcome this, you can do the regional subset first, as Ana suggested and to have only the conc_tsm in your target you can use the BandMaths instead. I’ve updated your graph

TSM_Sentinel3_update.xml (1.9 KB)
I’ve not tested the updated graph, but I think it should work.

An introduction to processing on the command line can be found in the Wiki.
Bulk Processing with GPT - SNAP Wiki

I check it with my data and it is working fine.TSM_Sentinel3_update_ar.xml (1.4 KB)

Command line expression (I run the command from the snap/bin/ folder directly):
./gpt /Users/Anita/Desktop/SNAP_Forum/TSM_Sentinel3_update.xml /Users/Anita/Desktop/SNAP_Forum/Downloads/S3A_OL_1_EFR____20200503T102339_20200503T102639_20200504T150355_0179_058_008_2340_LN1_O_NT_002.SEN3 -t /Users/Anita/Desktop/SNAP_Forum/Downloads/tsm_subset_S3A_OL_1_EFR____20200503T102339_20200503T102639_20200504T150355_0179_058_008_2340_LN1_O_NT_002.dim

Thanks so much for all your help Marpet and Abruescas, using your examples I have now got my xml working.
My inclusion of the hard coded output was a bit of a fudge - I was using the batch file to move and rename the .tif file for each file I processed as I was unsure how to define the output file correctly. Using your example Abruescas I have updated this so it now writes the tif file I want (by adding -e -f GeoTIFF to the command line input ahead of -t and changing the output file extension from .dim to .tif), easy when you know how! Now to go back and improve my xml for processing the Sentinel 2 images, thanks again!

2 Likes

Hi, after I got the above working I found out that the coordinate information in my geotiff output was missing. To overcome this I ended up removing the subset part and then I could read the coordinates from the accompanying nc file when plotting the tsm results. While this was a little slow and in-efficient it did work, at least until I updated to SNAP v8.0. Since then the xml processing seems to stall and I get the error below and the output geotiff is blank. If I put the subsample back in it runs fine but I have the issues with not having the correct coordinate information. Is there a work around for this? Or can you suggest why SNAP 8.0 cannot run the graph when the earlier version of SNAP could? Thanks in advance for any assistance you can provide!

Executing processing graph
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Internal GDAL 3.0.0 set to be used by SNAP.
INFO: org.esa.s3tbx.c2rcc.olci.C2rccOlciOperator: c2rcc initial tile : null, configured tile: java.awt.Dimension[width=1217,height=1023]
INFO: org.hsqldb.persist.Logger: dataFileCache open start
…13%…27%…40%…54%…67%…81%…INFO: org.hsqldb.persist.Logger: Database closed