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 =
NetcdfFile.open("/home/boldrini/Downloads/MOD17A3.C5.1.GEO.2000.hdf");
File outFile = File.createTempFile("HDF", ".nc");
ucar.nc2.FileWriter.writeToFile(ncFile, outFile.getAbsolutePath());
(The input file can be downloaded at:
ftp://nacp.ornl.gov/synthesis/2008/firenze/continental/ARCHIVAL/original/OM_MODIS_GPP/MOD17A3.C5.1.GEO.2000.hdf)
The stack trace I get is the following:
Exception in thread "main" java.lang.IllegalArgumentException: illegal
netCDF-3 object name
at
ucar.nc2.NetcdfFileWriteable.addDimension(NetcdfFileWriteable.java:234)
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