Problem reading NetCDF file

61 views
Skip to first unread message

Diana Norgaard

unread,
Jul 30, 2021, 2:05:51 PM7/30/21
to ERDDAP
Hi,

I am running into issue with ERDDAP reading some NetCDF files.  When I try to generate xml using the generator I get:

Unable to open file or file not .nc-compatible.
java.io.FileNotFoundException: EFL5-T1030-A3L-NS3688-Z1020-INS26-REC29.nc (No such file or directory)
 at ucar.unidata.io.RandomAccessFile.<init>(RandomAccessFile.java:333)
 at ucar.unidata.io.RandomAccessFile.acquire(RandomAccessFile.java:203)
 at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:537)
 at ucar.nc2.NetcdfFile.open(NetcdfFile.java:378)
 at ucar.nc2.NetcdfFile.open(NetcdfFile.java:343)
 at ucar.nc2.NetcdfFile.open(NetcdfFile.java:326)
 at ucar.nc2.NetcdfFile.open(NetcdfFile.java:312)
 at gov.noaa.pfel.coastwatch.griddata.NcHelper.openFile(NcHelper.java:712)
 at gov.noaa.pfel.erddap.dataset.EDDGridFromNcLow.generateDatasetsXml(EDDGridFromNcLow.java:469)
 at gov.noaa.pfel.erddap.dataset.EDDGridFromNcFiles.generateDatasetsXml(EDDGridFromNcFiles.java:83)
 at gov.noaa.pfel.erddap.GenerateDatasetsXml.doIt(GenerateDatasetsXml.java:302)
 at gov.noaa.pfel.erddap.GenerateDatasetsXml.main(GenerateDatasetsXml.java:974)

I am able to read the NetCDF file with ncdump, so I then copied the xml from a working dataset, and then removed some variables not present in the problematic datasets.  I've attached datasets.xml that contains info from both working and not working datasets.  The ones that do not work do not have heading info and pb.  

In ERDDAP log, I get the following:

  Table.readNcCF /erddapData/ANCLAJES/CNK29/RECUPERACIONES/EFL5-T1030-CNK29/CORRPTS/EFL5-T1030-A3L-NS3688-Z1020-INS
26-REC29.nc
0 bad file: removing fileTable row for /erddapData/ANCLAJES/CNK29/RECUPERACIONES/EFL5-T1030-CNK29/CORRPTS/EFL5-T1030-A3L-NS3688-Z1020-INS26-REC29.nc
SimpleException: ERROR in Table.readNcCF /erddapData/ANCLAJES/CNK29/RECUPERACIONES/EFL5-T1030-CNK29/CORRPTS/EFL5-T1030-A3L-NS3688-Z1020-INS26-REC29.nc:
Invalid file: nLevels=2, outerDim=scalarDim, but can't find variable[innerDim][obsDim].  innerDim=-1 obsDim=-1
 at gov.noaa.pfel.coastwatch.pointdata.Table.readNcCF(Table.java:10236)
 at gov.noaa.pfel.erddap.dataset.EDDTableFromNcCFFiles.lowGetSourceDataFromFile(EDDTableFromNcCFFiles.java:143)
 at gov.noaa.pfel.erddap.dataset.EDDTableFromFiles.getSourceDataFromFile(EDDTableFromFiles.java:3199)
 at gov.noaa.pfel.erddap.dataset.EDDTableFromFiles.<init>(EDDTableFromFiles.java:1530)
 at gov.noaa.pfel.erddap.dataset.EDDTableFromNcCFFiles.<init>(EDDTableFromNcCFFiles.java:97)
 at gov.noaa.pfel.erddap.dataset.EDDTableFromFiles.fromXml(EDDTableFromFiles.java:519)
 at gov.noaa.pfel.erddap.dataset.EDD.fromXml(EDD.java:430)
 at gov.noaa.pfel.erddap.LoadDatasets.run(LoadDatasets.java:353)

I am unsure what the problem is with the NetCDF file.  I attached the .nc file for your reference. Any insight you can provide would be appreciated.

thanks,
Diana

datasets.xml
EFL5-T1030-A3L-NS3688-Z1020-INS26-REC29.nc

Frederic Leclercq

unread,
Aug 1, 2021, 11:20:11 AM8/1/21
to erd...@googlegroups.com

Hi Diana,

I had a quick view at your xml file, there seems to be two datasets (same) 'EFL5-T1030-A3L-NS3688-Z1020-INS26-REC29'? I tried generating a xml chunk using EDDTableFromNcFiles instead of EDDTableFromNcCFFiles and that seems to work. So, I guess it is a CF-related issue.  If you would insists on using EDDTableFromNcCFFiles I think your long_names/standard_names should be listed in the CF convention list? But please keep us (me) informed if you've tackled this problem.

Best regards,
Fred.

--
You received this message because you are subscribed to the Google Groups "ERDDAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erddap+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/erddap/da1897bd-d2e9-4611-a97e-c6e11d36942dn%40googlegroups.com.

Felimon Gayanilo

unread,
Aug 1, 2021, 2:50:37 PM8/1/21
to Diana Norgaard, ERDDAP
have you changed the variable labels (e.g., 'jd' to 'time' etc)?

Diana Norgaard

unread,
Aug 2, 2021, 5:52:26 PM8/2/21
to ERDDAP
Hi Fred,

Once I changed  EDDTableFromNcCFFiles to EDDTableFromNcFiles I was able to get more information on things that needed fixing in the datasets.xml to get data to show up.  I was then able to revert to EDDTableFromNcCFFiles and it still worked.  I may still need to do some data tweaking but for now at least I am moving along.

thanks!
Diana

Diana Norgaard

unread,
Aug 2, 2021, 6:46:42 PM8/2/21
to ERDDAP
Actually reverting to EDDTableFromNcCFFiles didn't work, though EDDTableFromNcFiles got me somewhere.  Guessing it doesn't like what I specified for cdm_altitude_proxy (ProfEstimada).  Everything else is a subset of another file that works with  EDDTableFromNcCFFiles.  I will look into this a bit more but at least I can get it to work with EDDTableFromNcFiles if nothing else.
Reply all
Reply to author
Forward
0 new messages