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.
> > > Ed: Here's a minimal C program that triggers the same error I see from > python (tested with hdf5 1.8.7, and netcdf 4.1.3rc1 from svn): > > #include <netcdf.h> > #include <stdlib.h> > #include <stdio.h> > #define ERR(e) {printf("Error: %s\n", nc_strerror(e));} > int main() { > int dataset_id, var1_id, var2_id, var3_id, x_id; > ERR(nc_create("test.nc", NC_NETCDF4 | NC_CLOBBER, &dataset_id)); > ERR(nc_def_dim(dataset_id, "x", 1, &x_id)); > ERR(nc_def_var(dataset_id, "var1", NC_FLOAT, 1, &x_id, &var1_id)); > ERR(nc_def_var(dataset_id, "var2", NC_FLOAT, 1,&x_id, &var2_id)); > ERR(nc_sync(dataset_id)); > ERR(nc_def_var(dataset_id, "x", NC_FLOAT, 1, &x_id, &var3_id)); > ERR(nc_close(dataset_id)); > } > Howdy Jeff! This code should work, since the fix I checked into the trunk yesterday. There is still another bug relating to this that I am tracking down. Thanks, Ed Ticket Details =================== Ticket ID: WXP-996743 Department: Support netCDF Priority: Critical Status: Closed