On 11/30/10 9:42 AM, Unidata netCDF Support wrote:
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
Ed: Thanks!
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@xxxxxxxx
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg