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.
1. I was using the ncgen CDL input file format (see the ncgen man page). For the netcdf API (netcdf.h) you should be looking at the procedures that have the word "vlen" in them. Vlen is the buzzword used for variable length types. 2. > If events_t needs to be a structure containing two integers, > what would the data declaration look like. Lets take a simpler example to start. Suppose, in CDL, we have typedefs: int(*) vlenint_t; variables: vlenint_t vlen; data: vlen = {17,23}; When you have nested vlens as in the example you gave, then you need to nest the "data:" declarations. Further, you can only assign to a variable. So since A is the top level variable, we might have data: A = {{17,23},{1,2,3},{4,5,6,7}}; This would create A with U = 1, and the the length of the (first and only) partsp would be 3 and the lengths of the 3 events would be 2,3,4, respectively. If you need to see how to do the same thing in the C API, let me know. =Dennis Heimbigner Unidata Ticket Details =================== Ticket ID: HLX-917795 Department: Support netCDF Priority: Normal Status: Closed