Pconvert to generate S-3 OLCI RGBs

Hi Marco

It is great that the BEAM capabilities where transferred to SNAP.
I have been exploring options to create RGBs from S-3 OLCI using the command line and pconvert. As you know the 21 radiances from OLCI are in individual ncdfs. As pconvert only accepts 1 file as input, this file needs to contain at least 3 bands for the RGB.
So far, I got a work-around where as a first step, I create a temporary ncdf file that contains my 3 bands of interest (e…g, using IDL or shell script) from a specific OLCI file and I then feed that new, 3-layer ncdf filepath to pconvert to create the rgb in whichever format I want. It works, but it’s a 2 step process.

Is there a simpler way to do all that in one go by
a) either using an XML file that lists the filepaths of the 3 individual OLCI bands as input into pconvert? (If so could you please share an XML template).
b) or is there a way to create this 3-layer ncdf with gpt ? (I don’t think so but I am inquiring in case it’s possible)

Best regards
David

You don’t need to reformat the OLCI product. Just use the standard OLCI product. Specify the folder or the xfdumanifest.xml file as input to pconvert.

> pconvert -f png -b 17,6,3 -o %USERPROFILE%\test "G:\EOData\SENTINEL\SENTINEL3\ExpertHub\S3A_OL_1_EFR____20160517T103217_20160517T103517_20160517T123411_0179_004_165_1979_SVL_O_NR_001.SEN3"

From the SNAP Desktop application you can also save the tristimulus rgb profile to disk and use this file with the -p option

Thank you for your prompt reply.
From my end, however, it does not seem to work. Feeding the path of the xfdumanifest.xml to pconvert was one of the first step I tried before the above-mentioned work-around.

I tried again - see uploaded print screen:.

Out of the 5 command lines, I tried providing the XML with its full path, then only the path to the folder, with and without using comments (""). The common error message is that it cannot find any appropriate reader.

I however tried last week with Sentinel-2 by feeding in directly the html and it worked. But with OLCI, because the individual bands are all independent ncdf files, I wonder if this is not why it doesn’t work. I am pretty sure my OLCI files is not corrupted because I can display the various bands properly in SNAP.

As we are trying to generate the RGBs from a rolling archive, that command is quite important to us. Is there something else we are missing?
Thanking you in advance for your time and valuable help
David

You should not rename the folder in which the xfdumanifest.xml is located. See the screenshot.
The first run works and uses the original folder name. The second, with the folder renamed, fails with the same message as you observer.

Unfortunately each image file will be named the same for OLCI. To get around this problem you will need to have a separate output directory for each product or rename the image files afterwards each run.

Edit:
The image files will only be the same if you specify the xfdumanifest file. If you specify the directory the image files get unique names like the OLCI products.

obviously… my mistake.

it worked, thank you very much.

As I already suggested here [S2MPC] Colour scale adjustment
it would be useful to insert a new section in the RGB-Image Profile Files (.rgb) to allow the definition of min/max values for each of the RGB bands. This option should be also available both in SNAP color manipulation window and in ‘pconvert’ command line tool to automate the generation of RGB converted images using user defined histogram min/max values.

Federico

Thanks Federico for this suggestion.
I’ve turned this into an issue we will take care for in the future.