NaN OUTPUT of Land Surface Energy Flux

When I run Land Surface Energy Flux, I’m getting a NaN image with following dialogue.
Input data are perfectly overlapped.

Log of the step:


What is the solution?

Are the outputs of all the previous steps correct and with values other than nans? Could you also post the whole text of the execution output. On the screenshot only the final bit is visible.

Yea, all the previous steps were executed perfectly.
INFO: org.esa.snap.python.gpf.PyOperatorSpi: Python operator ‘py_sambuca_snap_op’ registered (Python module: ‘sambuca_snap_op’, class: ‘sambuca_snap_op’, root: ‘/home/cropin/.snap/system/modules/org-esa-sen2coral-sen2coral-inversion.jar’)
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.olci.IdepixOlciPostProcessOp$Spi:Idepix.Olci.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.olci.OlciPostProcessOp$Spi:Idepix.Olci.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.s2msi.operators.S2IdepixCloudBufferOp$Spi:Idepix.S2Cloudbuffer conflicts with org.esa.s2tbx.s2msi.idepix.operators.S2IdepixCloudBufferOp$Spi:Idepix.S2Cloudbuffer
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.probav.ProbaVClassificationOp$Spi:Idepix.Probav.Classification conflicts with org.esa.s3tbx.idepix.algorithms.probav.ProbaVClassificationOp$Spi:Idepix.Probav.Classification
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.probav.ProbaVPostProcessOp$Spi:Idepix.Probav.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.probav.ProbaVPostProcessOp$Spi:Idepix.Probav.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.viirs.ViirsClassificationOp$Spi:Idepix.Viirs.Classification conflicts with org.esa.s3tbx.idepix.algorithms.viirs.ViirsClassificationOp$Spi:Idepix.Viirs.Classification
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.viirs.ViirsPostProcessOp$Spi:Idepix.Viirs.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.viirs.ViirsPostProcessOp$Spi:Idepix.Viirs.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.spotvgt.VgtClassificationOp$Spi:Idepix.Vgt.Classification conflicts with org.esa.s3tbx.idepix.algorithms.vgt.VgtClassificationOp$Spi:Idepix.Vgt.Classification
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.spotvgt.VgtPostProcessOp$Spi:Idepix.Vgt.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.vgt.VgtPostProcessOp$Spi:Idepix.Vgt.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.seawifs.SeaWifsClassificationOp$Spi:Idepix.SeaWifs.Classification conflicts with org.esa.s3tbx.idepix.algorithms.seawifs.SeaWifsClassificationOp$Spi:Idepix.SeaWifs.Classification
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.seawifs.SeaWifsPostProcessOp$Spi:Idepix.Seawifs.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.seawifs.SeaWifsPostProcessOp$Spi:Idepix.Seawifs.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.meris.IdepixMerisLandClassificationOp$Spi:Idepix.Meris.Land conflicts with org.esa.s3tbx.idepix.algorithms.meris.MerisLandClassificationOp$Spi:Idepix.Meris.Land
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.meris.IdepixMerisWaterClassificationOp$Spi:Idepix.Meris.Water conflicts with org.esa.s3tbx.idepix.algorithms.meris.MerisWaterClassificationOp$Spi:Idepix.Meris.Water
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.meris.IdepixMerisMergeLandWaterOp$Spi:Idepix.Meris.Merge.Landwater conflicts with org.esa.s3tbx.idepix.algorithms.meris.MerisMergeLandWaterOp$Spi:Idepix.Meris.Merge.Landwater
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.meris.IdepixMerisPostProcessOp$Spi:Idepix.Meris.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.meris.MerisPostProcessOp$Spi:Idepix.Meris.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.modis.IdepixModisClassificationOp$Spi:Idepix.Modis.Classification conflicts with org.esa.s3tbx.idepix.algorithms.modis.ModisClassificationOp$Spi:Idepix.Modis.Classification
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.modis.IdepixModisPostProcessOp$Spi:Idepix.Modis.Postprocess conflicts with org.esa.s3tbx.idepix.algorithms.modis.ModisPostProcessOp$Spi:Idepix.Modis.Postprocess
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.snap.idepix.core.operators.CloudBufferOp$Spi:Idepix.Cloudbuffer conflicts with org.esa.s3tbx.idepix.operators.CloudBufferOp$Spi:Idepix.Cloudbuffer
SEVERE: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: The environment variable LD_LIBRARY_PATH does not contain the current folder ‘.’. Its value is ‘/home/cropin/anaconda3/envs/snap/bin/…/./jre/jre/lib/amd64:/home/cropin/anaconda3/envs/snap/bin/…/./jre/jre/lib/i386:’.
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.
INFO: org.hsqldb.persist.Logger: dataFileCache open start
WARNING: org.esa.snap.core.dataio.dimap.DimapProductReader: DimapProductReader: Unable to read file ‘/home/cropin/Downloads/SEN4_ET/SNAP/SHARPENING/S2_CLOUD_MASK_20m.data/mask.img’ referenced by ‘mask’.
WARNING: org.esa.snap.core.dataio.dimap.DimapProductReader: DimapProductReader: Removed band ‘mask’ from product ‘null’.
WARNING: org.esa.snap.core.dataio.dimap.DimapProductReader: DimapProductReader: Unable to read file ‘/home/cropin/Downloads/SEN4_ET/SNAP/SHARPENING/S2_CLOUD_MASK_20m.data/mask.img’ referenced by ‘mask’.
java.io.FileNotFoundException: /home/cropin/Downloads/SEN4_ET/SNAP/SHARPENING/S2_CLOUD_MASK_20m.data/mask.img (No such file or directory)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.(RandomAccessFile.java:243)
at javax.imageio.stream.FileImageInputStream.(FileImageInputStream.java:73)
at org.esa.snap.core.dataio.dimap.DimapProductReader.getOrCreateImageInputStream(DimapProductReader.java:379)
at org.esa.snap.core.dataio.dimap.DimapProductReader.readBandRasterDataImpl(DimapProductReader.java:314)
at org.esa.snap.core.dataio.AbstractProductReader.readBandRasterData(AbstractProductReader.java:253)
at org.esa.snap.core.image.BandOpImage.computeProductData(BandOpImage.java:59)
at org.esa.snap.core.image.RasterDataNodeOpImage.computeRect(RasterDataNodeOpImage.java:127)
at javax.media.jai.SourcelessOpImage.computeTile(SourcelessOpImage.java:137)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PlanarImage.cobbleFloat(PlanarImage.java:3254)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2181)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.datamodel.Band.readRasterData(Band.java:311)
at org.esa.snap.core.datamodel.AbstractBand.readSubRegionRasterData(AbstractBand.java:184)
at org.esa.snap.core.datamodel.AbstractBand.readPixels(AbstractBand.java:441)
at org.esa.snap.core.datamodel.RasterDataNode.readPixels(RasterDataNode.java:1417)
/home/cropin/.snap/auxdata/sen-et-conda-Linux64/sen-et-snap-scripts/energy_fluxes.py:78: RuntimeWarning: invalid value encountered in less_equal
i = np.logical_and(lai <= 0, mask == 1)
/home/cropin/.snap/auxdata/sen-et-conda-Linux64/sen-et-snap-scripts/energy_fluxes.py:104: RuntimeWarning: invalid value encountered in greater
i = np.logical_and(lai > 0, mask == 1)
Finished iterations with no valid solution
Finished tool execution in 226 seconds

The issue is missing file:

S2_CLOUD_MASK_20m.data this file is there. then why it’s showing as a missing file?

you can see, those file are already there.

What should I do?

In the log the mask.img is missing not the folder S2_CLOUD_MASK_20m.data.
Is this file also present?

It’s not there. What may be the reason?

Not sure. How was this product created? Maybe there was an error when wiritng the product.

This was cloud mask derived from sentinel-2 image.

Solved !
Finally, I’ve calculated ET using Sen_ET.
Thanks !

1 Like

Great @janardanroy! Could you please briefly describe what you did to fix your problem. This can help other users in the future.

Actually I created the S2_CLOUD_MASK from sentinel-2 cloud confidence band. So, the mask.img file was not created, Then I found the s2_processing xml file from your repository and I get to know that cloud_mask shoud be calculated from cloud_classification band. I followed the step and the error get solved.