Page 1 of 1

Error reading MERIS file from l2gen

Posted: Fri Oct 29, 2021 8:42 am America/New_York
by andrew.meredith
Hi

I'm getting errors trying to process the latest MERIS L1B files using SeaDAS v8.1 with OCSSW T2021.21 (on linux VM with RHEL). The following provides an example of the processing steps that lead to the problem:

lonlat2pixline /data/MERIS/RR_4th/FL/EN1_MDSI_MER_RR__1P_20020516T154356_20020516T162758_001096_0040_20180522T174442_0100.SEN3/xfdumanifest.xml -87.9769 24.1865 -79.0202 31.0531

l1bextract_safe_nc -v --spixl=377 --epixl=1095 --sline=6844 --eline=7631 /data/MERIS/RR_4th/FL/EN1_MDSI_MER_RR__1P_20020516T154356_20020516T162758_001096_0040_20180522T174442_0100.SEN3 EN1_MDSI_MER_RR__1P_20020516T154356_20020516T162758_001096_0040_20180522T174442_0100.SEN3.FL1

l2gen ifile=EN1_MDSI_MER_RR__1P_20020516T154356_20020516T162758_001096_0040_20180522T174442_0100.SEN3.FL1/xfdumanifest.xml ofile=EN1_20020516T154356.FL1.L2 par=2002136154356.anc

#using gpt from latest version of snap (v8.0.8)
/opt/snap/bin/gpt -c 7G -Ds3tbx.reader.meris.pixelGeoCoding=true -e -x repro.xml -t envisat.2002136.0516.160359S.L3.FL1.v951T202121_1_tmp.dim -f BEAM-DIMAP -Pfile=EN1_20020516T154356.FL1.L2

The last step generates the following error (i'm assuming the gdal related errors aren't an issue or at least aren't related):

INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 3.0.2 found on system. JNI driver will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.2 set to be used by SNAP.
Native library load failed.
java.lang.UnsatisfiedLinkError: /home/ameredith/.snap/auxdata/gdal/gdal-3-0-X-jni/libgdalalljni.so: libgdal.so.26: cannot open shared object file: No such file or directory
SEVERE: org.esa.s2tbx.dataio.gdal.GDALLoader: Failed to initialize GDAL native drivers. GDAL readers and writers were disabled.java.lang.reflect.InvocationTargetException
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
Executing processing graph
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.2 set to be used by SNAP.
done.
java.lang.IllegalArgumentException: latBand.getProduct().getSceneRasterWidth() < 2 || latBand.getProduct().getSceneRasterHeight() < 2
at org.esa.snap.core.datamodel.PixelGeoCoding2.<init>(PixelGeoCoding2.java:91)
at org.esa.snap.core.datamodel.GeoCodingFactory.createPixelGeoCoding(GeoCodingFactory.java:53)
at gov.nasa.gsfc.seadas.dataio.L2FileReader.addPixelGeocoding(L2FileReader.java:346)
at gov.nasa.gsfc.seadas.dataio.L2FileReader.addGeocoding(L2FileReader.java:190)
at gov.nasa.gsfc.seadas.dataio.L2FileReader.createProduct(L2FileReader.java:145)
at gov.nasa.gsfc.seadas.dataio.SeadasProductReader.readProductNodesImpl(SeadasProductReader.java:185)
at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
at org.esa.snap.core.gpf.common.ReadOp.initialize(ReadOp.java:168)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:528)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:298)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:385)
at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:77)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:199)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:182)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:182)
at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:166)
at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:85)
at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:58)
at org.esa.snap.core.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:118)
at org.esa.snap.core.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:86)
at org.esa.snap.core.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:547)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:391)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:287)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:121)
at org.esa.snap.core.gpf.main.GPT.run(GPT.java:60)
at org.esa.snap.core.gpf.main.GPT.main(GPT.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.esa.snap.runtime.Launcher.lambda$run$0(Launcher.java:55)
at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)
at install4j.org.esa.snap.runtime.Launcher_gpt.main(Unknown Source)

Error: latBand.getProduct().getSceneRasterWidth() < 2 || latBand.getProduct().getSceneRasterHeight() < 2


I get a similar error trying to open the L2 file in the GUI.

I tried an alternate reader ('NetCDF-CF') with the gpt Reproject command but that produces a different error (Error: Can't reproject grid coverage "Unknown").

Here's the repro.xml
<graph id="saps_proc"><version>1.0</version><node id="read_node"><operator>Read</operator><sources /><parameters><file>${file}</file><formatName>SeaDAS-L2</formatName></parameters></node><node id="reproj_node"><operator>Reproject</operator><sources><source>read_node</source></sources><parameters><wktFile /><crs>PROJCS["unnamed",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",27.6],PARAMETER["longitude_of_center",-83.5],PARAMETER["standard_parallel_1",24.2],PARAMETER["standard_parallel_2",31.1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]</crs><resampling>Nearest</resampling><referencePixelX>0.0</referencePixelX><referencePixelY>0.0</referencePixelY><easting>-427215.041291</easting><northing>390964.164049</northing><orientation>0.0</orientation><pixelSizeX>1100.000000</pixelSizeX><pixelSizeY>1100.000000</pixelSizeY><width>777</width><height>693</height><tileSizeX /><tileSizeY /><orthorectify>false</orthorectify><elevationModelName /><noDataValue>NaN</noDataValue><includeTiePointGrids>true</includeTiePointGrids><addDeltaBands>false</addDeltaBands></parameters></node></graph>

Thanks,
Andrew

Re: Error reading MERIS file from l2gen

Posted: Fri Oct 29, 2021 11:07 am America/New_York
by OB SeaDAS - xuanyang02
Hi Andrew,

I followed your steps to generate EN1_20020516T154356.FL1.L2.

Yes, SeaDAS-8.1.0 cannot open EN1_20020516T154356.FL1.L2 because of some BadNav lines. We fixed the bug and the fix will be in the next release.

SNAP also accepted the bug fix. Hopefully their next release of S3tbx will contain the fix.

Bing

Re: Error reading MERIS file from l2gen

Posted: Mon Nov 01, 2021 8:10 am America/New_York
by andrew.meredith
Great. Thanks.

Any estimate on date of next release?

Re: Error reading MERIS file from l2gen

Posted: Mon Nov 08, 2021 11:34 am America/New_York
by OB SeaDAS - xuanyang02
SNAP just released S3tbx 8.0.4. You will be prompted for updates when you start SNAP, or you can do Help -> check for updates and update from there. Once you update, you should be able to read EN1_20020516T154356.FL1.L2 and do gpt in SNAP.

Re: Error reading MERIS file from l2gen

Posted: Mon Nov 08, 2021 2:54 pm America/New_York
by andrew.meredith
Thanks. I saw that and after updating SNAP I was able to process the file!