/************************************************************ This example shows how to set the fill value for a dataset. The program first sets the fill value to FILLVAL, creates a dataset with dimensions of DIM0xDIM1, reads from the uninitialized dataset, and outputs the contents to the screen. Next, it writes integers to the dataset, reads the data back, and outputs it to the screen. Finally it extends the dataset, reads from it, and outputs the result to the screen. This file is intended for use with HDF5 Library version 1.8 ************************************************************/ #include "hdf5.h" #include #include #define FILE "h5ex_d_fillval.h5" #define DATASET "DS1" #define DIM0 4 #define DIM1 7 #define EDIM0 6 #define EDIM1 10 #define CHUNK0 4 #define CHUNK1 4 #define FILLVAL 99 int main (void) { hid_t file, space, dset, dcpl; /* Handles */ herr_t status; hsize_t dims[2] = {DIM0, DIM1}, extdims[2] = {EDIM0, EDIM1}, maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, chunk[2] = {CHUNK0, CHUNK1}; int wdata[DIM0][DIM1], /* Write buffer */ rdata[DIM0][DIM1], /* Read buffer */ rdata2[EDIM0][EDIM1], /* Read buffer for extenstion */ fillval, i, j; /* * Initialize data. */ for (i=0; i