Sentinel-3 Synergy reprojection fails

I am trying to reproject a S-3 Synergy data set to the Finnish UTM projection epsg:3067 . It is failing according to the below output. I wonder why? And could snap still produce the output files then failing, so one could investigate better where in the data it happened.

Thanks

time ~/snap7/bin/gpt Reproject -Ssource=S3A_OL_1_EFR____20190903T101430_20190903T101730_20190904T140918_0179_049_008_1800_LN1_O_NT_002.SEN3 -Pcrs=3067 -PpixelSizeX=300 -PpixelSizeY=300
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
SEVERE: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: The environment variable LD_LIBRARY_PATH is not set. It must contain the current folder ‘.’.
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
INFO: org.esa.snap.core.gpf.common.WriteOp: Start writing product projected_S3A_OL_1_EFR____20190903T101430_20190903T101730_20190904T140918_0179_049_008_1800_LN1_O_NT_002.SEN3 to target.dim
Writing…
…10%…20%…30%…40%…Exception in thread “SunTileScheduler0Standard7” java.lang.NullPointerException
at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80)
at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257)
at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087)
at javax.media.jai.OpImage.getTile(OpImage.java:1142)
at org.esa.snap.core.gpf.internal.OperatorExecutor$OperatorTileComputationListenerStack.tileComputed(OperatorExecutor.java:310)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:278)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
Exception in thread “SunTileScheduler0Standard9” java.lang.NullPointerException
at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80)
at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257)
at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087)
at javax.media.jai.OpImage.getTile(OpImage.java:1142)
at org.esa.snap.core.gpf.internal.OperatorExecutor$OperatorTileComputationListenerStack.tileComputed(OperatorExecutor.java:310)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:278)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
Exception in thread “SunTileScheduler0Standard2” java.lang.NullPointerException
at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80)
at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257)
at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087)
at javax.media.jai.OpImage.getTile(OpImage.java:1142)
at org.esa.snap.core.gpf.internal.OperatorExecutor$OperatorTileComputationListenerStack.tileComputed(OperatorExecutor.java:310)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:278)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
50% done.
org.esa.snap.core.gpf.OperatorException: Cannot construct DataBuffer.
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:376)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(SunTileScheduler.java:1646)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:921)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:911)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.iterator.RandomIterFallback.makeCurrent(RandomIterFallback.java:108)
at com.sun.media.jai.iterator.RandomIterFallback.getSampleFloat(RandomIterFallback.java:125)
at com.sun.media.jai.opimage.WarpNearestOpImage.computeRectFloat(WarpNearestOpImage.java:424)
at com.sun.media.jai.opimage.WarpNearestOpImage.computeRect(WarpNearestOpImage.java:111)
at javax.media.jai.WarpOpImage.computeTile(WarpOpImage.java:577)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:911)
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.getData(PlanarImage.java:2085)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:407)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:393)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:73)
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 org.esa.snap.core.gpf.internal.OperatorExecutor$OperatorTileComputationListenerStack.tileComputed(OperatorExecutor.java:310)
at com.sun.media.jai.util.RequestJob.compute(SunTileScheduler.java:278)
at com.sun.media.jai.util.WorkerThread.run(SunTileScheduler.java:468)
Caused by: java.lang.RuntimeException: Cannot construct DataBuffer.
at com.sun.media.jai.util.DataBufferUtils.constructDataBuffer(DataBufferUtils.java:132)
at com.sun.media.jai.util.DataBufferUtils.createDataBufferFloat(DataBufferUtils.java:214)
at javax.media.jai.ComponentSampleModelJAI.createDataBuffer(ComponentSampleModelJAI.java:271)
at javax.media.jai.RecyclingTileFactory.createTile(RecyclingTileFactory.java:389)
at javax.media.jai.PlanarImage.createWritableRaster(PlanarImage.java:1982)
at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:771)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
… 27 more

Error: Cannot construct DataBuffer.

real 16m34.576s
user 106m1.588s
sys 0m59.552s

Would you please to update your SNAP, might be this is the problem!

Did you apply TC. to the S3 product firstly? if yes, which DEM did you select?

I think you should re-project your external DEM to EPSG:4326

I have the latest Snap installed and I did not use Terran Correction. It’s the Synergy product, so it is already surface reflectance! So no DEM is used or needed.

But good suggestion to add to error codes is the version of Snap, I guess this should be possible at the OperatorExecutor code! org.esa.snap.core.gpf.internal.OperatorExecutor$OperatorTileComputationListenerStack.tileComputed(OperatorExecutor.java:310)

First re-project the product to the following projection, and later on re-project it again to Finnish UTM projection epsg:3067

IF this doesn’t solve your problem,

Please take a look at this post has similar last error and also the solution of the other post after it directly,

Source of the post

Also similar error is mentioned in this thread, Please take a look,

Source of the thread

No need to do 2 reprojections really. It was just not having enough Memory for this processing. It works with 96GB and I had limited the maximum to less, because I am running several gpt:s in parallel and only allow these 20GB per process.

So according to the first post I mentioned in my aforementioned post it’s RAM issue, in your case it’s really enough, but yes, run multiple graph certainly reduce the total amount of usage RAM.