[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #ELE-133387]: Trouble opening a netCDF file in ToolsUI



Hi Tom,

I could read the data file into the "Viewer" tab just fine. When I tried it in 
the "CoordSys" and "FeatureTypes"/"Grids" tabs (where it tries to enhance the 
dataset with coordinates and such), I get similar messages. Looks like one of 
the coordinate builders, NsslRadarMosaicConvention, thinks it recognizes this 
dataset and tries to do its magic.

So, if you want to look at it as a grid, I think you'll need to look at the 
CF-ness of the dataset.

Ethan

> Here ya go....using ToolsUI "NCDump" option:  (Also, the file is still
> available on our ftp server:
> <ftp://ftp.ssec.wisc.edu/pub/ssec/tomw/test.nc>
> 
> Thanks!!!!
> 
> ToolsUI 4.1:
> 
> java.lang.IllegalArgumentException: New variable (cref) must have
> datatype attribute
> at ucar.nc2.ncml.NcMLReader.readVariableNew(NcMLReader.java:986)
> at ucar.nc2.ncml.NcMLReader.readVariable(NcMLReader.java:818)
> at ucar.nc2.ncml.NcMLReader.readGroup(NcMLReader.java:750)
> at ucar.nc2.ncml.NcMLReader.readNetcdf(NcMLReader.java:470)
> at ucar.nc2.ncml.NcMLReader.wrapNcMLresource(NcMLReader.java:118)
> at 
> ucar.nc2.dataset.conv.NsslRadarMosaicConvention.augment2D(NsslRadarMosaicConvention.java:121)
> at 
> ucar.nc2.dataset.conv.NsslRadarMosaicConvention.augmentDataset(NsslRadarMosaicConvention.java:88)
> at 
> ucar.nc2.dataset.CoordSysBuilder.addCoordinateSystems(CoordSysBuilder.java:391)
> at ucar.nc2.dataset.NetcdfDataset.enhance(NetcdfDataset.java:472)
> at ucar.nc2.dataset.NetcdfDataset.<init>(NetcdfDataset.java:1144)
> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:440)
> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:417)
> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:402)
> at ucar.nc2.ui.ToolsUI$NCdumpPanel.run(ToolsUI.java:1375)
> at ucar.nc2.ui.ToolsUI$GetDataTask.run(ToolsUI.java:3921)
> at java.lang.Thread.run(Thread.java:619)
> 
> 
> ToolsUI 4.2:
> 
> java.lang.NullPointerException
> at 
> ucar.nc2.dataset.conv.NsslRadarMosaicConvention.addCoordSystem(NsslRadarMosaicConvention.java:187)
> at 
> ucar.nc2.dataset.conv.NsslRadarMosaicConvention.augment2D(NsslRadarMosaicConvention.java:139)
> at 
> ucar.nc2.dataset.conv.NsslRadarMosaicConvention.augmentDataset(NsslRadarMosaicConvention.java:88)
> at ucar.nc2.dataset.NetcdfDataset.enhance(NetcdfDataset.java:465)
> at ucar.nc2.dataset.NetcdfDataset.<init>(NetcdfDataset.java:1165)
> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:440)
> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:417)
> at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:402)
> at ucar.nc2.ui.ToolsUI$NCdumpPanel.run(ToolsUI.java:1407)
> at ucar.nc2.ui.ToolsUI$GetDataTask.run(ToolsUI.java:4498)
> at java.lang.Thread.run(Thread.java:619)
> 
> 
> On Mon, Jun 28, 2010 at 3:21 PM, Unidata netCDF Java Support
> <address@hidden> wrote:
> > for some reason its reading ncml, not straight netcdf. is that what you 
> > intend? can you send complete stack trace?
> >
> >> I'm helping one of our students who is using some old code (I wrote a
> >> few years ago) to generate a netCDF file.  I cannot open the file
> >> using ToolsUI -- I get an Exception:
> >>
> >> java.lang.IllegalArgumentException: New variable (cref) must have
> >> datatype attribute
> >> at ucar.nc2.ncml.NcMLReader.readVariableNew(NcMLReader.java:986)
> >> at ucar.nc2.ncml.NcMLReader.readVariable(NcMLReader.java:818)
> >> ......
> >> ......
> >>
> >> The thing is, there is no variable "cref" that I know of in the
> >> file....and please don't worry about the lack of CF conventions....
> >>
> >> I'm using netcdfAll-4.1.jar  (although I tried using 2.2 and got the
> >> same results....).
> >>
> >> I have posted the file to:  <ftp://ftp.ssec.wisc.edu/pub/ssec/tomw/test.nc>
> >>
> >> The "ncdump -h" from the command line gives this:
> >>
> >> D:\DATA_DRIVE\sarah>ncdump -h test.nc
> >> netcdf test {
> >> dimensions:
> >> latitude = 1059 ;
> >> longitude = 1772 ;
> >>
> >> variables:
> >> float channel14(latitude, longitude) ;
> >> channel14:units = "dimensionless" ;
> >> channel14:missing_value = -999.f ;
> >>
> >> // global attributes:
> >> :TypeName = "channel14" ;
> >> :DataType = "LatLonGrid" ;
> >> :Latitude = 38.26048527495814 ;
> >> :Longitude = -66.06186994084175 ;
> >> :FractionalTime = 0 ;
> >> :Height = 0 ;
> >> :LatGridSpacing = 0.04 ;
> >> :LonGridSpacing = 0.04 ;
> >> :Time = 1198281600 ;
> >> :RangeFolded = -99993.f ;
> >> :MissingData = -999.f ;
> >> }
> >>
> >>
> >> Hope you can help....
> >>
> >> Thanks!!
> >>
> >> tom



Ticket Details
===================
Ticket ID: ELE-133387
Department: Support netCDF Java
Priority: Normal
Status: Closed