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: "Misha Krassovski" <address@hidden> >Subject: netCDF General - Segmentation fault >Organization: ORNL >Keywords: 200507132007.j6DK7Fwl022233, ncgen bug Misha, I wrote: > In CDL, you need to use a separate declaration for each variable. It > doesn't allow factoring out the type for a list of variables. So the > declarations need to look like this: > > variables: > int Station; > int Month; > int Day; > int Year; > int BottomDepth; > int BottleNumber; > int Cast; > int Depth(Depth); Actually, it turned out the real problem was declaring Depth to be a scalar variable, but giving it multiple data values. So the workaround is declaring int Depth(Depth); float Oxygen(Oxygen); since you are providing lots of values for these two variables in the data section. It's OK to factor out the type in a list of variables. So for example, the following works fine: netcdf bugr { variables: float Depth, Oxygen; data: Depth = 2; Oxygen = 5; } but the following will trigger the segmentation fault: netcdf bugr { variables: float Depth, Oxygen; data: Depth = 2, 4; Oxygen = 5; } --Russ