I am trying to use the Radiance to Reflectance function on SNAP with Sentinel-2, level 1c files that I downloaded off of Sentinel2Look Viewer and the Copernicus open access hub. However, when I use the function, I receive an error message that says “An internal error occurred during the target product initialization. Type: IllegalArgumentException Message: expression: Undefined Symbol ‘quality_flags.invalid’.” I want to be able to save them as NetCDF-CF files, I have the processing parameters at OLCI sensor and RAD_TO_REFL conversion mode. the copy non spectral bands box is unchecked. I am, overall, trying to get surface reflectance from the level 1c files. Is this even the correct function to use? Any suggestions would be very appreciated.
This is not the correct operation for Sentinel-2 data.
OLCI is the Sensor of Sentinel-3 and there for the Rad2Refl doesn’t work. It expects things to be present, like the flag ‘quality_flags.invalid’.
Actually the Sentinel-2 L1C data already contains reflectances.
So you don’t need to perform this at all.
I have just started to use SNAP and Idepix for Sentinel-3 OLCI data and running it through a graph builder. I read the data->idepix.olci->write. And I get the same error “expression: Undefined Symbol ‘quality_flags.invalid”. I selected a few source bands and a few quality flags (bright, land, invalid, inland_water). What can I be doing wrong? Shall I first use Rad2Refl and then idepix?
If there is any documentation for Idepix that I can refer to or another page onn this forum please let me know Any leads are appreciated.
Can you show your graph? Usually, it should be straight forward.
I just tried this graph (OLCI_Idepix.xml (1.3 KB)) with this command and it worked.
gpt "D:\_graphXML\OLCI_Idepix.xml" -PsourceFile="D:\EOData\S3\OLCI\S3B_OL_1_EFR____20230717T104859_20230717T105159_20230717T232729_0180_081_379_2160_PS2_O_NT_003.SEN3\xfdumanifest.xml" -PtargetPath="D:\EOData\temp\S3B_OL_1_EFR____20230717T104859_idepix.dim"
When I loaded the graph it worked. The graph that I made was exactly same as yours. I don’t know what changed, but I am glad it works now. Thanks!
Also, since I am new to this I am curious -do you run the command through cmd or is there a in-built console in SNAP? Currently I am running everything through the SNAP interface and would like to switch to python eventually.
Yes, I use the command line. There is SNAP a customised command line.
You can find it in the start menu.
It starts like this.
Using Python to run gpt can be an option to configure each call individually for each source product.
But you can also use the command line to do bulk processing.
Bulk Processing with GPT - SNAP - Confluence (atlassian.net)
And with the help of Excel it gets easier.