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 Peter, Yes, the ncgen4 alpha version of the ncgen utility that's in the 4.0.1-beta1 release at ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-beta.tar.gz supports unsigned types as well as user-defined types, multiple unlimited dimensions, attributes of non-primitive types, and other features of the enhanced data model supported by netCDF-4. Currently the -b and -c options for binary netCDF and C program output are supported, but there is no generation of Fortran source yet. To build ncgen4, you must supply the option --enable-ncgen4 to configure on building. We will release 4.0.1-beta2 soon, and it will support a few more features, including special virtual attributes output by ncdump that specify performance-related features such as compression and chunking. Note that the ncdump in release 4.0 already supports the new CDL syntax, and you can see examples of it in some of the ncdump/ref_*.cdl files in the ncdump directory, used for testing the new features. The unsigned syntax uses the CDL keywords "ubyte", "ushort", "uint", and "uint64" for declaring variables, attributes, and compound type members. When constants of these types are needed to declare variable attributes of unsigned types, for _FillValue attributes for example, the suffixes "UB", "US", "U", and "UL" are used. ncgen4 understands these suffixes in either lower or upper case. By the way, in the previous response I said the failure of -k3 and -k4 was a bug in the 4.0 release, but forgot to point out that bug was only with the "-c" option for generating C code. The -k3 and -k4 options should have worked fine with the -b or -o options for generating binary netCDF-4 files from CDL. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: QLD-285503 Department: Support netCDF Priority: Normal Status: Closed