Error in mosaicking OCM3 Level-2 scenes in SeaDAS

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
reema_mathew
Posts: 16
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by reema_mathew » Mon Aug 05, 2024 12:42 am America/New_York

I have recently installed the latest version of SeaDAS GUI - version 9.0.1 in my Linux system. Now, while trying to mosaic two Level-2 scenes from EOS-06 OCM3 sensor, I'm getting the following error. (Please note that this mosaicking functionality works perfectly for the same L2 scenes in version 8.3.0)

-------------------------------------------------------------------------------------------------------------
Error:
java.lang.NullPointerException
at java.base/java.lang.StringBuilder.<init>(Unknown Source)
at ucar.nc2.iosp.netcdf3.N3iosp.makeValidNetcdfObjectName(N3iosp.java:200)
at org.esa.snap.dataio.netcdf.util.ReaderUtils.getVariableName(ReaderUtils.java:86)
at org.esa.snap.dataio.netcdf.DefaultNetCdfWriter.writeBandRasterData(DefaultNetCdfWriter.java:94)
at org.esa.snap.core.gpf.common.WriteOp.writeTileRow(WriteOp.java:430)
at org.esa.snap.core.gpf.common.WriteOp.computeTile(WriteOp.java:341)
Caused: org.esa.snap.core.gpf.OperatorException: Not able to write product file: '/home/reema/Desktop/Suhail/New_L2_Scenes/Mosaic/mosaic_oct10new.nc'
at org.esa.snap.core.gpf.common.WriteOp.computeTile(WriteOp.java:375)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:82)
[catch] at javax.media.jai.SourcelessOpImage.computeTile(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at com.sun.media.jai.util.RequestJob.compute(Unknown Source)
at com.sun.media.jai.util.WorkerThread.run(Unknown Source)
-------------------------------------------------------------------------------------------------------------


Operating system: Ubuntu 22.04.4 LTS
Data used: Ocean Colour Monitor - 3 Level 2 processed scenes
SeaDAS version: 9.0.1



Regards
Reema

Filters:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 715
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 10 times

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by OB SeaDAS - xuanyang02 » Mon Aug 05, 2024 2:43 pm America/New_York

Could you please share the filenames of the two OCM3 Level-2 files you are trying to mosaic, so we can reproduce the error?

I was able to mosaic two MODIS-AQUA L2 files together -
AQUA_MODIS.20101010T180501.L2.OC.nc
AQUA_MODIS.20101010T181501.L2.OC.nc

reema_mathew
Posts: 16
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by reema_mathew » Tue Aug 06, 2024 12:23 am America/New_York

The filenames are as follows:

EOS06_OCM3_GAC.20230406T061943.L2.OC.nc
EOS06_OCM3_GAC.20230406T062303.L2.OC.nc

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 715
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 10 times

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by OB SeaDAS - xuanyang02 » Fri Aug 09, 2024 11:40 am America/New_York

Could you please share where you download OCM3 L2 files?

reema_mathew
Posts: 16
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by reema_mathew » Mon Aug 12, 2024 7:36 am America/New_York

The OCM3 files are available for download in bhoonidhi.nrsc.gov.in (Bhoonidhi Browse & Order Application).
But the L2 files which I downloaded from the above portal could be successfully mosaicked using SeaDAS 9.0.1.

I encountered the java null point error while trying to mosaic two OCM3 L2 scenes that were internally processed from the L1C scenes.

Regards
Reema

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 310
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0
Been thanked: 4 times

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by OB SeaDAS - knowles » Mon Aug 12, 2024 11:57 am America/New_York

SeaDAS likely doesn't support those files. You would need to determine if SeaDAS can recognize the geocoding. If you view a file and click the map gridlines, this is a good way to determine whether the geocoding is being recognized. If gridlines appear with sensible coordinate labels then the geocoding is recognized. Otherwise you would somehow need to reformat these files such that SeaDAS can read them.

reema_mathew
Posts: 16
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

by reema_mathew » Tue Aug 13, 2024 12:38 am America/New_York

Yes, SeaDAS is able to read those files. The geocoding is recognised and grid lines appear with sensible coordinate labels. And as I said previously, these files get mosaicked perfectly in SeaDAS version 8.3.0.

There is one more thing that I noticed recently.
The L2 files that I'm trying to mosaic have the following bands: Rrs_412, Rrs_443, Rrs_490, Rrs_510, Rrs_555, Rrs_566, Rrs_620, Rrs_670, Rrs_681, Rrs_710, chlor_a, Kd_490, TSM, aot_870, l2_flags.
When I'm trying to mosaic these bands individually, it works fine. The problem comes when I'm selecting all the bands and try to mosaic.


I also noticed that sometimes the error comes like this:

RuntimeException (java.lang):
Cannot construct DataBuffer.
at com.sun.media.jai.util.DataBufferUtils.constructDataBuffer(Unknown Source)
at com.sun.media.jai.util.DataBufferUtils.createDataBufferDouble(Unknown Source)
at javax.media.jai.ComponentSampleModelJAI.createDataBuffer(Unknown Source)
at javax.m[/code]edia.jai.RasterFactory.createWritableRaster(Unknown Source)
at javax.media.jai.PlanarImage.createWritableRaster(Unknown Source)
at javax.media.jai.PointOpImage.computeTile(Unknown Source)
Caused: org.esa.snap.core.gpf.OperatorException: Cannot construct DataBuffer.
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(OperatorExecutor.java:381)
at com.sun.media.jai.util.SunTileScheduler.sendExceptionToListener(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at com.sun.media.jai.iterator.RandomIterFallback.makeCurrent(Unknown Source)
at com.sun.media.jai.iterator.RandomIterFallback.getSampleDouble(Unknown Source)
at com.sun.media.jai.opimage.WarpNearestOpImage.computeRectDouble(Unknown Source)
at com.sun.media.jai.opimage.WarpNearestOpImage.computeRect(Unknown Source)
at javax.media.jai.WarpOpImage.computeTile(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at javax.media.jai.PlanarImage.getData(Unknown Source)
at javax.media.jai.RenderedOp.getData(Unknown Source)
at org.esa.snap.core.image.VirtualBandOpImage.addDataToReferredRasterDataSymbols(VirtualBandOpImage.java:307)
at org.esa.snap.core.image.VirtualBandOpImage.computeTile(VirtualBandOpImage.java:235)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)at javax.media.jai.PlanarImage.getData(Unknown Source)
at javax.media.jai.PlanarImage.getExtendedData(Unknown Source)
at com.sun.media.jai.opimage.MosaicOpImage.computeTile(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at javax.media.jai.PlanarImage.getData(Unknown Source)
at javax.media.jai.RenderedOp.getData(Unknown Source)
at com.bc.ceres.glevel.MultiLevelImage.getData(MultiLevelImage.java:64)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:449)
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(OperatorContext.java:435)
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(OperatorImage.java:75)
at javax.media.jai.SourcelessOpImage.computeTile(Unknown Source)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(Unknown Source)
at javax.media.jai.OpImage.getTile(Unknown Source)
at com.sun.media.jai.util.RequestJob.compute(Unknown Source)
[catch] at com.sun.media.jai.util.WorkerThread.run(Unknown Source)




Also, while starting the SeaDAS GUI from the terminal, I get a warning like this:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/home/reema/SeaDAS/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
libEGL warning: DRI2: failed to authenticate


I'm wondering whether this has anything to do with the mosaicking error.


Reema

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 310
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0
Been thanked: 4 times

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by OB SeaDAS - knowles » Tue Aug 13, 2024 8:07 am America/New_York

I'm not familiar with these L2 files, their sizes etc. You mention that you can mosaic a single band, but with all bands it fails. Likely it could be a memory issue. To boost virtual memory go in Preferences to Performance.

If this doesn't work, one route would be that Mosaic is a tool developed by SNAP at ESA (and SeaDAS has not modified this particular tool). You could try downloading the SNAP application and determine whether this tool also fails in SNAP. Note: SeaDAS 9.0.1 uses SNAP version 10 whereas SeaDAS 8.3.0 used SNAP version 9.

The "ProxyURLStreamHandlerFactory" error is just a software auto-update warning message, which is a functionality that SeaDAS doesn't use and isn't associated with your Mosaic issue.

reema_mathew
Posts: 16
Joined: Tue Feb 07, 2023 11:19 pm America/New_York
Answers: 0

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by reema_mathew » Wed Aug 14, 2024 2:10 am America/New_York

The size of the L2 files ranges from 10 MB to 150 MB or more depending on the number of valid pixels.

I tried to mosaic the same files using SNAP version 10 as suggested and it worked perfectly. The files were mosaicked successfully in both SNAP versions 9 and 10. So I don't understand why there's a problem only with the SeaDAS 9.0.1 GUI.

What exactly needs to be changed in Preferences->Performance section to boost the virtual memory?

Reema

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 310
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0
Been thanked: 4 times

Re: Error in mosaicking OCM3 Level-2 scenes in SeaDAS

by OB SeaDAS - knowles » Wed Aug 14, 2024 10:54 am America/New_York

Since it works in SNAP, you could compare the SNAP preference Performance settings with the SeaDAS preference Performance settings.

Post Reply