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

Re: Information on NetCDF library

Hi John,

now it's clear, thank you!


On 11/10/2012 12:51 AM, John Caron wrote:
Hi Enrico:

The problem is that the hdf4 file has groups, and FileWriter.writeToFile() writes netcdf3 files, which does not.

4.3.14 will have the ability to write to netcdf4 files.


On 11/5/2012 10:03 AM, Enrico Boldrini wrote:
Dear John,

I'm a colleague of Stefano Nativi (CNR, Italy). I'm using your very
helpful Java library for NetCDF; I've found a potential problem trying
to convert a hdf file to a NetCDF file, with the following code:

     NetcdfFile ncFile =
     File outFile = File.createTempFile("HDF", ".nc");
     ucar.nc2.FileWriter.writeToFile(ncFile, outFile.getAbsolutePath());

(The input file can be downloaded at:

The stack trace I get is the following:

Exception in thread "main" java.lang.IllegalArgumentException: illegal
netCDF-3 object name
at ucar.nc2.FileWriter.writeToFile(FileWriter.java:135)
at ucar.nc2.FileWriter.writeToFile(FileWriter.java:82)
at eu.floraresearch.sdi.gt_coverage.gt.HDFTest.main(HDFTest.java:11)

(it seems related to escaped names.. just guessing)

Am I missing/misusing something? Any feedback is appreciated, thank you!

Enrico Boldrini

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.