Hi Tom:
Verdi uses the netcdf-java library, which knows that the file is an
IOAPI file, but something in it doesnt correspond correctly. If you send
me the file I can at least check if the latest version works - if so,
they would just need to upgrade.
Otherwise its likely that NCO / R has manipulated the file in a way that
is not compliant to the IOAPI metadata spec. By best guess is that
theres supposed to be a global attribute "VGLVLS" but its missing. You
might check the original and the modified file.
Theres not a nice tool like tidy that can tell you exactly whats wrong,
unfortunately.
John
On 3/2/2012 8:05 PM, Tom Roche wrote:
Is there a tool to verify the correctness of the structure of a netCDF file, à
la what `tidy` does for HTML? Why I ask:
I'm using NCO and R to manipulate and display my netCDF files (actually IOAPI
files, to be completely correct). Most of my group uses Fortran and the display
tool `verdi`. (We're all on linux.) I have a file on which I've used R
(up-to-date, with package=ncdf4) and NCO (also up-to-date), which are both
happy with it. However, when I try to open it as a dataset with verdi, I get
java.lang.NullPointerException
at
ucar.nc2.dataset.conv.M3IOConvention.makeZCoordAxis(M3IOConvention.java:180)
at
ucar.nc2.dataset.conv.M3IOConvention.constructCoordAxes(M3IOConvention.java:143)
at
ucar.nc2.dataset.conv.M3IOConvention.augmentDataset(M3IOConvention.java:85)
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.acquireDataset(NetcdfDataset.java:527)
at ucar.nc2.dt.grid.GridDataset.open(GridDataset.java:103)
at ucar.nc2.dt.grid.GridDataset.open(GridDataset.java:89)
at
anl.verdi.loaders.NetcdfDatasetFactory.openDataset(NetcdfDatasetFactory.java:185)
at
anl.verdi.loaders.NetcdfDatasetFactory.createModels3Datasets(NetcdfDatasetFactory.java:81)
at anl.verdi.loaders.Models3Loader.createDatasets(Models3Loader.java:82)
at anl.verdi.data.DataManager.createDatasets(DataManager.java:99)
at anl.verdi.core.VerdiApplication.loadDataset(VerdiApplication.java:556)
at anl.verdi.core.VerdiApplication.addDataset(VerdiApplication.java:609)
at
anl.verdi.core.VerdiAppConfigurator$1.actionPerformed(VerdiAppConfigurator.java:63)
(Before that is all AWT.) I suspect verdi is choking because, while the data is 4D, one
of the dimensions is non-spatial (the "layers" correspond to different crops on
the surface, not vertical layers), and that verdi doesn't handle that gracefully. But I'd
like to verify the correctness of my file before I engage their bugtracker. Is there a
way to do that?
TIA, Tom Roche<Tom_Roche@xxxxxxxxx>
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/