NSF Unidata

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

[netCDFJava #QJL-517256]: Help about NetCDF-4 With NetCDF-JAVA!

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.



Hi Zhoujun,

The operation of converting an NcML file (or any CDM dataset) to a NetCDF-4 
file is something that can be done from the command-line [1]. If you would like 
to do it programmatically, I suggest just following the lead of the 
ucar.nc2.write.Nccopy.main() method [2], which is what is being invoked when 
converting from the command-line.

Cheers,
Christian

[1] 
http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/reference/manPages.html#nccopy
[2] 
https://github.com/Unidata/thredds/blob/v4.6.3/cdm/src/main/java/ucar/nc2/write/Nccopy.java#L126

Ticket Details
===================
Ticket ID: QJL-517256
Department: Support netCDF Java
Priority: Normal
Status: Closed