26 static const int NX = 6;
27 static const int NY = 12;
30 static const int NC_ERR = 2;
42 for(
int i = 0; i < NX; i++)
43 for(
int j = 0; j < NY; j++)
44 dataOut[i][j] = i * NY + j;
53 NcFile dataFile(
"simple_xy.nc", NcFile::replace);
56 NcDim xDim = dataFile.addDim(
"x", NX);
57 NcDim yDim = dataFile.addDim(
"y", NY);
64 NcVar data = dataFile.addVar(
"data", ncInt, dims);
Class represents a netCDF dimension.
Base object is thrown if a netCDF exception is encountered.
void putVar(const void *dataValues) const
This is an overloaded member function, provided for convenience.
Class represents a netCDF variable.
Class represents a netCDF root group.