I’ve been having issues opening L3 mapped data from the OceaColor website. Some of the files I can open and some give the following error
java.lang.NullPointerException
at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.attributeToMetadata(SeadasFileReader.java:1242)
at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.addAttributeToElement(SeadasFileReader.java:1227)
at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.addAttributesToElement(SeadasFileReader.java:1221)
at gov.nasa.gsfc.seadas.dataio.SeadasFileReader.addGlobalMetadata(SeadasFileReader.java:873)
at gov.nasa.gsfc.seadas.dataio.SMIFileReader.createProduct(SMIFileReader.java:100)
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.dataio.ProductIO.readProduct(ProductIO.java:179)
at org.esa.snap.rcp.actions.file.ReadProductOperation.run(ReadProductOperation.java:61)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
I wasn’t having this problem while using SNAP 7.0. Here is some sample data of files I can and cannot open.
I get the same error for A20022132019243.L3m_MC_CHL_chlor_a_9km.nc, but I can open the file using NetCDF4-CF format. NASA Panoply is also able to open the file. The problem seems to be with generating the SNAP 8 metadata from the attributes, so I suspect some change in metadata from the old smigen to l3mapgen. The metadata for the other file displays _NCProperties see NetCDF Attribute Conventions. _NCProperties is normally hidden by the netcdf library, but you can see it if you use h5dump -A: