[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #ESO-530060]: dimension bug



> 
> 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