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 Paul, > is there any easy possibility to get a netCDF-4 file converted into a xml? > I`m asking that, because I`m a poor system-administrator, who should solve > that riddle: > > - [ncdump -k] tells me, that I have a netCDF-4 File [I suppose it`s format > variant 3, according to [man ncdump] > - [man ncdump] also tells me, that the parameter -x only works on "CDF > classic model data" > > Please can you tell me, how to get my data from netCDF to XML - I`ve been > searching for many hours and I don`t get it and I can`t believe, that > nobody wanted to do this before! First, I assume by xml you mean NcML, which uses XML syntax to represent netCDF metadata and data. I think the Java NCdumpW utility is intended to do just what you want, using the "-ncml" option. You can find it in the latest netcdfAll-4.5.jar from http://www.unidata.ucar.edu/downloads/netcdf/netcdf-java-4/ According to the documentation, you can use it like this: java -Xmx1g -classpath netcdfAll-4.5.jar ucar.nc2.NCdumpW filepath -ncml [-c | -vall] as documented here: http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/reference/manPages.html However, I haven't tested this, so if you have any problems with it, it would be good to send questions to address@hidden. One reason the netCDF-C ncdump utility doesn't support NcML output yet for netCDF-4 is that there are still some issues for how to represent user-defined data types in NcML. Another reason is low priority, because we haven't very many user requests for this capability yet. I'm forwarding your question to netcdf-java support in case there's more information on if and when NCdumpW can be used for netCDF-4 to NcML ... --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: DOW-293583 Department: Support netCDF Priority: Normal Status: Closed