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

[netCDFJava #SBB-665470]: xml to netcdf

Greetings Ghansham,

Yes, you can convert NcML to a netCDF file using netCDF-Java. See


for more details (look for "Using NcML to create a NetCDF-3 file").
The link above uses ucar.nc2.FileWriter, which is deprecated, but
should still work if you are looking for something quick.

That said, I would recommend using



and, if you have the C library of netCDF installed, you can directly write out a
netCDF-4 file, thus skipping the conversion using NCO.

See the first link for more info on the structure of NcML.



> R/Sir
> Is there a way to convert raw data to netcdf using XML.
> I read somewhere:
> http://hdf-forum.184993.n3.nabble.com/h5gen-or-any-h5dump-generated-XML-to-HDF5-td3719793.html
> See post by H. Joe Lee....
> It states something like this:
> Create NcML file (a variant of XML) and use NetCDF-Java to generate an
> NetCDF-3  file [1].
> Then convert the NetCDF-3 to NetCDF-4 using NCO  [2].
> The converted NetCDF-4 file is HDF5 file.
> You got the HDF5 from XML (NcML).
> Ghansham

Ticket Details
Ticket ID: SBB-665470
Department: Support netCDF Java
Priority: Normal
Status: Open

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.