[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDFJava #SBB-665470]: xml to netcdf
- Subject: [netCDFJava #SBB-665470]: xml to netcdf
- Date: Mon, 01 Jul 2013 09:42:36 -0600
Greetings Ghansham,
Yes, you can convert NcML to a netCDF file using netCDF-Java. See
http://www.unidata.ucar.edu/software/netcdf/ncml/
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
ucar.nc2.FileWriter2
(www.unidata.ucar.edu/software/netcdf-java/v4.3/javadoc/ucar/nc2/FileWriter2.html)
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.
Cheers,
Sean
> 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