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.
> > This simple program triggers a problem with the latest netcdf snapshot > and hdf5 1.8.5 patch1 > > #include <stdio.h> > #include <string.h> > #include <netcdf.h> > int > main() > { > int varid,ncid, x_dimid, y_dimid, retval; > retval = nc_create("test.nc", NC_NETCDF4 | NC_CLOBBER, &ncid); > retval = nc_def_dim(ncid, "x", 5, &x_dimid); > retval = nc_def_dim(ncid, "y", 2, &y_dimid); > const int dims[2] = {x_dimid, y_dimid}; > retval = nc_def_var(ncid, "y", NC_FLOAT, 2, dims, &varid); > retval = nc_close(ncid); > return 0; > } > > ncdump'ing the resulting file gives > > ncdump test.nc > > netcdf test { > dimensions: > x = 5 ; > y = 5 ; > variables: > float y(x, y) ; > data: > > y = > ncdump: NetCDF: Start+count exceeds dimension bound > > The program works if the output format is set to NETCDF3. > > -Jeff > > Howdy Jeff, This is now fixed in the snapshot release. Thanks for finding it and letting me know! Ed Ticket Details =================== Ticket ID: ESO-530060 Department: Support netCDF Priority: Normal Status: Closed