Hi John,
I'm currently trying the java-netcdf 2.2v9 library. I have the task of
converting some netcdf-files from GDV or in-house conventions to
CF-1.0 convention and thought of using the new library, though it
still is alpha.
I recognized the following problem:
a) NetcdfFileWriteable.addVariable(..., ArrayList dims)
I guess instead of ArrayList, the List interface should be used, as
returned by the getDimension methods
b) NetcdfFileWriteable.create is deprecated
this might only be in jdk1.5.0. I had a look at the sources and
recognized, that the function in front of create: addVariableAttribute
got first deprecated and then commented out, thus moving the
deprecated tag to create. Deleting the addVariableAttribute block
solved the problem.
c) NetcdfFileWriteable.open(location) throws exeception: 'Not a netcdf
file' when creating a new file. NetcdfFileWriteable.open(location,
fill) worked fine.
d) since I had to copy a lot of attributes, I found the current
methods for addGlobalAttribute(String name, *** value) quite
inconvenient since I allways had to test the type of value being
Array/String/Number.
Variable.addAttribute(attr) was much nicer to work with.
The conversion has to do with a new EU project called GEMS (Global and
regional Earth-system (Atmosphere) Monitoring
using Satellite and in-situ data)
http://www.ecmwf.int/research/EU_projects/GEMS/ . I only play a minor
role in this project, but I would like to convince the collaboration
on using netcdf CF-1.0 instead of BUFR / GRIB . Do you have some good
arguments I could use?
Best regards,
Heiko