SNAP OLCI Processing Pipeline

Hi,

I have 4 S3 OLCI L2 files which I mosaic together using a GPT script (which applies some masking based on certain flags). There are some pixels which are valid in 2 or more images and I’d like to better understand how SNAP decides which pixel to keep.

What other processing does SNAP apply to the S3 OLCI reflectance bands, as if I load the raw bands in Python using NetCDF the reflectance values are significantly different to those in the mosaicked image.

Thanks

The GPT XML I am using is:

<graph id="Graph">
      <version>1.0</version>
      <node id="ProductSet-Reader">
          <operator>ProductSet-Reader</operator>
          <sources/>
          <parameters class="com.bc.ceres.binding.dom.XppDomElement">
              <fileList>files_to_mosaic/S3B_OL_2_WFR____20230327T075434_20230327T075734_20230328T175956_0179_077_320_3600_MAR_O_NT_003.SEN3/xfdumanifest.xml,files_to_mosaic/S3A_OL_2_WFR____20230327T083047_20230327T083347_20230328T195544_0179_097_078_3420_MAR_O_NT_003.SEN3/xfdumanifest.xml</fileList>
          </parameters>
      </node>  
      <node id="Mosaic">
          <operator>Mosaic</operator>
          <sources>
              <sourceProduct refid="ProductSet-Reader"/>
          </sources>
          <parameters class="com.bc.ceres.binding.dom.XppDomElement">
          <variables>

              <variable>
                  <name>Oa01_reflectance</name>
                  <expression>Oa01_reflectance</expression>
              </variable>    
              <variable>
                  <name>Oa02_reflectance</name>
                  <expression>Oa02_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa03_reflectance</name>
                  <expression>Oa03_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa04_reflectance</name>
                  <expression>Oa04_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa05_reflectance</name>
                  <expression>Oa05_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa06_reflectance</name>
                  <expression>Oa06_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa07_reflectance</name>
                  <expression>Oa07_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa08_reflectance</name>
                  <expression>Oa08_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa09_reflectance</name>
                  <expression>Oa09_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa10_reflectance</name>
                  <expression>Oa10_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa11_reflectance</name>
                  <expression>Oa11_reflectance</expression>
              </variable>
              <variable>
                  <name>Oa12_reflectance</name>
                  <expression>Oa12_reflectance</expression>
              </variable>  
              <variable> 
                  <name>CHL_OC4ME</name>                     
                  <expression>if WQSF_lsb.OC4ME_FAIL&gt;0 then 0 else CHL_OC4ME</expression>
              </variable>     
              <variable>
                  <name>medium_glint</name>
                  <expression>if WQSF_lsb.MEGLINT&gt;0 then 0 else 1</expression>
              </variable>      
              </variables>
              <conditions>
                    <condition>
                        <name>condition_0</name>
                        <expression>not WQSF_lsb.INVALID</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_1</name>
                        <expression>not WQSF_lsb.LAND</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_2</name>
                        <expression>not WQSF_lsb.CLOUD</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_3</name>
                        <expression>not WQSF_lsb.TURBID_ATM</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_4</name>
                        <expression>not WQSF_lsb.CLOUD_AMBIGUOUS</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_5</name>
                        <expression>not WQSF_lsb.CLOUD_MARGIN</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_6</name>
                        <expression>not WQSF_lsb.SNOW_ICE</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_7</name>
                        <expression>not WQSF_lsb.COSMETIC</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_8</name>
                        <expression>not WQSF_lsb.SATURATED</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_9</name>
                        <expression>not WQSF_lsb.SUSPECT</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_10</name>
                        <expression>not WQSF_lsb.SNOW_ICE</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_11</name>
                        <expression>not WQSF_lsb.HIGHGLINT</expression>
                        <output>false</output>
                    </condition>
                    <condition>
                        <name>condition_12</name>
                        <expression>not WQSF_lsb.AC_FAIL</expression>
                        <output>false</output>
                    </condition>
              </conditions>
              <combine>AND</combine>
              <crs>GEOGCS["WGS 84",
              DATUM["WGS_1984",
                  SPHEROID["WGS 84",6378137,298.257223563,
                      AUTHORITY["EPSG","7030"]],
                  AUTHORITY["EPSG","6326"]],
              PRIMEM["Greenwich",0,
                  AUTHORITY["EPSG","8901"]],
              UNIT["degree",0.01745329251994328,
                  AUTHORITY["EPSG","9122"]],
              AUTHORITY["EPSG","4326"]]</crs>
              <orthorectify>false</orthorectify>
              <elevationModelName>CDEM</elevationModelName>
              <resampling>Nearest</resampling>
              <westBound>16.0</westBound>
              <northBound>-31.0</northBound>
              <eastBound>21.0</eastBound>
              <southBound>-35.5</southBound>
              <pixelSizeX>0.0027</pixelSizeX>
              <pixelSizeY>0.0027</pixelSizeY>
          </parameters>
      </node>
      <node id="Write">
          <operator>Write</operator>
          <sources>
              <sourceProduct refid="Mosaic"/>
          </sources>
          <parameters class="com.bc.ceres.binding.dom.XppDomElement">
              <file>temp_mosaicdir/mosaic_am_20230327_oc.nc</file>
              <formatName>NETCDF4-BEAM</formatName>
          </parameters>
      </node>
</graph>  

My answer comes quite late, but hopefully still helpful.
Have you compared the values between SNAP and python before mosaicking? Are they different too?
If so, maybe the scaling and offset values of the netcdf data is not applied in python?
Other processing is not applied to the data.
In the mosaic process SNAP applies a mean to the overlapping data. This is also explained in the help.


The binning gives you more control on how the data is aggregated.