Hi all,
I’m new to SNAP and trying to do some cloud masking for Sentinel 3 OLCI. I have got this working with the GUI (using IdePix) but am having some difficulties via command line (want to process thousands of files) so thought I’d post as I am sure I am missing something simple. I found a guide in the GitHub page I’m using for a basis.
First, I made this file and saved as graph-file.xml in my working directory:
<graph id="IdepixOlciTest">
<version>1.0</version>
<node id="idepix">
<operator>Idepix.Olci</operator>
<sources>
<source>${sourceProduct}</source>
</sources>
</node>
</graph>
Then I invoke from the command line like this:
asayer@gs616-payara:~/Desktop/tmp_test_idepix$ /accounts/asayer/snap/bin/gpt graph-file.xml -SsourceProduct=/accounts/asayer/Desktop/tmp_test_idepix/S3A_OL_1_ERR____20170601T000119_20170601T000547_20180423T154402_0268_018_187______LR2_R_NT_002.SEN3/xfdumanifest.xml
The first time I ran it I got an error that LD_LIBRARY_PATH had to include the current working directory, so I added that. The next time I ran I got this:
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
Executing processing graph
done.
Error: [NodeId: idepix] Operator 'IdepixOlciOp': Mandatory source product (field 'sourceProduct') not set.
I had thought it weird that the command line example said -SsourceProduct not -sourceProduct so thought I’d try changing to this:
asayer@gs616-payara:~/Desktop/tmp_test_idepix$ /accounts/asayer/snap/bin/gpt graph-file.xml -sourceProduct=/accounts/asayer/Desktop/tmp_test_idepix/S3A_OL_1_ERR____20170601T000119_20170601T000547_20180423T154402_0268_018_187______LR2_R_NT_002.SEN3/xfdumanifest.xml
However now I get this error:
Error: Unknown option '-sourceProduct=/accounts/asayer/Desktop/tmp_test_idepix/S3A_OL_1_ERR____20170601T000119_20170601T000547_20180423T154402_0268_018_187______LR2_R_NT_002.SEN3/xfdumanifest.xml'
Then I thought, ok, maybe the line in the xml file needs to say SsourceProduct not sourceProduct. So I changed to that in the xml file, but I gives this error:
Error: Missing source '${SsourceProduct}' in node 'idepix'
Does someone know what I am doing wrong here? Or is there a better way to run the cloud maksing routine from command line? Any advice appreciated!