C2RCC OLCI in GraphBuilder

Hi!

I am trying to create a processing chain using GraphBuilder, that will include C2RCC OLCI processor. However, it is not available in the drop-down list in the ‘Add’ menu.

Is there a way to include C2RCC OLCI into GraphBuilder as a node?

Thanks!

The user Interface of C2RCC is not compatible with the Graph Builder. Therefor it can’t be used.
If you want to use C2RCC for batch processing you need to write your graph XML file and use it from the command line.
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503590/Creating+a+GPF+Graph
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503475/Bulk+Processing+with+GPT

You can also call gpt from the command line.

gpt C2RCC.OLCI -h

This will print the help for the OLCI C2RCC operator. At the end you will find a XML template. You can combine it with other templates from other operators. This is shown in the guides mentioned above.

1 Like

Thank you for the tip!

I seem not to be able to figure out what should I replace “someGraphId” and “someNodeId” with in XML in case of c2rcc.olci

In examples that are provided via links (XML Graph File for S2 Resampling), there “someGraphId” is replaced by “Resample_Sentine-2” and “someNodeId” by “resample-2”.

Where can I find an appropriate “someGraphID” and “someNodeId” for c2rcc.olci?

You can chose any id/name you would like. Something what identifies this node it must be unique within the graph. You use it to in order to referr to another node. This way you concatenate the nodes.

Hi,

I tried using the gpt c2rcc.olci:

gpt C:\Users…\gpt_olcic2rcc_graphsxml.xml -t C:\Users…\output E:…\xfdumanifest.xml

I made the xml graph file, however, the cmd shows an error:

Error: Missing source ‘E:…\xfdumanifest.xml’ in node ‘trynode’

I am pretty sure I am pointing to the right file and directory in both the command line and the xml graph.
Am I doing something wrong?

Can you attach your graph file?

Here it is. This is my first time using this, so I do not know if I placed the correct inputs for the rest of the parameters.

gpt_olcic2rcc_graphsxml.xml (1.7 KB)

As the graph XML files are intended to be applied on multiple data products it is not possible to specify the path within in this way.
I’ve modified the graph a bit.
The source product is now taken from the command line. The auxiliary files (tomsomi, ncep) are deactivated.

Your command line call should look like this:

gpt "G:\EOData\gpt_olcic2rcc_graphsxml.xml" -t E:\EOData\temp\test.dim E:\Sentinel_3\2017\L1\S3A_OL_1_EFR____20170916T015312_20170916T015612_20170917T054552_0179_022_174_2700_LN1_O_NT_002.SEN3\xfdumanifest.xml

gpt_olcic2rcc_graphsxml.xml (1.6 KB)

Thanks! I will be trying this in a moment. Also, is the target output required to be in .dim format? Previously, I think I was just placing it in an empty folder.

You can change the output format. See the option -f.
Unfortunately the possible formats are not documented. But you can use the formats which can be selected in the user interface.

1 Like

Hi,

I am trying to run bulk processing for C2RCC OLCI through Mac Terminal.
I have adapted processDataset.bash file for Sen-3 data from https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503475/Bulk+Processing+with+GPT

I have also created a .xml file for c2rcc.olci

Command line looks like this:

bash processDataset.bash graphbuilder.xml “/Users/DK/Documents/MIII/S3A_reprocessing_EUMETSAT/data/L1/L1_20160509/” “/Users/DK/Documents/MIII/S3A_reprocessing_EUMETSAT/data/L1/L1_20160509/output” c2r

The error I get:

: command not found: line 3:
: command not found: line 7:
: command not found: line 10:
: command not found: line 14:
: command not found: line 17:
: command not found: line 20:
: command not found: line 23:
: command not found: line 26:
: command not found: line 29:
: command not found: line 30:
: command not found: line 34:
'rocessDataset.bash: line 36: syntax error near unexpected token { 'rocessDataset.bash: line 36:function normalizePath() {

Attaching files below

processDataset.bash (2.2 KB)
graphbuilder.xml (1.5 KB)

Interestingly it complains about all the empty lines.
I saw that Windows line ending was used. I converted to Mac line ending.
Maybe this solves the problem.
processDataset.bash (2.1 KB)

Hi marpet,

I am also attempting to batch run c2rcc on OLCI L1 images. I have a directory of ancillary data downloaded in subfolders organized by Julian day (from running polymer AC). Is the attached .xml graph correct? Do I need to list any of the other parameters for it to work?

Also, is this how I would call it?

./gpt c2rcc.olci “/media/silsbelab/S31/c2rcc.xml” -t “/media/silsbelab/S31/S3_L2/c2rcc/” -f “NetCDF4-CF” -SsourceProduct = “/media/silsbelab/S31/Subset_S3_L1/test/”

c2rcc.xml (307 Bytes)

No, the graph and the call are both not correct.
It should look like the following.
All parameters have a default value, if I remember correctly.
So you only need to set those which differe from the defaults.
See also
gpt c2rcc.olci -h

The graph should be like the attached file: c2rcc.xml (333 Bytes)
From the command line call, you need to remove the operator name ‘c2rcc.olci’. Because this is specified within the XML file.
Also, it doesn’t work to specify directories for the source and target.
If you want to batch process multiple files, please have a look on this wiki page:
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503475/Bulk+Processing+with+GPT

Thank you marpet. I am now using the processDataset.bash file. Do I need a parameters file in my call? Right now I have:

./processDataset.bash c2rcc.xml “/media/silsbelab/S31/Subset_S3_L1/test/” “/media/silsbelab/S31/S3_L2/c2rcc/” c2rcc

My only parameter in the c2rcc.xml file is
“/home/silsbelab/polymer-v4.12/ANCILLARY/METEO/” so I’m not sure what would go in the parameters file?

I think the easiest is to simply provide an empty parameter file. Or you modify the bash script. Because yurrently it is expecting it.

awesome, that worked. Right now the output is .dim and .data files. I tried changing the output in the processDataset.bash to .nc on line 52, but I’m not able to pull it into SNAP. Any ideas?

No, no idea. Should work actually.
Maybe you add
-f NetCDF4-CF
to line 53.

yes!! thank you thank you thank you

1 Like

Your welcome!