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

[netCDFJava #SYH-931648]: command line NcML ==> NetCDF



Hi Rich,

> We currently can dump NetCDF to NcML on the command line
> java -classpath toolsUI.jar ucar.nc2.NCdump <NetCDF-3 filename> -ncml
>
> Many folks might want a command line way of converting NcML  to
> NetCDF, and while we are at it, how about adding a deflate option for
> Netcdf4?
>
> java -classpath toolsUI.jar  ucar.nc2.FileWriter.NcMLwriter  <NcML
> filename> <NetCDF filename> -netcdf3

You can read an NcML file and write a netCDF-3 file with the following:

java -classpath toolsUI.jar ucar.nc2.FileWriter -in <NcML filename> -out <nc
filename>

Here's an old email from John summarizing. It is for an old version but there
are some interesting tidbits:

http://www.unidata.ucar.edu/mailing_lists/archives/netcdf-java/2005-August/000042.html


> java -classpath toolsUI.jar  ucar.nc2.FileWriter.NcMLwriter  <NcML
> filename> <NetCDF filename> -netcdf4 -deflate

Writing netCDF-4 files from netCDF-Java isn't available at this point. No plans
for a pure Java implementation. John has been doing some testing with JNI to
the netCDF-4 C library mainly reading files for comparing Java and C impls.
Bottom line, no plans for writing netCDF-4 files at this point.

> This would allow folks to easily convert OpenDAP, aggregations of
> OpenDAP, etc to files for archiving.
>
> -Rich

Hope that helps.

Ethan

Ticket Details
===================
Ticket ID: SYH-931648
Department: Support netCDF Java
Priority: Normal
Status: Open