Fapar computation, only outputs nan

Hello everyone,

Can you help us fixing an issue? We are having very weird results in the computation of fapar (BiophysicalOp), it only outputs NAN results with the following quality flag:

This is the graph we use, input of this graph is the result of Sen2Cor:

Or in xml format:

<graph id="Graph">
  <version>1.0</version>
  <node id="Read">
    <operator>Read</operator>
    <sources/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>/home/dial/nico/copiedProducts/test/S2C_FRW/S2A_MSIL2A_20170214T080021_N0204_R035_T36NXK_20170214T081513.SAFE/MTD_MSIL2A.xml</file>
    </parameters>
  </node>
  <node id="Resample">
    <operator>Resample</operator>
    <sources>
      <sourceProduct refid="Read"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <referenceBand/>
      <targetWidth/>
      <targetHeight/>
      <targetResolution>60</targetResolution>
      <upsampling>Nearest</upsampling>
      <downsampling>First</downsampling>
      <flagDownsampling>First</flagDownsampling>
      <resampleOnPyramidLevels>true</resampleOnPyramidLevels>
    </parameters>
  </node>
  <node id="BiophysicalOp">
    <operator>BiophysicalOp</operator>
    <sources>
      <sourceProduct refid="Resample"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <computeLAI>false</computeLAI>
      <computeFapar>true</computeFapar>
      <computeFcover>false</computeFcover>
      <computeCab>false</computeCab>
      <computeCw>false</computeCw>
    </parameters>
  </node>
  <node id="Write">
    <operator>Write</operator>
    <sources>
      <sourceProduct refid="BiophysicalOp"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>/home/dial/Documents/fapar.tif</file>
      <formatName>GeoTIFF</formatName>
    </parameters>
  </node>
  <applicationData id="Presentation">
    <Description/>
    <node id="Read">
            <displayPosition x="37.0" y="134.0"/>
    </node>
    <node id="Resample">
      <displayPosition x="123.0" y="136.0"/>
    </node>
    <node id="BiophysicalOp">
      <displayPosition x="250.0" y="136.0"/>
    </node>
    <node id="Write">
            <displayPosition x="386.0" y="136.0"/>
    </node>
  </applicationData>
</graph>

We are doing this computation with the following TILE in input: S2A_MSIL2A_20170214T080021_N0204_R035_T36NXK_20170214T081513.SAFE

I can share the zip, but it’s almost 1gb.

Thanks a lot for the help, please let me know if I should share additional info.

Hi,

Do you have problems with every tile or only with the one you reported? I have just tested your graph with another product and it seems to work properly here. What version of SNAP are you using?

Hello,
I am using SNAP 5.0.8

I only have access to this tile with S2C corrections, so cannot perform other test. I also tried it with an L1C product from another tile (I know it should not bring amazing results, but it can help spot errors) and got exactly the same kind of results.

Should I share the tile?

Hi,

I am going to try to reproduce your processing with the version 5.0.8 (I have used the 6 beta) and I will back to you if I need the tile.

Hi @jofrisch,

I have just downloaded the L1C product S2A_MSIL1C_20170214T080021_N0204_R035_T36NXK_20170214T081513, processed it with sen2cor and executed your graph in the version 5.0.8 and it seems to be working properly. Please, could you share your product to test it?

Thank you!

Thanks a lot for your help @obarrilero,

I am happy to see that you could compute it. Did you do it using the same graph?

The used tile can be downloaded here: https://wetransfer.com/downloads/d8ae222e9a10f07d948a86d110b1a9d620171017095555/2f66ecdc4beeb60bc981a025c11df87320171017095555/278894
I couldn’t upload it on the forum, let me know if you prefer to share it another way.

Thanks again!

I have already tested your product and I get the same error. It seems that the problem is caused becuase the S2 reader of SNAP is not able to compute properly the mean viewing angles, which are one of the inputs for the Biophysical processor. It is not able to compute them because the angles in the metadata of your granule are not in the usual order. Where have you downloaded your product or how have you processed it?

Hi @obarrilero,

The product was obtained via Sen2Cor (on SNAP) by a colleague, I expected it to be a very standard one, but l’ll reach out to him to see if there is anything specific that we should know.

Do you think I can easily modify the metadata otherwise?

Thanks a lot for your help!

Hi,

I will try to fix this for the coming release or module update, but meanwhile, I suggest you to re-compute the L2A product using sen2cor (currently with the standalone version it is very easy to configure). I made it yesterday and it seems to be working properly.
Please, download the L1C product from https://scihub.copernicus.eu/ because perhaps the problem comes from a corrupted L1C product.

Ok, thanks for the advice, I’ll do so.
The L1C product was already downloaded from https://scihub.copernicus.eu/

@obarrilero can you share the xml produced by sen2cor that enables you to open the product in snap?
Thx!

MTD_TL.xml (453.6 KB)