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.
>To: address@hidden >From: Pedro Vicente <address@hidden> >Subject: Re: 20040430: netCDF in HDF Explorer >Organization: NCSA >Keywords: 200404291852.i3TIqZtK008257 HDF HDF5 Explorer Pedro, > I did a beta version of HDF Explorer that read netCDF files > > I work in the HDF group and Mike Folk gave me some suggestions > about it, that was creating three folders named > "Dimensions", "Variables" and "Attributes" (just like ncBrowse does) > > the read of the netcdf file is based on the ncdump code > regarding the NC_CHAR data, there is some improvements to do, like > detecting the newline characters to display in different grid rows (like > is done in ncdump) > > one difference from HDF data, is that here there is no dump of the dimensions > data (in HDF the dimensions have data , that can be a array of variable data > instead of just the indexes 0, 1, 2, etc) > I am not sure about netCDF dimensions tough, if we can access their data > and if the data can be defined or not A netCDF dimension only has data if there is a corresponding 1-D variable with the same name. What "ncdump -c" does is detect such "coordinate dimensions" and output the corresponding data. It's possible to define dimensions with no associated data (such as for string lengths). These dimensions are not coordinate dimensions, but are simply an artifact of support for the Fortran model of strings, or they merely count something that has no associated coordinate. > The program reads .nc and .cdf extension files (I was not sure about the > difference too) There is no difference. Long ago we used the ".cdf" extension, but then when we found out that the NASA CDF format used the same dimension, we encouraged all netCDF users to change to use of the ".nc" extension instead, to avoid confusion. But nothing in the library or interface cares about the file extension, it's merely a convention useful for humans to figure out the type of data stored in the file. > the library used to read the files is the same included in HDF4, which I > believe > is an older version (2 ?), but it can read the newer , I think Yes, the format has never changed, so far. However, when we release version 3.6.0, we will support a new second version of the netCDF format that supports 64-bit file offsets, and hence very large files. The library will automatically detect which version of the file is used and deal with it appropriately. It will still write version 1 files by default, and read both kinds of files transparently. > You can download it here > > http://www.space-research.pt/demo/HDFExplorerSetup_1.2.14.Beta.zip > > extract , and start setup.exe > there is a folder with netCDF data files , on the installation folder OK, I don't have any Windows machines, so I assume there's something besides setup.exe for us Unix and Mac users. I'm swamped this week, but maybe I'll get a chance to look at it next week. If it works well, we may want to include a description of it in our "Software for Manipulating or Displaying NetCDF Data" at http://www.unidata.ucar.edu/packages/netcdf/software.html > regarding the copyright notice, do you suggest anything that should be put > in the About dialog box ? Not necessary. The license ... requests that the user credit UCAR/Unidata in any publications that result from the use of this software or in any product that includes this software but it is not required, and is sometimes inconvenient. --Russ